9
0
Fork 0

Abolish cpu_read* and cpu_write* accessors

Commit 2e6a88f210 (add cpu native ordered io accessors) introduced
these macros and then commit be57f20cdd (Fix big endian MMIO
primitives) figured out they are equivalent to __raw_{read,write}*.

They turned out unnecessary after all.  Anyway, most source files
use __raw_read* and __raw_write*.

Let's replace a few remaining references and abolish them.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Masahiro Yamada 2015-05-19 10:31:26 +09:00 committed by Sascha Hauer
parent 1ec907c701
commit 5731d3ebcc
6 changed files with 14 additions and 22 deletions

View File

@ -111,9 +111,9 @@ u32 tegra_get_odmdata(void)
return 0;
}
bctptr = cpu_readl(TEGRA_IRAM_BASE + bctptr_offset);
bctptr = __raw_readl(TEGRA_IRAM_BASE + bctptr_offset);
return cpu_readl(bctptr + odmdata_offset);
return __raw_readl(bctptr + odmdata_offset);
}
static __always_inline

View File

@ -41,12 +41,12 @@
static inline void ar933x_debug_ll_writel(u32 b, int offset)
{
cpu_writel(b, (u8 *)DEBUG_LL_UART_ADDR + offset);
__raw_writel(b, (u8 *)DEBUG_LL_UART_ADDR + offset);
}
static inline u32 ar933x_debug_ll_readl(int offset)
{
return cpu_readl((u8 *)DEBUG_LL_UART_ADDR + offset);
return __raw_readl((u8 *)DEBUG_LL_UART_ADDR + offset);
}
static inline void PUTC_LL(int ch)

View File

@ -256,17 +256,17 @@ void flash_make_cmd(struct flash_info *info, u32 cmd, cfiword_t *cmdbuf);
static inline void flash_write8(u8 value, void *addr)
{
cpu_writeb(value, addr);
__raw_writeb(value, addr);
}
static inline void flash_write16(u16 value, void *addr)
{
cpu_writew(value, addr);
__raw_writew(value, addr);
}
static inline void flash_write32(u32 value, void *addr)
{
cpu_writel(value, addr);
__raw_writel(value, addr);
}
static inline void flash_write64(u64 value, void *addr)
@ -276,17 +276,17 @@ static inline void flash_write64(u64 value, void *addr)
static inline u8 flash_read8(void *addr)
{
return cpu_readb(addr);
return __raw_readb(addr);
}
static inline u16 flash_read16(void *addr)
{
return cpu_readw(addr);
return __raw_readw(addr);
}
static inline u32 flash_read32(void *addr)
{
return cpu_readl(addr);
return __raw_readl(addr);
}
static inline u64 flash_read64(void *addr)

View File

@ -40,7 +40,7 @@ static inline void ar933x_serial_writel(struct console_device *cdev,
{
struct ar933x_uart_priv *priv = cdev->dev->priv;
cpu_writel(b, priv->base + offset);
__raw_writel(b, priv->base + offset);
}
static inline u32 ar933x_serial_readl(struct console_device *cdev,
@ -48,7 +48,7 @@ static inline u32 ar933x_serial_readl(struct console_device *cdev,
{
struct ar933x_uart_priv *priv = cdev->dev->priv;
return cpu_readl(priv->base + offset);
return __raw_readl(priv->base + offset);
}
/*

View File

@ -48,12 +48,12 @@ struct ath79_spi {
static inline u32 ath79_spi_rr(struct ath79_spi *sp, int reg)
{
return cpu_readl(sp->regs + reg);
return __raw_readl(sp->regs + reg);
}
static inline void ath79_spi_wr(struct ath79_spi *sp, u32 val, int reg)
{
cpu_writel(val, sp->regs + reg);
__raw_writel(val, sp->regs + reg);
}
static inline void setbits(struct ath79_spi *sp, int bits, int on)

View File

@ -3,12 +3,4 @@
#include <asm/io.h>
/* cpu_read/cpu_write: cpu native io accessors */
#define cpu_readb(a) __raw_readb(a)
#define cpu_readw(a) __raw_readw(a)
#define cpu_readl(a) __raw_readl(a)
#define cpu_writeb(v, a) __raw_writeb((v), (a))
#define cpu_writew(v, a) __raw_writew((v), (a))
#define cpu_writel(v, a) __raw_writel((v), (a))
#endif /* __IO_H */