2 * armboot - Startup Code for ARM926EJS CPU-core
4 * Copyright (c) 2003 Texas Instruments
6 * ----- Adapted for OMAP1610 OMAP730 from ARM925t code ------
15 * SPDX-License-Identifier: GPL-2.0+
18 #include <asm-offsets.h>
23 *************************************************************************
25 * Startup Code (reset vector)
27 * do important init only if we don't start from memory!
28 * setup Memory and board specific bits prior to relocation.
29 * relocate armboot to ram
32 *************************************************************************
39 * set the cpu to SVC32 mode
47 * we do sys-critical inits only at reboot,
48 * not when booting from ram!
50 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
56 /*------------------------------------------------------------------------------*/
58 .globl c_runtime_cpu_setup
64 *************************************************************************
66 * CPU_init_critical registers
68 * setup important registers
71 *************************************************************************
75 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
81 mcr p15, 0, r0, c7, c5, 0 /* flush v4 I-cache */
82 mcr p15, 0, r0, c7, c6, 0 /* flush v4 D-cache */
85 * disable MMU stuff and caches
87 mrc p15, 0, r0, c1, c0, 0
88 bic r0, r0, #0x00002300 /* clear bits 13, 9:8 (--V- --RS) */
89 bic r0, r0, #0x00000087 /* clear bits 7, 2:0 (B--- -CAM) */
90 orr r0, r0, #0x00000002 /* set bit 2 (A) Align */
91 orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */
92 mcr p15, 0, r0, c1, c0, 0
95 * Go setup Memory and board specific bits prior to relocation.
97 mov ip, lr /* perserve link reg across call */
98 bl lowlevel_init /* go setup memory */
99 mov lr, ip /* restore link */
100 mov pc, lr /* back to my caller */