2 * armboot - Startup Code for OMP2420/ARM1136 CPU-core
4 * Copyright (c) 2004 Texas Instruments <r-woodruff2@ti.com>
6 * Copyright (c) 2001 Marius Gröger <mag@sysgo.de>
7 * Copyright (c) 2002 Alex Züpke <azu@sysgo.de>
8 * Copyright (c) 2002 Gary Jennejohn <garyj@denx.de>
9 * Copyright (c) 2003 Richard Woodruff <r-woodruff2@ti.com>
10 * Copyright (c) 2003 Kshitij <kshitij@ti.com>
12 * SPDX-License-Identifier: GPL-2.0+
15 #include <asm-offsets.h>
20 *************************************************************************
22 * Startup Code (reset vector)
24 * do important init only if we don't start from memory!
25 * setup Memory and board specific bits prior to relocation.
26 * relocate armboot to ram
29 *************************************************************************
36 * set the cpu to SVC32 mode
43 /* the mask ROM code should have PLL and others stable */
44 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
50 /*------------------------------------------------------------------------------*/
52 .globl c_runtime_cpu_setup
58 *************************************************************************
60 * CPU_init_critical registers
62 * setup important registers
65 *************************************************************************
67 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
73 mcr p15, 0, r0, c7, c7, 0 /* Invalidate I+D+BTB caches */
74 mcr p15, 0, r0, c8, c7, 0 /* Invalidate Unified TLB */
77 * disable MMU stuff and caches
79 mrc p15, 0, r0, c1, c0, 0
80 bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS)
81 bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM)
82 orr r0, r0, #0x00000002 @ set bit 2 (A) Align
83 orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
84 mcr p15, 0, r0, c1, c0, 0
87 * Jump to board specific initialization... The Mask ROM will have already initialized
88 * basic memory. Go here to bump up clock rate and handle wake up conditions.
90 mov ip, lr /* persevere link reg across call */
91 bl lowlevel_init /* go setup pll,mux,memory */
92 mov lr, ip /* restore link */
93 mov pc, lr /* back to my caller */
94 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */