]> git.sur5r.net Git - u-boot/commitdiff
board_f/r: Use static const for the init sequences
authorSimon Glass <sjg@chromium.org>
Mon, 16 Jan 2017 14:03:50 +0000 (07:03 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 6 Feb 2017 03:38:46 +0000 (11:38 +0800)
These tables should be declared static const. Unfortunately the table in
board_r is updated on machines with manual relocation.

Update them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
common/board_f.c
common/board_r.c

index 88ecfe02db2853cfec2995c3abcb8d65699f8525..62cdd8cf8f050a7341a3374aec72dfff36840c29 100644 (file)
@@ -846,7 +846,7 @@ __weak int arch_cpu_init_dm(void)
        return 0;
 }
 
-static init_fnc_t init_sequence_f[] = {
+static const init_fnc_t init_sequence_f[] = {
 #ifdef CONFIG_SANDBOX
        setup_ram_buf,
 #endif
@@ -1098,7 +1098,7 @@ void board_init_f(ulong boot_flags)
  * NOTE: At present only x86 uses this route, but it is intended that
  * all archs will move to this when generic relocation is implemented.
  */
-static init_fnc_t init_sequence_f_r[] = {
+static const init_fnc_t init_sequence_f_r[] = {
 #if !CONFIG_IS_ENABLED(X86_64)
        init_cache_f_r,
 #endif
index 48fa4ee52406df7a5fe874b14366c8d81fb67379..f739c8afdfc221d54f3213cff219d5e500757603 100644 (file)
@@ -737,7 +737,7 @@ static int run_main_loop(void)
  *
  * TODO: perhaps reset the watchdog in the initcall function after each call?
  */
-init_fnc_t init_sequence_r[] = {
+static init_fnc_t init_sequence_r[] = {
        initr_trace,
        initr_reloc,
        /* TODO: could x86/PPC have this also perhaps? */