From: Tony Lindgren <tony@atomide.com>
Date: Wed, 25 Mar 2015 21:18:37 +0000 (-0700)
Subject: usb: musb: dsps: fix build on i386 when COMPILE_TEST is set
X-Git-Tag: firefly_0821_release~176^2~2000^2~6
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d30323f810e4da94eb75cf4bfe5165b9518c64df;p=firefly-linux-kernel-4.4.55.git

usb: musb: dsps: fix build on i386 when COMPILE_TEST is set

Commit 3e457371f436 ("usb: musb: Fix fifo reads for dm816x with musb_dsps")
fixed a USB error on dm816x, but introduced a new build error on i386
when COMPILE_TEST is set:

drivers/usb/musb/musb_dsps.c: In function ‘dsps_read_fifo32’:
drivers/usb/musb/musb_dsps.c:624:3: error: implicit declaration of function
‘readsl’ [-Werror=implicit-function-declaration]
readsl(fifo, dst, len >> 2);

Let's fix this by using ioread32_rep() instead of readsl() as that's
more portable.

Fixes: 3e457371f436 ("usb: musb: Fix fifo reads for dm816x with musb_dsps")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Bin Liu <binmlist@gmail.com>
Cc: Brian Hutchinson <b.hutchman@gmail.com>
Cc: George Cherian <george.cherian@ti.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index b23ad150a165..65d931a28a14 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -621,7 +621,7 @@ static void dsps_read_fifo32(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
 	void __iomem *fifo = hw_ep->fifo;
 
 	if (len >= 4) {
-		readsl(fifo, dst, len >> 2);
+		ioread32_rep(fifo, dst, len >> 2);
 		dst += len & ~0x03;
 		len &= 0x03;
 	}