usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE
[oweals/u-boot.git] / arch / arm / mach-omap2 / boot-common.c
index 700e6c2f7985e77053cecd98c797eb17d7d59c9f..c8b8ac657fbff3abed5a5d1ad9be851ed97076db 100644 (file)
@@ -1,15 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * boot-common.c
  *
  * Common bootmode functions for omap based boards
  *
  * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <ahci.h>
+#include <environment.h>
 #include <spl.h>
 #include <asm/omap_common.h>
 #include <asm/arch/omap.h>
@@ -93,12 +93,12 @@ void save_omap_boot_params(void)
                        sys_boot_device = 1;
                        break;
 #endif
-#if defined(BOOT_DEVICE_USB) && !defined(CONFIG_SPL_USB_SUPPORT)
+#if defined(BOOT_DEVICE_USB) && !defined(CONFIG_SPL_USB_STORAGE)
                case BOOT_DEVICE_USB:
                        sys_boot_device = 1;
                        break;
 #endif
-#if defined(BOOT_DEVICE_USBETH) && !defined(CONFIG_SPL_USBETH_SUPPORT)
+#if defined(BOOT_DEVICE_USBETH) && !defined(CONFIG_SPL_USB_ETHER)
                case BOOT_DEVICE_USBETH:
                        sys_boot_device = 1;
                        break;
@@ -108,7 +108,7 @@ void save_omap_boot_params(void)
                        sys_boot_device = 1;
                        break;
 #endif
-#if defined(BOOT_DEVICE_DFU) && !defined(CONFIG_SPL_DFU_SUPPORT)
+#if defined(BOOT_DEVICE_DFU) && !defined(CONFIG_SPL_DFU)
                case BOOT_DEVICE_DFU:
                        sys_boot_device = 1;
                        break;
@@ -195,13 +195,14 @@ u32 spl_boot_mode(const u32 boot_device)
 
 void spl_board_init(void)
 {
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
        /* Prepare console output */
        preloader_console_init();
-
+#endif
 #if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT)
        gpmc_init();
 #endif
-#ifdef CONFIG_SPL_I2C_SUPPORT
+#if defined(CONFIG_SPL_I2C_SUPPORT) && !defined(CONFIG_DM_I2C)
        i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 #endif
 #if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW_SUPPORT)
@@ -235,13 +236,3 @@ void arch_preboot_os(void)
        ahci_reset((void __iomem *)DWC_AHSATA_BASE);
 }
 #endif
-
-#if defined(CONFIG_USB_FUNCTION_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