aboutsummaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorJon Hunter2013-04-09 16:41:31 -0500
committerTom Rini2013-04-10 15:03:01 -0500
commit2a309f33def4a8f72cb3b2e6f6a93ad487a50189 (patch)
tree6df335a53178ad17f8efdda7b6e42ea9ac9c1e15 /board
parent5faba1eac6ebfd769e25727283afa9d7275e9700 (diff)
downloadu-boot-2a309f33def4a8f72cb3b2e6f6a93ad487a50189.tar.gz
u-boot-2a309f33def4a8f72cb3b2e6f6a93ad487a50189.tar.xz
u-boot-2a309f33def4a8f72cb3b2e6f6a93ad487a50189.zip
omap5912-osk: Fix device initialisation
In the current u-boot, the device pin multiplexing and clock initialisation needs to be early during the boot process and before board_init() is called. U-boot is currently crashing on this board because this is not being done early enough. Therefore, add a s_init() function for the omap5912-osk board to do this. Also fix the stack pointer so that it is pointing to the end of the internal RAM and not the beginning as this was also causing the device to crash. Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Diffstat (limited to 'board')
-rw-r--r--board/ti/omap5912osk/lowlevel_init.S20
-rw-r--r--board/ti/omap5912osk/omap5912osk.c12
2 files changed, 28 insertions, 4 deletions
diff --git a/board/ti/omap5912osk/lowlevel_init.S b/board/ti/omap5912osk/lowlevel_init.S
index e60161ebaf..ca7361e05a 100644
--- a/board/ti/omap5912osk/lowlevel_init.S
+++ b/board/ti/omap5912osk/lowlevel_init.S
@@ -306,6 +306,23 @@ common_tc:
306 ldr r1, VAL_MPU_CNTL_TIMER 306 ldr r1, VAL_MPU_CNTL_TIMER
307 str r1, [r0] 307 str r1, [r0]
308 308
309 /*
310 * Setup a temporary stack
311 */
312 ldr sp, SRAM_STACK
313 bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
314
315 /*
316 * Save the old lr(passed in ip) and the current lr to stack
317 */
318 push {ip, lr}
319
320 /*
321 * go setup pll, mux, memory
322 */
323 bl s_init
324 pop {ip, pc}
325
309 /* back to arch calling code */ 326 /* back to arch calling code */
310 mov pc, lr 327 mov pc, lr
311 328
@@ -470,6 +487,9 @@ VAL_ARM_IDLECT2:
470VAL_ARM_IDLECT3: 487VAL_ARM_IDLECT3:
471 .word 0x00000015 488 .word 0x00000015
472 489
490SRAM_STACK:
491 .word CONFIG_SYS_INIT_SP_ADDR
492
473/* command values */ 493/* command values */
474.equ CMD_SDRAM_NOP, 0x00000000 494.equ CMD_SDRAM_NOP, 0x00000000
475.equ CMD_SDRAM_PRECHARGE, 0x00000001 495.equ CMD_SDRAM_PRECHARGE, 0x00000001
diff --git a/board/ti/omap5912osk/omap5912osk.c b/board/ti/omap5912osk/omap5912osk.c
index 9e91c5efc1..95140719aa 100644
--- a/board/ti/omap5912osk/omap5912osk.c
+++ b/board/ti/omap5912osk/omap5912osk.c
@@ -66,6 +66,14 @@ int board_init (void)
66 /* adress of boot parameters */ 66 /* adress of boot parameters */
67 gd->bd->bi_boot_params = 0x10000100; 67 gd->bd->bi_boot_params = 0x10000100;
68 68
69 flash__init();
70 ether__init();
71
72 return 0;
73}
74
75void s_init(void)
76{
69 /* Configure MUX settings */ 77 /* Configure MUX settings */
70 set_muxconf_regs (); 78 set_muxconf_regs ();
71 peripheral_power_enable (); 79 peripheral_power_enable ();
@@ -75,10 +83,6 @@ int board_init (void)
75 * ... rkw ... 83 * ... rkw ...
76 */ 84 */
77 icache_enable (); 85 icache_enable ();
78
79 flash__init ();
80 ether__init ();
81 return 0;
82} 86}
83 87
84/****************************** 88/******************************