diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpio-xilinx.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index 626eaa876f09..791ddaedbfb4 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c | |||
@@ -30,8 +30,13 @@ | |||
30 | #define XGPIO_CHANNEL_OFFSET 0x8 | 30 | #define XGPIO_CHANNEL_OFFSET 0x8 |
31 | 31 | ||
32 | /* Read/Write access to the GPIO registers */ | 32 | /* Read/Write access to the GPIO registers */ |
33 | #define xgpio_readreg(offset) in_be32(offset) | 33 | #ifdef CONFIG_ARCH_ZYNQ |
34 | #define xgpio_writereg(offset, val) out_be32(offset, val) | 34 | # define xgpio_readreg(offset) readl(offset) |
35 | # define xgpio_writereg(offset, val) writel(val, offset) | ||
36 | #else | ||
37 | # define xgpio_readreg(offset) __raw_readl(offset) | ||
38 | # define xgpio_writereg(offset, val) __raw_writel(val, offset) | ||
39 | #endif | ||
35 | 40 | ||
36 | /** | 41 | /** |
37 | * struct xgpio_instance - Stores information about GPIO device | 42 | * struct xgpio_instance - Stores information about GPIO device |