diff options
author | Álvaro Fernández Rojas | 2015-12-15 21:03:50 +0100 |
---|---|---|
committer | Jacek Anaszewski | 2016-01-04 09:57:40 +0100 |
commit | 4ba113b6d4a4cec461e373aca44ce6bb2cb02476 (patch) | |
tree | 576e849d2fdf2beb5bec4cfb922a149bd6167706 /drivers/leds | |
parent | a06cd4b76277bd319d65646481cb61aa3fd89b3b (diff) |
leds: bcm6358: add little endian support
This adds little endian support while keeping big endian support.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-bcm6358.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/leds/leds-bcm6358.c b/drivers/leds/leds-bcm6358.c index ab09ea453120..ffc978dd69f3 100644 --- a/drivers/leds/leds-bcm6358.c +++ b/drivers/leds/leds-bcm6358.c @@ -49,12 +49,20 @@ struct bcm6358_led { static void bcm6358_led_write(void __iomem *reg, unsigned long data) { +#ifdef CONFIG_CPU_BIG_ENDIAN iowrite32be(data, reg); +#else + writel(data, reg); +#endif } static unsigned long bcm6358_led_read(void __iomem *reg) { +#ifdef CONFIG_CPU_BIG_ENDIAN return ioread32be(reg); +#else + return readl(reg); +#endif } static unsigned long bcm6358_led_busy(void __iomem *mem) |