2 * Lowlevel setup for SMDK5250 board based on S5PC520
4 * Copyright (C) 2012 Samsung Electronics
6 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/arch/cpu.h>
14 .word CONFIG_SYS_TEXT_BASE
19 /* use iRAM stack in bl2 */
20 ldr sp, =CONFIG_IRAM_STACK
23 /* check reset status */
24 ldr r0, =(EXYNOS5_POWER_BASE + INFORM1_OFFSET)
27 /* AFTR wakeup reset */
28 ldr r2, =S5P_CHECK_DIDLE
32 /* LPA wakeup reset */
33 ldr r2, =S5P_CHECK_LPA
37 /* Sleep wakeup reset */
38 ldr r2, =S5P_CHECK_SLEEP
43 * If U-boot is already running in RAM, no need to relocate U-Boot.
44 * Memory controller must be configured before relocating U-Boot
47 ldr r0, =0x0ffffff /* r0 <- Mask Bits*/
48 bic r1, pc, r0 /* pc <- current addr of code */
49 /* r1 <- unmasked bits of pc */
50 ldr r2, _TEXT_BASE /* r2 <- original base addr in ram */
51 bic r2, r2, r0 /* r2 <- unmasked bits of r2*/
52 cmp r1, r2 /* compare r1, r2 */
53 beq 1f /* r0 == r1 then skip sdram init */
55 /* init system clock */
58 /* Memory initialize */
73 /* Load return address and jump to kernel */
74 ldr r0, =(EXYNOS5_POWER_BASE + INFORM0_OFFSET)
76 /* r1 = physical address of exynos5_cpu_resume function*/