[PATCH 06/12] cfi flash: use cpu native accessors

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 23 05:24:14 EDT 2011


So that the driver can work on big endian systems again

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/nor/cfi_flash.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/nor/cfi_flash.h b/drivers/nor/cfi_flash.h
index 34a4cf8..df482b6 100644
--- a/drivers/nor/cfi_flash.h
+++ b/drivers/nor/cfi_flash.h
@@ -247,17 +247,17 @@ void flash_make_cmd(struct flash_info *info, u32 cmd, cfiword_t *cmdbuf);
 
 static inline void flash_write8(u8 value, void *addr)
 {
-	writeb(value, addr);
+	cpu_writeb(value, addr);
 }
 
 static inline void flash_write16(u16 value, void *addr)
 {
-	writew(value, addr);
+	cpu_writew(value, addr);
 }
 
 static inline void flash_write32(u32 value, void *addr)
 {
-	writel(value, addr);
+	cpu_writel(value, addr);
 }
 
 static inline void flash_write64(u64 value, void *addr)
@@ -267,17 +267,17 @@ static inline void flash_write64(u64 value, void *addr)
 
 static inline u8 flash_read8(void *addr)
 {
-	return readb(addr);
+	return cpu_readb(addr);
 }
 
 static inline u16 flash_read16(void *addr)
 {
-	return readw(addr);
+	return cpu_readw(addr);
 }
 
 static inline u32 flash_read32(void *addr)
 {
-	return readl(addr);
+	return cpu_readl(addr);
 }
 
 static inline u64 flash_read64(void *addr)
-- 
1.7.6.3




More information about the barebox mailing list