1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * armboot - Startup Code for SA1100 CPU
5 * Copyright (C) 1998 Dan Malek <dmalek@jlc.net>
6 * Copyright (C) 1999 Magnus Damm <kieraypc01.p.y.kie.era.ericsson.se>
7 * Copyright (C) 2000 Wolfgang Denk <wd@denx.de>
8 * Copyright (c) 2001 Alex Züpke <azu@sysgo.de>
11 #include <asm-offsets.h>
15 *************************************************************************
17 * Startup Code (reset vector)
19 * do important init only if we don't start from memory!
20 * relocate armboot to ram
22 * jump to second stage
24 *************************************************************************
31 * set the cpu to SVC32 mode
39 * we do sys-critical inits only at reboot,
40 * not when booting from ram!
42 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
48 /*------------------------------------------------------------------------------*/
50 .globl c_runtime_cpu_setup
56 *************************************************************************
58 * CPU_init_critical registers
60 * setup important registers
63 *************************************************************************
67 /* Interrupt-Controller base address */
68 IC_BASE: .word 0x90050000
72 /* Reset-Controller */
73 RST_BASE: .word 0x90030000
79 PWR_BASE: .word 0x90020000
82 cpuspeed: .word CONFIG_SYS_CPUSPEED
98 #ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
100 * before relocating, we have to setup RAM timing
101 * because memory timing is board-dependend, you will
102 * find a lowlevel_init.S in your board directory.
110 * disable MMU stuff and enable I-cache
113 bic r0, r0, #0x00002000 @ clear bit 13 (X)
114 bic r0, r0, #0x0000000f @ clear bits 3-0 (WCAM)
115 orr r0, r0, #0x00001000 @ set bit 12 (I) Icache
116 orr r0, r0, #0x00000002 @ set bit 1 (A) Align
120 * flush v4 I/D caches
123 mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */
124 mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */