Blackfin: net2272: move pin setup to boards files
[pandora-kernel.git] / arch / blackfin / mach-bf561 / boards / cm_bf561.c
index 87595cd..2e48136 100644 (file)
@@ -532,6 +532,24 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
 #endif
 };
 
+static int __init net2272_init(void)
+{
+#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
+       int ret;
+
+       ret = gpio_request(GPIO_PF46, "net2272");
+       if (ret)
+               return ret;
+
+       /* Reset USB Chip, PF46 */
+       gpio_direction_output(GPIO_PF46, 0);
+       mdelay(2);
+       gpio_set_value(GPIO_PF46, 1);
+#endif
+
+       return 0;
+}
+
 static int __init cm_bf561_init(void)
 {
        printk(KERN_INFO "%s(): registering device resources\n", __func__);
@@ -543,6 +561,10 @@ static int __init cm_bf561_init(void)
 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
        irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
 #endif
+
+       if (net2272_init())
+               pr_warning("unable to configure net2272; it probably won't work\n");
+
        return 0;
 }