diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2006-09-18 22:23:07 (GMT) |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-25 09:25:47 (GMT) |
commit | 72edd84a6b2db1a21d1ed07929cae560e276a0a6 (patch) | |
tree | b67000e2bbf7447968c784cc3696a680ad66c47e /include/asm-arm/hardware/iop3xx.h | |
parent | 610300e8f4f833904096ca1233ffd9dbd73fb11f (diff) | |
download | linux-fsl-qoriq-72edd84a6b2db1a21d1ed07929cae560e276a0a6.tar.xz |
[ARM] 3827/1: iop3xx: add common gpio module
Implement the gpio_line_{config,get,set} API for iop3xx.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/hardware/iop3xx.h')
-rw-r--r-- | include/asm-arm/hardware/iop3xx.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index 98b7cbc..f3c61d0 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h @@ -16,6 +16,22 @@ #define __IOP3XX_H /* + * IOP3XX GPIO handling + */ +#define GPIO_IN 0 +#define GPIO_OUT 1 +#define GPIO_LOW 0 +#define GPIO_HIGH 1 +#define IOP3XX_GPIO_LINE(x) (x) + +#ifndef __ASSEMBLY__ +extern void gpio_line_config(int line, int direction); +extern int gpio_line_get(int line); +extern void gpio_line_set(int line, int value); +#endif + + +/* * IOP3XX processor registers */ #define IOP3XX_PERIPHERAL_PHYS_BASE 0xffffe000 @@ -81,6 +97,11 @@ #define IOP3XX_PCIXSR (volatile u32 *)IOP3XX_REG_ADDR(0x01e4) #define IOP3XX_PCIIRSR (volatile u32 *)IOP3XX_REG_ADDR(0x01ec) +/* General Purpose I/O */ +#define IOP3XX_GPOE (volatile u32 *)IOP3XX_GPIO_REG(0x0004) +#define IOP3XX_GPID (volatile u32 *)IOP3XX_GPIO_REG(0x0008) +#define IOP3XX_GPOD (volatile u32 *)IOP3XX_GPIO_REG(0x000c) + /* Timers */ #define IOP3XX_TU_TMR0 (volatile u32 *)IOP3XX_TIMER_REG(0x0000) #define IOP3XX_TU_TMR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0004) |