]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: musb: Do not use musb_read[b|w] / _write[b|w] wrappers in generic fifo functions
authorHans de Goede <hdegoede@redhat.com>
Fri, 20 Mar 2015 19:11:13 +0000 (20:11 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 26 May 2015 15:46:59 +0000 (10:46 -0500)
The generic fifo functions already use non wrapped accesses in various
cases through the iowrite#_rep functions, and all platforms which override
the default musb_read[b|w] / _write[b|w] functions also provide their own
fifo access functions, so we can safely drop the unnecessary indirection
from the fifo access functions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.c

index fea3402f12d55395af2c9d005a33fa475f0a3ddd..575a1f8135aed8d694e7dd99fbc44fd81fb048ef 100644 (file)
@@ -314,7 +314,7 @@ static void musb_default_write_fifo(struct musb_hw_ep *hw_ep, u16 len,
                                index += len & ~0x03;
                        }
                        if (len & 0x02) {
-                               musb_writew(fifo, 0, *(u16 *)&src[index]);
+                               __raw_writew(*(u16 *)&src[index], fifo);
                                index += 2;
                        }
                } else {
@@ -324,7 +324,7 @@ static void musb_default_write_fifo(struct musb_hw_ep *hw_ep, u16 len,
                        }
                }
                if (len & 0x01)
-                       musb_writeb(fifo, 0, src[index]);
+                       __raw_writeb(src[index], fifo);
        } else  {
                /* byte aligned */
                iowrite8_rep(fifo, src, len);
@@ -356,7 +356,7 @@ static void musb_default_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
                                index = len & ~0x03;
                        }
                        if (len & 0x02) {
-                               *(u16 *)&dst[index] = musb_readw(fifo, 0);
+                               *(u16 *)&dst[index] = __raw_readw(fifo);
                                index += 2;
                        }
                } else {
@@ -366,7 +366,7 @@ static void musb_default_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
                        }
                }
                if (len & 0x01)
-                       dst[index] = musb_readb(fifo, 0);
+                       dst[index] = __raw_readb(fifo);
        } else  {
                /* byte aligned */
                ioread8_rep(fifo, dst, len);