aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_core.c12
-rw-r--r--drivers/usb/musb/musb_io.h21
2 files changed, 6 insertions, 27 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 57cc9c6eaa9..f1c6c5470b9 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -251,7 +251,7 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
251 /* best case is 32bit-aligned source address */ 251 /* best case is 32bit-aligned source address */
252 if ((0x02 & (unsigned long) src) == 0) { 252 if ((0x02 & (unsigned long) src) == 0) {
253 if (len >= 4) { 253 if (len >= 4) {
254 writesl(fifo, src + index, len >> 2); 254 iowrite32_rep(fifo, src + index, len >> 2);
255 index += len & ~0x03; 255 index += len & ~0x03;
256 } 256 }
257 if (len & 0x02) { 257 if (len & 0x02) {
@@ -260,7 +260,7 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
260 } 260 }
261 } else { 261 } else {
262 if (len >= 2) { 262 if (len >= 2) {
263 writesw(fifo, src + index, len >> 1); 263 iowrite16_rep(fifo, src + index, len >> 1);
264 index += len & ~0x01; 264 index += len & ~0x01;
265 } 265 }
266 } 266 }
@@ -268,7 +268,7 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
268 musb_writeb(fifo, 0, src[index]); 268 musb_writeb(fifo, 0, src[index]);
269 } else { 269 } else {
270 /* byte aligned */ 270 /* byte aligned */
271 writesb(fifo, src, len); 271 iowrite8_rep(fifo, src, len);
272 } 272 }
273} 273}
274 274
@@ -294,7 +294,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
294 /* best case is 32bit-aligned destination address */ 294 /* best case is 32bit-aligned destination address */
295 if ((0x02 & (unsigned long) dst) == 0) { 295 if ((0x02 & (unsigned long) dst) == 0) {
296 if (len >= 4) { 296 if (len >= 4) {
297 readsl(fifo, dst, len >> 2); 297 ioread32_rep(fifo, dst, len >> 2);
298 index = len & ~0x03; 298 index = len & ~0x03;
299 } 299 }
300 if (len & 0x02) { 300 if (len & 0x02) {
@@ -303,7 +303,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
303 } 303 }
304 } else { 304 } else {
305 if (len >= 2) { 305 if (len >= 2) {
306 readsw(fifo, dst, len >> 1); 306 ioread16_rep(fifo, dst, len >> 1);
307 index = len & ~0x01; 307 index = len & ~0x01;
308 } 308 }
309 } 309 }
@@ -311,7 +311,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
311 dst[index] = musb_readb(fifo, 0); 311 dst[index] = musb_readb(fifo, 0);
312 } else { 312 } else {
313 /* byte aligned */ 313 /* byte aligned */
314 readsb(fifo, dst, len); 314 ioread8_rep(fifo, dst, len);
315 } 315 }
316} 316}
317#endif 317#endif
diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h
index 565ad161783..eebeed78edd 100644
--- a/drivers/usb/musb/musb_io.h
+++ b/drivers/usb/musb/musb_io.h
@@ -37,27 +37,6 @@
37 37
38#include <linux/io.h> 38#include <linux/io.h>
39 39
40#if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \
41 && !defined(CONFIG_AVR32) && !defined(CONFIG_PPC32) \
42 && !defined(CONFIG_PPC64) && !defined(CONFIG_BLACKFIN) \
43 && !defined(CONFIG_MIPS) && !defined(CONFIG_M68K) \
44 && !defined(CONFIG_XTENSA)
45static inline void readsl(const void __iomem *addr, void *buf, int len)
46 { insl((unsigned long)addr, buf, len); }
47static inline void readsw(const void __iomem *addr, void *buf, int len)
48 { insw((unsigned long)addr, buf, len); }
49static inline void readsb(const void __iomem *addr, void *buf, int len)
50 { insb((unsigned long)addr, buf, len); }
51
52static inline void writesl(const void __iomem *addr, const void *buf, int len)
53 { outsl((unsigned long)addr, buf, len); }
54static inline void writesw(const void __iomem *addr, const void *buf, int len)
55 { outsw((unsigned long)addr, buf, len); }
56static inline void writesb(const void __iomem *addr, const void *buf, int len)
57 { outsb((unsigned long)addr, buf, len); }
58
59#endif
60
61#ifndef CONFIG_BLACKFIN 40#ifndef CONFIG_BLACKFIN
62 41
63/* NOTE: these offsets are all in bytes */ 42/* NOTE: these offsets are all in bytes */