common: Drop linux/delay.h from common header
[oweals/u-boot.git] / board / gumstix / duovero / duovero.c
index 81d6c822191ae4add2840d6c57d27d06f032a6cb..0df03a5a61f1dfc130ff8f16920cb0a48125446e 100644 (file)
@@ -1,11 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2013
  * Gumstix Inc. <www.gumstix.com>
  * Maintainer: Ash Charles  <ash@gumstix.com>
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 #include <common.h>
+#include <init.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
@@ -14,6 +15,8 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
+#include <asm/mach-types.h>
+#include <linux/delay.h>
 
 #include "duovero_mux_data.h"
 
@@ -24,7 +27,7 @@
 static void setup_net_chip(void);
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 #include <usb.h>
 #include <asm/arch/ehci.h>
 #include <asm/ehci-omap.h>
@@ -47,7 +50,7 @@ int board_init(void)
 {
        gpmc_init();
 
-       gd->bd->bi_arch_number = MACH_TYPE_OMAP4_DUOVERO;
+       gd->bd->bi_arch_number = MACH_TYPE_DUOVERO;
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
        return 0;
@@ -87,7 +90,7 @@ int misc_init_r(void)
        return 0;
 }
 
-void set_muxconf_regs_essential(void)
+void set_muxconf_regs(void)
 {
        do_set_mux((*ctrl)->control_padconf_core_base,
                   core_padconf_array_essential,
@@ -110,13 +113,19 @@ void set_muxconf_regs_essential(void)
                   sizeof(struct pad_conf_entry));
 }
 
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
-#endif
 
+#if !defined(CONFIG_SPL_BUILD)
+void board_mmc_power_init(void)
+{
+       twl6030_power_mmc_init(0);
+}
+#endif
+#endif
 
 #if defined(CONFIG_CMD_NET)
 
@@ -124,7 +133,7 @@ int board_mmc_init(bd_t *bis)
 #define GPMC_BASEADDR_MASK     0x3F
 #define GPMC_CS_ENABLE         0x1
 
-static void enable_gpmc_net_config(const u32 *gpmc_config, struct gpmc_cs *cs,
+static void enable_gpmc_net_config(const u32 *gpmc_config, const struct gpmc_cs *cs,
                u32 base, u32 size)
 {
        writel(0, &cs->config7);
@@ -200,7 +209,7 @@ int board_eth_init(bd_t *bis)
        return rc;
 }
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,