diff options
author | Barry Song <Baohua.Song@csr.com> | 2012-06-19 09:00:05 +0200 |
---|---|---|
committer | Barry Song <Barry.Song@csr.com> | 2012-07-02 04:59:07 +0200 |
commit | 5130216265f6f924a4ba8214787241be96d93467 (patch) | |
tree | 8e05e98068f0380376735a8575af9bb42ab27502 /arch/arm | |
parent | Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm (diff) | |
download | linux-5130216265f6f924a4ba8214787241be96d93467.tar.xz linux-5130216265f6f924a4ba8214787241be96d93467.zip |
PINCTRL: SiRF: add GPIO and GPIO irq support in CSR SiRFprimaII
In SiRFprimaII, Each GPIO pin can be configured as input or output
independently. If a GPIO is configured as input, it can also be
enabled as an interrupt source (either edge or level triggered).
These pins must be either MUXed as GPIO or other function pads.
Signed-off-by: Yuping Luo <yuping.luo@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/gpio.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-prima2/include/mach/irqs.h | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a91009c61870..571b3d25c9bc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -389,6 +389,7 @@ config ARCH_PRIMA2 bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform" select CPU_V7 select NO_IOPORT + select ARCH_WANT_OPTIONAL_GPIOLIB select GENERIC_CLOCKEVENTS select CLKDEV_LOOKUP select GENERIC_IRQ_CHIP diff --git a/arch/arm/mach-prima2/include/mach/gpio.h b/arch/arm/mach-prima2/include/mach/gpio.h new file mode 100644 index 000000000000..1904bb03876e --- /dev/null +++ b/arch/arm/mach-prima2/include/mach/gpio.h @@ -0,0 +1,13 @@ +#ifndef __MACH_GPIO_H +#define __MACH_GPIO_H + +/* Pull up/down values */ +enum sirfsoc_gpio_pull { + SIRFSOC_GPIO_PULL_NONE, + SIRFSOC_GPIO_PULL_UP, + SIRFSOC_GPIO_PULL_DOWN, +}; + +void sirfsoc_gpio_set_pull(unsigned gpio, unsigned mode); + +#endif diff --git a/arch/arm/mach-prima2/include/mach/irqs.h b/arch/arm/mach-prima2/include/mach/irqs.h index bb354f952fd6..f6014a07541f 100644 --- a/arch/arm/mach-prima2/include/mach/irqs.h +++ b/arch/arm/mach-prima2/include/mach/irqs.h @@ -11,7 +11,7 @@ #define SIRFSOC_INTENAL_IRQ_START 0 #define SIRFSOC_INTENAL_IRQ_END 59 - +#define SIRFSOC_GPIO_IRQ_START (SIRFSOC_INTENAL_IRQ_END + 1) #define NR_IRQS 220 #endif |