diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2015-12-15 21:03:49 +0100 |
---|---|---|
committer | Jacek Anaszewski <j.anaszewski@samsung.com> | 2016-01-04 09:57:40 +0100 |
commit | a06cd4b76277bd319d65646481cb61aa3fd89b3b (patch) | |
tree | 48be9efc39b77a532d06c6510d61d9339c7114cb /drivers/leds | |
parent | 93a708dab8175c57977d5eec757dd559128f2353 (diff) | |
download | linux-a06cd4b76277bd319d65646481cb61aa3fd89b3b.tar.gz linux-a06cd4b76277bd319d65646481cb61aa3fd89b3b.tar.bz2 linux-a06cd4b76277bd319d65646481cb61aa3fd89b3b.zip |
leds: bcm6328: 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-bcm6328.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/leds/leds-bcm6328.c b/drivers/leds/leds-bcm6328.c index cd542641e38d..e13daa2f31fb 100644 --- a/drivers/leds/leds-bcm6328.c +++ b/drivers/leds/leds-bcm6328.c @@ -76,12 +76,20 @@ struct bcm6328_led { static void bcm6328_led_write(void __iomem *reg, unsigned long data) { +#ifdef CONFIG_CPU_BIG_ENDIAN iowrite32be(data, reg); +#else + writel(data, reg); +#endif } static unsigned long bcm6328_led_read(void __iomem *reg) { +#ifdef CONFIG_CPU_BIG_ENDIAN return ioread32be(reg); +#else + return readl(reg); +#endif } /** |