]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/usb-tusb6010.c
Extra omap code in linux-omap tree
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / usb-tusb6010.c
index 10ef464d6be7f3f2768a1a7d95d6adb68e88ed17..59c1d57e507f1c96ef9e451c863937a6cc670d2f 100644 (file)
 #include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
+#include <linux/gpio.h>
 
 #include <linux/usb/musb.h>
 
 #include <mach/gpmc.h>
-#include <mach/gpio.h>
 #include <mach/mux.h>
 
 
@@ -175,8 +175,6 @@ static int tusb_set_sync_mode(unsigned sysclk_ps, unsigned fclk_ps)
        return gpmc_cs_set_timings(sync_cs, &t);
 }
 
-extern unsigned long gpmc_get_fclk_period(void);
-
 /* tusb driver calls this when it changes the chip's clocking */
 int tusb6010_platform_retime(unsigned is_refclk)
 {
@@ -187,7 +185,7 @@ int tusb6010_platform_retime(unsigned is_refclk)
        unsigned        sysclk_ps;
        int             status;
 
-       if (!refclk_psec)
+       if (!refclk_psec || sysclk_ps == 0)
                return -ENODEV;
 
        sysclk_ps = is_refclk ? refclk_psec : TUSB6010_OSCCLK_60;
@@ -292,12 +290,12 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
                        );
 
        /* IRQ */
-       status = omap_request_gpio(irq);
+       status = gpio_request(irq, "TUSB6010 irq");
        if (status < 0) {
                printk(error, 3, status);
                return status;
        }
-       omap_set_gpio_direction(irq, 1);
+       gpio_direction_input(irq);
        tusb_resources[2].start = irq + IH_GPIO_BASE;
 
        /* set up memory timings ... can speed them up later */