2 * Initialization stuff - taken from hermit
3 * (C) Copyright 2005 Rowel Atienza <rowel@diwalabs.com>
4 * Armadillo board HT1070
6 * See file CREDITS for list of people who contributed to this
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
30 /* some parameters for the board */
31 /* setting up the memory */
32 #define SRAM_START 0x60000000
33 #define SRAM_SIZE 0x0000c000
37 mov r0, #0x70 /* 32-bit code + data, MMU mandatory */
38 mcr p15, 0, r0, c1, c0, 0 /* MMU init */
41 mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */
42 mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */
44 mov r0, #0x80000000 /* I/O base */
46 mov r1, #0x6 /* CLKCTL_73 in SYSCON3 */
47 add r2, r0, #0x2200 /* address of SYSCON3 in r2 */
48 str r1, [r2] /* set clock speed to 73.728 MHz */
50 mov r1, #0x81 /* 64KHz DRAM refresh period */
51 str r1, [r0, #0x200] /* set DRFPR */
53 mov r1, #0x500 /* permanent enable, 16bits wide */
54 add r1, r1, #0x42 /* 128Mbit, CAS lat = 2 SDRAM */
55 add r2, r0, #0x2300 /* load address in r2 */
58 mov r1, #0x100 /* SDRAM refresh rate */
59 add r2, r0, #0x2340 /* load address in r2 */
62 mov sp, #SRAM_START /* init stack pointer */
63 add sp, sp, #SRAM_SIZE
65 /* everything is fine now */