2 * Copyright (C) 2005-2006 Atmel Corporation
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 #include <asm/sysreg.h>
25 #ifndef PART_SPECIFIC_BOOTSTRAP
26 # define PART_SPECIFIC_BOOTSTRAP
29 #define SYSREG_MMUCR_I_OFFSET 2
30 #define SYSREG_MMUCR_S_OFFSET 4
32 #define SR_INIT (SYSREG_BIT(GM) | SYSREG_BIT(EM) | SYSREG_BIT(M0))
33 #define CPUCR_INIT (SYSREG_BIT(BI) | SYSREG_BIT(BE) \
34 | SYSREG_BIT(FE) | SYSREG_BIT(RE) \
35 | SYSREG_BIT(IBE) | SYSREG_BIT(IEE))
40 PART_SPECIFIC_BOOTSTRAP
42 /* Reset the Status Register */
47 /* Reset CPUCR and invalidate the BTB */
51 /* Flush the caches */
57 /* Reset the MMU to default settings */
58 mov r0, SYSREG_BIT(MMUCR_S) | SYSREG_BIT(MMUCR_I)
61 /* Internal RAM should not need any initialization. We might
62 have to initialize external RAM here if the part doesn't
63 have internal RAM (or we may use the data cache) */
65 /* Jump to cacheable segment */
74 * Relocate the data section and initialize .bss. Everything
75 * is guaranteed to be at least doubleword aligned by the
95 /* Initialize the GOT pointer */
98 ld.w pc, r6[start_u_boot@got]
101 .type sp_init,@object
103 .long CFG_INIT_SP_ADDR
105 .long 3b - _GLOBAL_OFFSET_TABLE_