提交 fd996235 编写于 作者: J Jamie Iles 提交者: Grant Likely

basic_mmio_gpio: convert to non-__raw* accessors

The __raw_* accessors don't include memory barriers and can cause
problems when writes get stuck in write buffers.
Suggested-by: NLinus Walleij <linus.walleij@linaro.org>
Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: NJamie Iles <jamie@jamieiles.com>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 31029116
...@@ -101,43 +101,43 @@ static struct bgpio_chip *to_bgpio_chip(struct gpio_chip *gc) ...@@ -101,43 +101,43 @@ static struct bgpio_chip *to_bgpio_chip(struct gpio_chip *gc)
static void bgpio_write8(void __iomem *reg, unsigned long data) static void bgpio_write8(void __iomem *reg, unsigned long data)
{ {
__raw_writeb(data, reg); writeb(data, reg);
} }
static unsigned long bgpio_read8(void __iomem *reg) static unsigned long bgpio_read8(void __iomem *reg)
{ {
return __raw_readb(reg); return readb(reg);
} }
static void bgpio_write16(void __iomem *reg, unsigned long data) static void bgpio_write16(void __iomem *reg, unsigned long data)
{ {
__raw_writew(data, reg); writew(data, reg);
} }
static unsigned long bgpio_read16(void __iomem *reg) static unsigned long bgpio_read16(void __iomem *reg)
{ {
return __raw_readw(reg); return readw(reg);
} }
static void bgpio_write32(void __iomem *reg, unsigned long data) static void bgpio_write32(void __iomem *reg, unsigned long data)
{ {
__raw_writel(data, reg); writel(data, reg);
} }
static unsigned long bgpio_read32(void __iomem *reg) static unsigned long bgpio_read32(void __iomem *reg)
{ {
return __raw_readl(reg); return readl(reg);
} }
#if BITS_PER_LONG >= 64 #if BITS_PER_LONG >= 64
static void bgpio_write64(void __iomem *reg, unsigned long data) static void bgpio_write64(void __iomem *reg, unsigned long data)
{ {
__raw_writeq(data, reg); writeq(data, reg);
} }
static unsigned long bgpio_read64(void __iomem *reg) static unsigned long bgpio_read64(void __iomem *reg)
{ {
return __raw_readq(reg); return readq(reg);
} }
#endif /* BITS_PER_LONG >= 64 */ #endif /* BITS_PER_LONG >= 64 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册