]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/include/asm/arch-omap5/sys_proto.h
Merge branch 'hs@denx.de' of git://git.denx.de/u-boot-staging
[u-boot] / arch / arm / include / asm / arch-omap5 / sys_proto.h
index fdca7655c6ddf41dbaf35ae53492d30a80904268..c31e18ca22283da08e1c0822b92afb64d3a5157e 100644 (file)
 #include <asm/arch/clocks.h>
 #include <asm/omap_common.h>
 #include <asm/arch/mux_omap5.h>
+#include <asm/arch/clocks.h>
 
 struct omap_sysinfo {
        char *board_string;
 };
 extern const struct omap_sysinfo sysinfo;
 
-extern struct omap5_prcm_regs *const prcm;
-
 void gpmc_init(void);
 void watchdog_init(void);
 u32 get_device_type(void);
@@ -76,15 +75,17 @@ static inline u32 running_from_sdram(void)
 static inline u8 uboot_loaded_by_spl(void)
 {
        /*
-        * Configuration Header is not supported yet, so u-boot init running
-        * from SDRAM implies that it was loaded by SPL. When this situation
-        * changes one of these approaches could be taken:
-        * i.  Pass a magic from SPL to U-Boot and U-Boot save it at a known
-        *     location.
-        * ii. Check the OPP. CH can support only 50% OPP while SPL initializes
-        *     the DPLLs at 100% OPP.
+        * u-boot can be running from sdram either because of configuration
+        * Header or by SPL. If because of CH, then the romcode sets the
+        * CHSETTINGS executed bit to true in the boot parameter structure that
+        * it passes to the bootloader.This parameter is stored in the ch_flags
+        * variable by both SPL and u-boot.Check out for CHSETTINGS, which is a
+        * mandatory section if CH is present.
         */
-       return running_from_sdram();
+       if ((boot_params.ch_flags) & (CH_FLAGS_CHSETTINGS))
+               return 0;
+       else
+               return running_from_sdram();
 }
 /*
  * The basic hardware init of OMAP(s_init()) can happen in 4