ARM: am335x: Add phyCORE AM335x R2 support
[oweals/u-boot.git] / board / gumstix / duovero / duovero.c
index 3786842d365d70b2bbeb311ecf9295a3e71f468d..78fb98ef645c86ae661321b5d97790ee5685ea08 100644 (file)
@@ -1,9 +1,8 @@
+// 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 <netdev.h>
@@ -14,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
+#include <asm/mach-types.h>
 
 #include "duovero_mux_data.h"
 
@@ -24,7 +24,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 +47,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;
@@ -110,17 +110,19 @@ void set_muxconf_regs(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);
 }
 
+#if !defined(CONFIG_SPL_BUILD)
 void board_mmc_power_init(void)
 {
        twl6030_power_mmc_init(0);
 }
 #endif
+#endif
 
 #if defined(CONFIG_CMD_NET)
 
@@ -204,7 +206,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,