2 * Lowlevel setup for SMDK5250 board based on S5PC520
4 * Copyright (C) 2012 Samsung Electronics
6 * See file CREDITS for list of people who contributed to this
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27 #include <asm/arch/cpu.h>
30 .word CONFIG_SYS_TEXT_BASE
35 /* use iRAM stack in bl2 */
36 ldr sp, =CONFIG_IRAM_STACK
39 /* check reset status */
40 ldr r0, =(EXYNOS5_POWER_BASE + INFORM1_OFFSET)
43 /* AFTR wakeup reset */
44 ldr r2, =S5P_CHECK_DIDLE
48 /* LPA wakeup reset */
49 ldr r2, =S5P_CHECK_LPA
53 /* Sleep wakeup reset */
54 ldr r2, =S5P_CHECK_SLEEP
59 * If U-boot is already running in RAM, no need to relocate U-Boot.
60 * Memory controller must be configured before relocating U-Boot
63 ldr r0, =0x0ffffff /* r0 <- Mask Bits*/
64 bic r1, pc, r0 /* pc <- current addr of code */
65 /* r1 <- unmasked bits of pc */
66 ldr r2, _TEXT_BASE /* r2 <- original base addr in ram */
67 bic r2, r2, r0 /* r2 <- unmasked bits of r2*/
68 cmp r1, r2 /* compare r1, r2 */
69 beq 1f /* r0 == r1 then skip sdram init */
71 /* init system clock */
74 /* Memory initialize */
89 /* Load return address and jump to kernel */
90 ldr r0, =(EXYNOS5_POWER_BASE + INFORM0_OFFSET)
92 /* r1 = physical address of exynos5_cpu_resume function*/