[U-Boot] [PATCH v3 1/4] arm: add missing writes{bwql}, reads{bwql}.

Purna Chandra Mandal purna.mandal at microchip.com
Tue Mar 15 13:44:11 CET 2016


ARM arch defines __raw_writes[bwql], __raw_reads[bwql] in io.h
but not writes[bwql], reads[bwql] as required by some drivers.
Some of the drivers are defining writes{bwlq} or reads{bwlq} as
wrapper of their "__raw" version.
To avoid that lets add the wrapper in arch itself.

Signed-off-by: Purna Chandra Mandal <purna.mandal at microchip.com>
---

Changes in v3: None
Changes in v2: None

 arch/arm/include/asm/io.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 75773bd..9d185a6 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -284,6 +284,13 @@ static inline void __raw_readsl(unsigned long addr, void *data, int longlen)
 #define insw_p(port,to,len)		insw(port,to,len)
 #define insl_p(port,to,len)		insl(port,to,len)
 
+#define writesl(a, d, s)	__raw_writesl((unsigned long)a, d, s)
+#define readsl(a, d, s)		__raw_readsl((unsigned long)a, d, s)
+#define writesw(a, d, s)	__raw_writesw((unsigned long)a, d, s)
+#define readsw(a, d, s)		__raw_readsw((unsigned long)a, d, s)
+#define writesb(a, d, s)	__raw_writesb((unsigned long)a, d, s)
+#define readsb(a, d, s)		__raw_readsb((unsigned long)a, d, s)
+
 /*
  * ioremap and friends.
  *
-- 
1.8.3.1



More information about the U-Boot mailing list