]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/musb/plat_uds.c
ARM: OMAP: MUSB: fix compile for non-OTG modes
[linux-2.6-omap-h63xx.git] / drivers / usb / musb / plat_uds.c
index 05f4e52ff4f17464c3b07064ca05684da1e0c347..c828bd14eb88da558519cdbf24bae9be4d3678a4 100644 (file)
@@ -663,20 +663,20 @@ static irqreturn_t musb_stage2_irq(struct musb * musb, u8 int_usb,
                void __iomem *mbase = musb->mregs;
                struct musb_hw_ep       *ep;
                u8 epnum;
-               u16 wFrame;
+               u16 frame;
 
                DBG(6, "START_OF_FRAME\n");
                handled = IRQ_HANDLED;
 
                /* start any periodic Tx transfers waiting for current frame */
-               wFrame = musb_readw(mbase, MUSB_FRAME);
+               frame = musb_readw(mbase, MUSB_FRAME);
                ep = musb->endpoints;
                for (epnum = 1; (epnum < musb->nr_endpoints)
                                        && (musb->epmask >= (1 << epnum));
                                epnum++, ep++) {
                        // FIXME handle framecounter wraps (12 bits)
                        // eliminate duplicated StartUrb logic
-                       if (ep->dwWaitFrame >= wFrame) {
+                       if (ep->dwWaitFrame >= frame) {
                                ep->dwWaitFrame = 0;
                                printk("SOF --> periodic TX%s on %d\n",
                                        ep->tx_channel ? " DMA" : "",
@@ -737,9 +737,11 @@ static irqreturn_t musb_stage2_irq(struct musb * musb, u8 int_usb,
                handled = IRQ_HANDLED;
 
                switch (musb->xceiv.state) {
+#ifdef CONFIG_USB_MUSB_OTG
                case OTG_STATE_A_PERIPHERAL:
                        musb_hnp_stop(musb);
                        break;
+#endif
                case OTG_STATE_B_PERIPHERAL:
                        musb_g_suspend(musb);
                        musb->is_active = is_otg_enabled(musb)
@@ -1244,14 +1246,14 @@ enum { MUSB_CONTROLLER_MHDRC, MUSB_CONTROLLER_HDRC, };
 /* Initialize MUSB (M)HDRC part of the USB hardware subsystem;
  * configure endpoints, or take their config from silicon
  */
-static int __init musb_core_init(u16 wType, struct musb *musb)
+static int __init musb_core_init(u16 musb_type, struct musb *musb)
 {
 #ifdef MUSB_AHB_ID
-       u32 dwData;
+       u32 data;
 #endif
        u8 reg;
        char *type;
-       u16 wRelease, wRelMajor, wRelMinor;
+       u16 hwvers, rev_major, rev_minor;
        char aInfo[78], aRevision[32], aDate[12];
        void __iomem    *mbase = musb->mregs;
        int             status = 0;
@@ -1297,20 +1299,20 @@ static int __init musb_core_init(u16 wType, struct musb *musb)
                        musb_driver_name, reg, aInfo);
 
 #ifdef MUSB_AHB_ID
-       dwData = musb_readl(mbase, 0x404);
-       sprintf(aDate, "%04d-%02x-%02x", (dwData & 0xffff),
-               (dwData >> 16) & 0xff, (dwData >> 24) & 0xff);
+       data = musb_readl(mbase, 0x404);
+       sprintf(aDate, "%04d-%02x-%02x", (data & 0xffff),
+               (data >> 16) & 0xff, (data >> 24) & 0xff);
        /* FIXME ID2 and ID3 are unused */
-       dwData = musb_readl(mbase, 0x408);
-       printk("ID2=%lx\n", (long unsigned)dwData);
-       dwData = musb_readl(mbase, 0x40c);
-       printk("ID3=%lx\n", (long unsigned)dwData);
+       data = musb_readl(mbase, 0x408);
+       printk("ID2=%lx\n", (long unsigned)data);
+       data = musb_readl(mbase, 0x40c);
+       printk("ID3=%lx\n", (long unsigned)data);
        reg = musb_readb(mbase, 0x400);
-       wType = ('M' == reg) ? MUSB_CONTROLLER_MHDRC : MUSB_CONTROLLER_HDRC;
+       musb_type = ('M' == reg) ? MUSB_CONTROLLER_MHDRC : MUSB_CONTROLLER_HDRC;
 #else
        aDate[0] = 0;
 #endif
-       if (MUSB_CONTROLLER_MHDRC == wType) {
+       if (MUSB_CONTROLLER_MHDRC == musb_type) {
                musb->is_multipoint = 1;
                type = "M";
        } else {
@@ -1326,11 +1328,11 @@ static int __init musb_core_init(u16 wType, struct musb *musb)
        }
 
        /* log release info */
-       wRelease = musb_readw(mbase, MUSB_HWVERS);
-       wRelMajor = (wRelease >> 10) & 0x1f;
-       wRelMinor = wRelease & 0x3ff;
-       snprintf(aRevision, 32, "%d.%d%s", wRelMajor,
-               wRelMinor, (wRelease & 0x8000) ? "RC" : "");
+       hwvers = musb_readw(mbase, MUSB_HWVERS);
+       rev_major = (hwvers >> 10) & 0x1f;
+       rev_minor = hwvers & 0x3ff;
+       snprintf(aRevision, 32, "%d.%d%s", rev_major,
+               rev_minor, (hwvers & 0x8000) ? "RC" : "");
        printk(KERN_DEBUG "%s: %sHDRC RTL version %s %s\n",
                        musb_driver_name, type, aRevision, aDate);