Merge git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git] / arch / arm / mach-omap2 / hwinit-common.c
index c090442598e5b873c5980417247150101915aac6..56890a0c545caf215f16cc82c6248f044d5c519c 100644 (file)
@@ -158,7 +158,18 @@ void early_system_init(void)
        do_io_settings();
 #endif
        setup_early_clocks();
+#ifdef CONFIG_SPL_BUILD
+       /*
+        * Save the boot parameters passed from romcode.
+        * We cannot delay the saving further than this,
+        * to prevent overwrites.
+        */
+       save_omap_boot_params();
+#endif
        do_board_detect();
+#ifdef CONFIG_SPL_BUILD
+       spl_early_init();
+#endif
        vcores_init();
 #ifdef CONFIG_DEBUG_UART_OMAP
        debug_uart_init();
@@ -278,15 +289,6 @@ int checkboard(void)
        return 0;
 }
 
-/*
- *  get_device_type(): tell if GP/HS/EMU/TST
- */
-u32 get_device_type(void)
-{
-       return (readl((*ctrl)->control_status) &
-                                     (DEVICE_TYPE_MASK)) >> DEVICE_TYPE_SHIFT;
-}
-
 #if defined(CONFIG_DISPLAY_CPUINFO)
 /*
  * Print CPU information