Commit e755d54392554b82ce140cb96bca81ac52f69f43

Authored by Tom Rini
Committed by Andreas Bießmann
1 parent a2df3a37d7

spl_atmel.c: Switch s_init to board_init_f

To facilitate changing lowlevel_init to become s_init, move the current
contents of s_init into board_init_f and add the rest of what
board_init_f does here.
In order to compile clean without CONFIG_SKIP_LOWLEVEL_INIT set, leave an
empty stub of s_init(). It can be removed when lowlevel_init becomes s_init.

Cc: Bo Shen <voice.shen@atmel.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Tested-by: Matt Porter <mporter@konsulko.com> on sama5d3_xplained
Signed-off-by: Tom Rini <trini@ti.com>
[rebased on current master, leave s_init() as empty stub]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>

Showing 1 changed file with 10 additions and 0 deletions Side-by-side Diff

arch/arm/mach-at91/spl_atmel.c
... ... @@ -70,8 +70,13 @@
70 70 /* This only be used for sama5d4 soc now */
71 71 }
72 72  
  73 +/* empty stub to satisfy current lowlevel_init, can be removed any time */
73 74 void s_init(void)
74 75 {
  76 +}
  77 +
  78 +void board_init_f(ulong dummy)
  79 +{
75 80 switch_to_main_crystal_osc();
76 81  
77 82 /* disable watchdog */
... ... @@ -93,5 +98,10 @@
93 98 preloader_console_init();
94 99  
95 100 mem_init();
  101 +
  102 + /* Clear the BSS. */
  103 + memset(__bss_start, 0, __bss_end - __bss_start);
  104 +
  105 + board_init_r(NULL, 0);
96 106 }