Merge branch 'master' of git://git.denx.de/u-boot-mmc
[platform/kernel/u-boot.git] / board / ti / omap5_uevm / evm.c
index d0d0e0e..b6cc417 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "mux_data.h"
 
-#if defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_XHCI_OMAP)
+#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_XHCI_OMAP)
 #include <sata.h>
 #include <usb.h>
 #include <asm/gpio.h>
@@ -95,6 +95,7 @@ int board_usb_init(int index, enum usb_init_type init)
                usb_otg_ss_glue.vbus_id_status = OMAP_DWC3_ID_GROUND;
        }
 
+       enable_usb_clocks(index);
        ti_usb_phy_uboot_init(&usb_phy_device);
        dwc3_omap_uboot_init(&usb_otg_ss_glue);
        dwc3_uboot_init(&usb_otg_ss);
@@ -112,6 +113,7 @@ int board_usb_cleanup(int index, enum usb_init_type init)
        ti_usb_phy_uboot_exit(index);
        dwc3_uboot_exit(index);
        dwc3_omap_uboot_exit(index);
+       disable_usb_clocks(index);
 
        return 0;
 }
@@ -149,7 +151,7 @@ int board_eth_init(bd_t *bis)
        return 0;
 }
 
-#if defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_XHCI_OMAP)
+#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_XHCI_OMAP)
 static void enable_host_clocks(void)
 {
        int auxclk;
@@ -187,25 +189,16 @@ static void enable_host_clocks(void)
  */
 int misc_init_r(void)
 {
-       int reg;
-       u32 id[4];
-
 #ifdef CONFIG_PALMAS_POWER
        palmas_init_settings();
 #endif
 
-       reg = DIE_ID_REG_BASE + DIE_ID_REG_OFFSET;
-
-       id[0] = readl(reg);
-       id[1] = readl(reg + 0x8);
-       id[2] = readl(reg + 0xC);
-       id[3] = readl(reg + 0x10);
-       usb_fake_mac_from_die_id(id);
+       omap_die_id_usbethaddr();
 
        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,
@@ -218,7 +211,7 @@ 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)
 {
        omap_mmc_init(0, 0, 0, -1, -1);
@@ -227,7 +220,7 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_HSIC,
@@ -252,10 +245,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
 
 int ehci_hcd_stop(void)
 {
-       int ret;
-
-       ret = omap_ehci_hcd_stop();
-       return ret;
+       return omap_ehci_hcd_stop();
 }
 
 void usb_hub_reset_devices(int port)