mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 11:44:01 +08:00
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>
This commit is contained in:
parent
a06cd4b762
commit
4ba113b6d4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user