Commit 4ba113b6 authored by Álvaro Fernández Rojas's avatar Álvaro Fernández Rojas Committed by Jacek Anaszewski

leds: bcm6358: add little endian support

This adds little endian support while keeping big endian support.
Signed-off-by: default avatarÁlvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
parent a06cd4b7
...@@ -49,12 +49,20 @@ struct bcm6358_led { ...@@ -49,12 +49,20 @@ struct bcm6358_led {
static void bcm6358_led_write(void __iomem *reg, unsigned long data) static void bcm6358_led_write(void __iomem *reg, unsigned long data)
{ {
#ifdef CONFIG_CPU_BIG_ENDIAN
iowrite32be(data, reg); iowrite32be(data, reg);
#else
writel(data, reg);
#endif
} }
static unsigned long bcm6358_led_read(void __iomem *reg) static unsigned long bcm6358_led_read(void __iomem *reg)
{ {
#ifdef CONFIG_CPU_BIG_ENDIAN
return ioread32be(reg); return ioread32be(reg);
#else
return readl(reg);
#endif
} }
static unsigned long bcm6358_led_busy(void __iomem *mem) static unsigned long bcm6358_led_busy(void __iomem *mem)
......
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