Abolish cpu_read* and cpu_write* accessors
Commit2e6a88f210
(add cpu native ordered io accessors) introduced these macros and then commitbe57f20cdd
(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:
parent
1ec907c701
commit
5731d3ebcc
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue