[PATCH 2/3] driver/net: fix bus endianess access in ethoc.c

Franck Jullien franck.jullien at gmail.com
Tue May 13 11:38:25 PDT 2014


Signed-off-by: Franck Jullien <franck.jullien at gmail.com>
---
 drivers/net/ethoc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index 2082770..b000875 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -192,12 +192,12 @@ struct ethoc_bd {
 
 static inline u32 ethoc_read(struct ethoc *dev, loff_t offset)
 {
-	return readl(dev->iobase + offset);
+	return ioread32be(dev->iobase + offset);
 }
 
 static inline void ethoc_write(struct ethoc *dev, loff_t offset, u32 data)
 {
-	writel(data, dev->iobase + offset);
+	iowrite32be(data, dev->iobase + offset);
 }
 
 static inline void ethoc_read_bd(struct ethoc *dev, int index,
-- 
1.7.1




More information about the barebox mailing list