Commit d27e06ac authored by Linus Walleij's avatar Linus Walleij

gpio: ep93xx: get rid of bogus __raw* accessors

I have no idea why this driver is using __raw* accessors for
reading and writing registers, I suspect it is just force of
habit or copy/paste. Change all to readb()/writeb() except
one chain where I used writeb_relaxed() up until the last
writeb().

Cc: Ryan Mallon <rmallon@gmail.com>
Cc: H Hartley Sweeten <hartleys@visionengravers.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent ed05e204
...@@ -51,15 +51,15 @@ static void ep93xx_gpio_update_int_params(unsigned port) ...@@ -51,15 +51,15 @@ static void ep93xx_gpio_update_int_params(unsigned port)
{ {
BUG_ON(port > 2); BUG_ON(port > 2);
__raw_writeb(0, EP93XX_GPIO_REG(int_en_register_offset[port])); writeb_relaxed(0, EP93XX_GPIO_REG(int_en_register_offset[port]));
__raw_writeb(gpio_int_type2[port], writeb_relaxed(gpio_int_type2[port],
EP93XX_GPIO_REG(int_type2_register_offset[port])); EP93XX_GPIO_REG(int_type2_register_offset[port]));
__raw_writeb(gpio_int_type1[port], writeb_relaxed(gpio_int_type1[port],
EP93XX_GPIO_REG(int_type1_register_offset[port])); EP93XX_GPIO_REG(int_type1_register_offset[port]));
__raw_writeb(gpio_int_unmasked[port] & gpio_int_enabled[port], writeb(gpio_int_unmasked[port] & gpio_int_enabled[port],
EP93XX_GPIO_REG(int_en_register_offset[port])); EP93XX_GPIO_REG(int_en_register_offset[port]));
} }
...@@ -74,7 +74,7 @@ static void ep93xx_gpio_int_debounce(unsigned int irq, bool enable) ...@@ -74,7 +74,7 @@ static void ep93xx_gpio_int_debounce(unsigned int irq, bool enable)
else else
gpio_int_debounce[port] &= ~port_mask; gpio_int_debounce[port] &= ~port_mask;
__raw_writeb(gpio_int_debounce[port], writeb(gpio_int_debounce[port],
EP93XX_GPIO_REG(int_debounce_register_offset[port])); EP93XX_GPIO_REG(int_debounce_register_offset[port]));
} }
...@@ -83,7 +83,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -83,7 +83,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
unsigned char status; unsigned char status;
int i; int i;
status = __raw_readb(EP93XX_GPIO_A_INT_STATUS); status = readb(EP93XX_GPIO_A_INT_STATUS);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (status & (1 << i)) { if (status & (1 << i)) {
int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i; int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i;
...@@ -91,7 +91,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -91,7 +91,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
} }
} }
status = __raw_readb(EP93XX_GPIO_B_INT_STATUS); status = readb(EP93XX_GPIO_B_INT_STATUS);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (status & (1 << i)) { if (status & (1 << i)) {
int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i; int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i;
...@@ -124,7 +124,7 @@ static void ep93xx_gpio_irq_ack(struct irq_data *d) ...@@ -124,7 +124,7 @@ static void ep93xx_gpio_irq_ack(struct irq_data *d)
ep93xx_gpio_update_int_params(port); ep93xx_gpio_update_int_params(port);
} }
__raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port]));
} }
static void ep93xx_gpio_irq_mask_ack(struct irq_data *d) static void ep93xx_gpio_irq_mask_ack(struct irq_data *d)
...@@ -139,7 +139,7 @@ static void ep93xx_gpio_irq_mask_ack(struct irq_data *d) ...@@ -139,7 +139,7 @@ static void ep93xx_gpio_irq_mask_ack(struct irq_data *d)
gpio_int_unmasked[port] &= ~port_mask; gpio_int_unmasked[port] &= ~port_mask;
ep93xx_gpio_update_int_params(port); ep93xx_gpio_update_int_params(port);
__raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port]));
} }
static void ep93xx_gpio_irq_mask(struct irq_data *d) static void ep93xx_gpio_irq_mask(struct irq_data *d)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment