[U-Boot,V2,03/10] usb: r8a66597: Replace IO accessors
diff mbox series

Message ID 20190822162214.19011-3-marek.vasut+renesas@gmail.com
State New
Delegated to: Marek Vasut
Headers show
Series
  • [U-Boot,V2,01/10] usb: r8a66597: Remove CONFIG_SUPERH_ON_CHIP_R8A66597
Related show

Commit Message

Marek Vasut Aug. 22, 2019, 4:22 p.m. UTC
Replace in{bwl}()/out{bwl}() IO accessors with read{bwl}()/write{bwl}(),
to make the driver compile both on SH and ARM.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
---
V2: No change
---
 drivers/usb/host/r8a66597.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Patch
diff mbox series

diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h
index 1e370cdd6c..7ad14ddfd2 100644
--- a/drivers/usb/host/r8a66597.h
+++ b/drivers/usb/host/r8a66597.h
@@ -402,7 +402,7 @@  struct r8a66597 {
 
 static inline u16 r8a66597_read(struct r8a66597 *r8a66597, unsigned long offset)
 {
-	return inw(r8a66597->reg + offset);
+	return readw(r8a66597->reg + offset);
 }
 
 static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597,
@@ -416,10 +416,10 @@  static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597,
 
 	count = len / 4;
 	for (i = 0; i < count; i++)
-		p[i] = inl(r8a66597->reg + offset);
+		p[i] = readl(r8a66597->reg + offset);
 
 	if (len & 0x00000003) {
-		unsigned long tmp = inl(fifoaddr);
+		unsigned long tmp = readl(fifoaddr);
 		memcpy((unsigned char *)buf + count * 4, &tmp, len & 0x03);
 	}
 }
@@ -427,7 +427,7 @@  static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597,
 static inline void r8a66597_write(struct r8a66597 *r8a66597, u16 val,
 				  unsigned long offset)
 {
-	outw(val, r8a66597->reg + offset);
+	writew(val, r8a66597->reg + offset);
 }
 
 static inline void r8a66597_write_fifo(struct r8a66597 *r8a66597,
@@ -442,15 +442,15 @@  static inline void r8a66597_write_fifo(struct r8a66597 *r8a66597,
 
 	count = len / 4;
 	for (i = 0; i < count; i++)
-		outl(p[i], fifoaddr);
+		writel(p[i], fifoaddr);
 
 	if (len & 0x00000003) {
 		pb = (unsigned char *)buf + count * 4;
 		for (i = 0; i < (len & 0x00000003); i++) {
 			if (r8a66597_read(r8a66597, CFIFOSEL) & BIGEND)
-				outb(pb[i], fifoaddr + i);
+				writeb(pb[i], fifoaddr + i);
 			else
-				outb(pb[i], fifoaddr + 3 - i);
+				writeb(pb[i], fifoaddr + 3 - i);
 		}
 	}
 }