4 * AM33XX low level initialization.
6 * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
9 * Mansoor Ahamed <mansoor.ahamed@ti.com>
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of
14 * the License, or (at your option) any later version.
16 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
17 * kind, whether express or implied; without even the implied warranty
18 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
23 #include <asm/arch/hardware.h>
33 .word CONFIG_SYS_TEXT_BASE /* sdram load addr from config.mk */
35 /*****************************************************************************
36 * lowlevel_init: - Platform low level init.
37 ****************************************************************************/
41 /* The link register is saved in ip by start.S */
43 /* check if we are already running from RAM */
44 ldr r2, _lowlevel_init1
51 sub r5, r5, r2 /* bytes between mark1 and lowlevel_init */
52 sub r0, r0, r5 /* r0 <- _start w.r.t current place of execution */
53 mov r10, #0x0 /* r10 has in_ddr used by s_init() */
55 ands r0, r0, #0xC0000000
56 /* MSB 2 bits <> 0 then we are in ocmc or DDR */
63 mov r0, r10 /* passing in_ddr in r0 */
65 /* back to arch calling code */
67 /* the literal pools origin */
71 /* Place stack at the top */
72 .word LOW_LEVEL_SRAM_STACK