]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/olimex/mx23_olinuxino/mx23_olinuxino.c
mxs_gpio: correctly use the GPIO API
[karo-tx-uboot.git] / board / olimex / mx23_olinuxino / mx23_olinuxino.c
index e2a03a110b6d69c2bf0016f39ec59d6d1aae325f..34fd8698db2b4c23416c8b6499f8130085594efc 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <asm/arch/iomux.h>
 #include <asm/arch/iomux-mx23.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
@@ -30,13 +31,25 @@ int board_early_init_f(void)
        /* SSP0 clock at 96MHz */
        mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
 
+       return 0;
+}
+
 #ifdef CONFIG_CMD_USB
-       /* Enable LAN9512 */
-       gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
-#endif
+int board_ehci_hcd_init(int port)
+{
+       /* Enable LAN9512 (Maxi) or GL850G (Mini) USB HUB power. */
+       gpio_direction_output(MXS_PAD_TO_GPIO(MX23_PAD_GPMI_ALE__GPIO_0_17), 1);
+       udelay(100);
+       return 0;
+}
 
+int board_ehci_hcd_exit(int port)
+{
+       /* Enable LAN9512 (Maxi) or GL850G (Mini) USB HUB power. */
+       gpio_direction_output(MXS_PAD_TO_GPIO(MX23_PAD_GPMI_ALE__GPIO_0_17), 0);
        return 0;
 }
+#endif
 
 int dram_init(void)
 {