vserver 1.9.3
[linux-2.6.git] / drivers / usb / gadget / pxa2xx_udc.c
index 4e40342..c1139b5 100644 (file)
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
+#include <asm/mach-types.h>
 #include <asm/unaligned.h>
 #include <asm/hardware.h>
+#include <asm/arch/pxa-regs.h>
 
 #include <linux/usb_ch9.h>
 #include <linux/usb_gadget.h>
@@ -115,7 +117,7 @@ static const char ep0name [] = "ep0";
 
 #ifdef USE_DMA
 static int use_dma = 1;
-MODULE_PARM (use_dma, "i");
+module_param(use_dma, bool, 0);
 MODULE_PARM_DESC (use_dma, "true to use dma");
 
 static void dma_nodesc_handler (int dmach, void *_ep, struct pt_regs *r);
@@ -145,7 +147,7 @@ static void kick_dma(struct pxa2xx_ep *ep, struct pxa2xx_request *req);
  * ... so mode = 3 (or 7, 15, etc) does it for both
  */
 static ushort fifo_mode = 0;
-MODULE_PARM (fifo_mode, "h");
+module_param(fifo_mode, ushort, 0);
 MODULE_PARM_DESC (fifo_mode, "pxa2xx udc fifo mode");
 #endif
 
@@ -1405,7 +1407,7 @@ static void udc_disable(struct pxa2xx_udc *dev)
 
 #ifdef CONFIG_ARCH_PXA
         /* Disable clock for USB device */
-        CKEN &= ~CKEN11_USB;
+       pxa_set_cken(CKEN11_USB, 0);
 #endif
 
        ep0_idle (dev);
@@ -1451,7 +1453,7 @@ static void udc_enable (struct pxa2xx_udc *dev)
 
 #ifdef CONFIG_ARCH_PXA
         /* Enable clock for USB device */
-        CKEN |= CKEN11_USB;
+       pxa_set_cken(CKEN11_USB, 1);
 #endif
 
        /* try to clear these bits before we enable the udc */
@@ -1507,7 +1509,7 @@ static void udc_enable (struct pxa2xx_udc *dev)
        /* caller must be able to sleep in order to cope
         * with startup transients.
         */
-       schedule_timeout(HZ/10);
+       msleep(100);
 
        /* enable suspend/resume and reset irqs */
        udc_clear_mask_UDCCR(UDCCR_SRM | UDCCR_REM);
@@ -2538,7 +2540,7 @@ static int __exit pxa2xx_udc_remove(struct device *_dev)
 /*-------------------------------------------------------------------------*/
 
 static struct device_driver udc_driver = {
-       .name           = (char *) driver_name,
+       .name           = "pxa2xx-udc",
        .bus            = &platform_bus_type,
        .probe          = pxa2xx_udc_probe,
        .remove         = __exit_p(pxa2xx_udc_remove),