]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
powerpc/mpc85xx: Fix boot_flag for calling board_init_f()
authorYork Sun <yorksun@freescale.com>
Wed, 30 Apr 2014 21:43:47 +0000 (14:43 -0700)
committerYork Sun <yorksun@freescale.com>
Tue, 13 May 2014 15:31:22 +0000 (08:31 -0700)
baord_init_f takes one argument, boot_flag. It has not been used for
powerpc, until recently changing to use generic board architecture.
The boot flag is added as a return value from cpu_init_f().

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Alexander Graf <agraf@suse.de>
arch/powerpc/cpu/mpc85xx/cpu_init.c
arch/powerpc/cpu/mpc85xx/spl_minimal.c
arch/powerpc/cpu/mpc85xx/start.S
include/common.h

index 2656b794be786b3b0ac4593611f38cb49ed9a544..d6cf88555a11d23056caef9d62a58a9b436a2986 100644 (file)
@@ -368,12 +368,12 @@ void fsl_erratum_a007212_workaround(void)
 }
 #endif
 
-void cpu_init_f (void)
+ulong cpu_init_f(void)
 {
+       ulong flag = 0;
        extern void m8560_cpm_reset (void);
 #ifdef CONFIG_SYS_DCSRBAR_PHYS
        ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
-       gd = (gd_t *)(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
 #endif
 #if defined(CONFIG_SECURE_BOOT)
        struct law_entry law;
@@ -442,13 +442,14 @@ void cpu_init_f (void)
 #ifdef CONFIG_DEEP_SLEEP
        /* disable the console if boot from deep sleep */
        if (in_be32(&gur->scrtsr[0]) & (1 << 3))
-               gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
+               flag = GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
 #endif
 #endif
 #ifdef CONFIG_SYS_FSL_ERRATUM_A007212
        fsl_erratum_a007212_workaround();
 #endif
 
+       return flag;
 }
 
 /* Implement a dummy function for those platforms w/o SERDES */
index 9e4c6c9078817dca12650b1548ea3b422469bf31..cc45f715e84bbe4c7164c5faf6eddf096fc87a12 100644 (file)
@@ -12,7 +12,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-void cpu_init_f(void)
+ulong cpu_init_f(void)
 {
 #ifdef CONFIG_SYS_INIT_L2_ADDR
        ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
@@ -27,6 +27,8 @@ void cpu_init_f(void)
        out_be32(&l2cache->l2ctl,
                (MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2SRAM_ENTIRE));
 #endif
+
+       return 0;
 }
 
 #ifndef CONFIG_SYS_FSL_TBCLK_DIV
index 0149146458754c7293866d7893410b4a0bc180ac..d8c9fb6b2875c7d514bdca389066fb3a8aa6a7b5 100644 (file)
@@ -1158,7 +1158,7 @@ _start_cont:
        mtmsr   r3
        isync
 
-       bl      cpu_init_f
+       bl      cpu_init_f      /* return boot_flag for calling board_init_f */
        bl      board_init_f
        isync
 
index 2adf5f90b8ce9e7eae556a96a9280252eb81acfc..13e5dc74e631df31d747d87d3db12326118493aa 100644 (file)
@@ -729,9 +729,12 @@ void       get_sys_info  ( sys_info_t * );
 #if defined(CONFIG_8xx) || defined(CONFIG_MPC8260)
 void   cpu_init_f    (volatile immap_t *immr);
 #endif
-#if defined(CONFIG_4xx) || defined(CONFIG_MPC85xx) || defined(CONFIG_MCF52x2) ||defined(CONFIG_MPC86xx)
+#if defined(CONFIG_4xx) || defined(CONFIG_MCF52x2) || defined(CONFIG_MPC86xx)
 void   cpu_init_f    (void);
 #endif
+#ifdef CONFIG_MPC85xx
+ulong cpu_init_f(void);
+#endif
 
 int    cpu_init_r    (void);
 #if defined(CONFIG_MPC8260)