]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/omap-common/hwinit-common.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / omap-common / hwinit-common.c
index 70d16a816070b779cb3b6f1fac5bf9b734220f99..5df116edbe67b379b50952b896635c248ad7bc25 100644 (file)
@@ -84,7 +84,7 @@ u32 cortex_rev(void)
        return rev;
 }
 
-void omap_rev_string(void)
+static void omap_rev_string(void)
 {
        u32 omap_rev = omap_revision();
        u32 soc_variant = (omap_rev & 0xF0000000) >> 28;
@@ -101,11 +101,6 @@ void omap_rev_string(void)
 }
 
 #ifdef CONFIG_SPL_BUILD
-static void init_boot_params(void)
-{
-       boot_params_ptr = (u32 *) &boot_params;
-}
-
 void spl_display_print(void)
 {
        omap_rev_string();
@@ -116,6 +111,17 @@ void __weak srcomp_enable(void)
 {
 }
 
+#ifdef CONFIG_ARCH_CPU_INIT
+/*
+ * SOC specific cpu init
+ */
+int arch_cpu_init(void)
+{
+       save_omap_boot_params();
+       return 0;
+}
+#endif /* CONFIG_ARCH_CPU_INIT */
+
 /*
  * Routine: s_init
  * Description: Does early system init of watchdog, muxing,  andclocks
@@ -132,6 +138,14 @@ void __weak srcomp_enable(void)
  */
 void s_init(void)
 {
+       /*
+        * Save the boot parameters passed from romcode.
+        * We cannot delay the saving further than this,
+        * to prevent overwrites.
+        */
+#ifdef CONFIG_SPL_BUILD
+       save_omap_boot_params();
+#endif
        init_omap_revision();
        hw_data_init();
 
@@ -152,11 +166,8 @@ void s_init(void)
 #endif
        prcm_init();
 #ifdef CONFIG_SPL_BUILD
-       timer_init();
-
        /* For regular u-boot sdram_init() is called from dram_init() */
        sdram_init();
-       init_boot_params();
 #endif
 }