usb: musb: avoid FADDR read access
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 30 Oct 2012 18:52:24 +0000 (19:52 +0100)
committerFelipe Balbi <balbi@ti.com>
Wed, 31 Oct 2012 13:21:01 +0000 (15:21 +0200)
This is part of the workaround for AM35x advisory Advisory 1.1.20.
The advisory says that the IPSS bridge can't handle 8 & 16 bit read
access. An 8bit read access to FADDR results in an 32bit read
access which also reads INTRTX and therefore may lose interrupts.
This patch removes any reads to FADDR as they are not really required.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/musb_gadget_ep0.c

index d0b87e7b4abfd98b232c135df7661d6dbe0bfe90..b430f158e668c436aa84da8170071232bdc34d88 100644 (file)
@@ -2154,10 +2154,9 @@ __acquires(musb->lock)
        u8              devctl = musb_readb(mbase, MUSB_DEVCTL);
        u8              power;
 
-       dev_dbg(musb->controller, "<== %s addr=%x driver '%s'\n",
+       dev_dbg(musb->controller, "<== %s driver '%s'\n",
                        (devctl & MUSB_DEVCTL_BDEVICE)
                                ? "B-Device" : "A-Device",
-                       musb_readb(mbase, MUSB_FADDR),
                        musb->gadget_driver
                                ? musb->gadget_driver->driver.name
                                : NULL
index e40d7647caf1c636a52d6e539f53c78360062a62..c9c1ac4e075f758ae01eaf0a79b738ee41da0611 100644 (file)
@@ -673,10 +673,8 @@ irqreturn_t musb_g_ep0_irq(struct musb *musb)
        csr = musb_readw(regs, MUSB_CSR0);
        len = musb_readb(regs, MUSB_COUNT0);
 
-       dev_dbg(musb->controller, "csr %04x, count %d, myaddr %d, ep0stage %s\n",
-                       csr, len,
-                       musb_readb(mbase, MUSB_FADDR),
-                       decode_ep0stage(musb->ep0_state));
+       dev_dbg(musb->controller, "csr %04x, count %d, ep0stage %s\n",
+                       csr, len, decode_ep0stage(musb->ep0_state));
 
        if (csr & MUSB_CSR0_P_DATAEND) {
                /*