From 9a307e8da54d34e328d7face138bd096e99bb746 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Thu, 23 May 2019 17:39:35 +0200 Subject: ARM: at91: replace __raw_{readl, writel} of peripherals with readl, writel Use the potentially endianness-changing readl, writel and siblings directly. They looks prettier and are the correct thing to do, as even if the CPU is in big-endian mode, the peripherals are little-endian. Unlike Linux, barebox readl,writel are the same Linux' {readl,writel}_relaxed (they don't imply memory barriers) and thus there shouldn't be any functional change. Patch was generated by a mass search and replace. I looked it over, adjust some whitespace and further verified by reviewing the output of git diff HEAD~1 --word-diff | \ perl -pe 's/\[-(.*?)__raw_/{+$1/; s/-\]\{\+/+}{+/;' \ -e 's/(\{\+.*?\+\})\1/__ALL_IS_WELL__/' | grep '+}{+' which filters out the common case of lines where a single __raw_{readT,writeT} had its __raw_ prefix stripped without any further changes. Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- drivers/net/at91_ether.h | 4 ++-- drivers/net/macb.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/at91_ether.h b/drivers/net/at91_ether.h index 08df6f161c..21c2ae94da 100644 --- a/drivers/net/at91_ether.h +++ b/drivers/net/at91_ether.h @@ -33,7 +33,7 @@ struct rbf_t */ static inline unsigned long at91_emac_read(unsigned int reg) { - return __raw_readl(AT91_VA_BASE_EMAC + reg); + return readl(AT91_VA_BASE_EMAC + reg); } /* @@ -41,6 +41,6 @@ static inline unsigned long at91_emac_read(unsigned int reg) */ static inline void at91_emac_write(unsigned int reg, unsigned long value) { - __raw_writel(value, AT91_VA_BASE_EMAC + reg); + writel(value, AT91_VA_BASE_EMAC + reg); } #endif diff --git a/drivers/net/macb.h b/drivers/net/macb.h index 979f53cb71..fda4d08663 100644 --- a/drivers/net/macb.h +++ b/drivers/net/macb.h @@ -334,13 +334,13 @@ /* Register access macros */ #define macb_readl(port,reg) \ - __raw_readl((port)->regs + MACB_##reg) + readl((port)->regs + MACB_##reg) #define macb_writel(port,reg,value) \ - __raw_writel((value), (port)->regs + MACB_##reg) + writel((value), (port)->regs + MACB_##reg) #define gem_readl(port, reg) \ - __raw_readl((port)->regs + GEM_##reg) + readl((port)->regs + GEM_##reg) #define gem_writel(port, reg, value) \ - __raw_writel((value), (port)->regs + GEM_##reg) + writel((value), (port)->regs + GEM_##reg) /* * Conditional GEM/MACB macros. These perform the operation to the correct -- cgit v1.2.3