USB: mx53loco: add end enable USB host support on port 1
[oweals/u-boot.git] / board / freescale / mx53loco / mx53loco.c
index 18b388eeda00974462e72440206dda769e75409a..57170ce0452cd0fd134831d5f9b7cafad37a24bf 100644 (file)
 #include <i2c.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
-#include <mxc_gpio.h>
+#include <asm/gpio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-u32 get_board_rev(void)
-{
-       return get_cpu_rev();
-}
-
 int dram_init(void)
 {
        u32 size1, size2;
@@ -83,6 +78,16 @@ static void setup_iomux_uart(void)
                                PAD_CTL_ODE_OPENDRAIN_ENABLE);
 }
 
+#ifdef CONFIG_USB_EHCI_MX5
+void board_ehci_hcd_init(int port)
+{
+       /* request VBUS power enable pin, GPIO[8}, gpio7 */
+       mxc_request_iomux(MX53_PIN_ATA_DA_2, IOMUX_CONFIG_ALT1);
+       gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 0);
+       gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 1);
+}
+#endif
+
 static void setup_iomux_fec(void)
 {
        /*FEC_MDIO*/
@@ -145,10 +150,13 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
+       mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
+       mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
+
        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
-               *cd = mxc_gpio_get(77); /*GPIO3_13*/
+               *cd = gpio_get_value(77); /*GPIO3_13*/
        else
-               *cd = mxc_gpio_get(75); /*GPIO3_11*/
+               *cd = gpio_get_value(75); /*GPIO3_11*/
 
        return 0;
 }
@@ -288,7 +296,6 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-       gd->bd->bi_arch_number = MACH_TYPE_MX53_LOCO;
        gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
        return 0;