]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/armv7/omap-common/boot-common.c
Merge branch 'buildman' of git://git.denx.de/u-boot-x86
[u-boot] / arch / arm / cpu / armv7 / omap-common / boot-common.c
index cb18908867dd06d2494a2ef8dce9776313dfe663..bbc6bed7cac9bc765553093d3d6655afffbc15c7 100644 (file)
@@ -9,12 +9,14 @@
  */
 
 #include <common.h>
+#include <ahci.h>
 #include <spl.h>
 #include <asm/omap_common.h>
 #include <asm/arch/omap.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
 #include <watchdog.h>
+#include <scsi.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -104,6 +106,16 @@ u32 spl_boot_mode(void)
 
 void spl_board_init(void)
 {
+       /*
+        * Save the boot parameters passed from romcode.
+        * We cannot delay the saving further than this,
+        * to prevent overwrites.
+        */
+       save_omap_boot_params();
+
+       /* Prepare console output */
+       preloader_console_init();
+
 #ifdef CONFIG_SPL_NAND_SUPPORT
        gpmc_init();
 #endif
@@ -143,3 +155,20 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
        image_entry((u32 *)&gd->arch.omap_boot_params);
 }
 #endif
+
+#ifdef CONFIG_SCSI_AHCI_PLAT
+void arch_preboot_os(void)
+{
+       ahci_reset((void __iomem *)DWC_AHSATA_BASE);
+}
+#endif
+
+#if defined(CONFIG_CMD_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
+int fb_set_reboot_flag(void)
+{
+       printf("Setting reboot to fastboot flag ...\n");
+       setenv("dofastboot", "1");
+       saveenv();
+       return 0;
+}
+#endif