diff options
author | John Crispin <blogic@openwrt.org> | 2014-12-01 16:14:21 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-12-01 16:14:21 +0000 |
commit | 96467d69fb920444ec9bd05d47d7b34602fc1ce8 (patch) | |
tree | c45013cbe48192b03cd2099a4b966e865f9c191a /target/linux/ixp4xx/patches-3.14/030-gpio_line_config.patch | |
parent | 11834dc50aa3d2d202dadfd73f869044b210e602 (diff) | |
download | master-187ad058-96467d69fb920444ec9bd05d47d7b34602fc1ce8.tar.gz master-187ad058-96467d69fb920444ec9bd05d47d7b34602fc1ce8.tar.bz2 master-187ad058-96467d69fb920444ec9bd05d47d7b34602fc1ce8.zip |
ixp4xx: add 3.14 support
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43464 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ixp4xx/patches-3.14/030-gpio_line_config.patch')
-rw-r--r-- | target/linux/ixp4xx/patches-3.14/030-gpio_line_config.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/patches-3.14/030-gpio_line_config.patch b/target/linux/ixp4xx/patches-3.14/030-gpio_line_config.patch new file mode 100644 index 0000000000..de9197c9f8 --- /dev/null +++ b/target/linux/ixp4xx/patches-3.14/030-gpio_line_config.patch @@ -0,0 +1,69 @@ +Index: linux-3.14.25/arch/arm/mach-ixp4xx/common.c +=================================================================== +--- linux-3.14.25.orig/arch/arm/mach-ixp4xx/common.c 2014-11-21 18:23:44.000000000 +0100 ++++ linux-3.14.25/arch/arm/mach-ixp4xx/common.c 2014-12-01 07:16:02.172180453 +0100 +@@ -84,22 +84,7 @@ + /* + * GPIO-functions + */ +-/* +- * The following converted to the real HW bits the gpio_line_config +- */ +-/* GPIO pin types */ +-#define IXP4XX_GPIO_OUT 0x1 +-#define IXP4XX_GPIO_IN 0x2 +- +-/* GPIO signal types */ +-#define IXP4XX_GPIO_LOW 0 +-#define IXP4XX_GPIO_HIGH 1 +- +-/* GPIO Clocks */ +-#define IXP4XX_GPIO_CLK_0 14 +-#define IXP4XX_GPIO_CLK_1 15 +- +-static void gpio_line_config(u8 line, u32 direction) ++void gpio_line_config(u8 line, u32 direction) + { + if (direction == IXP4XX_GPIO_IN) + *IXP4XX_GPIO_GPOER |= (1 << line); +@@ -107,12 +92,12 @@ + *IXP4XX_GPIO_GPOER &= ~(1 << line); + } + +-static void gpio_line_get(u8 line, int *value) ++void gpio_line_get(u8 line, int *value) + { + *value = (*IXP4XX_GPIO_GPINR >> line) & 0x1; + } + +-static void gpio_line_set(u8 line, int value) ++void gpio_line_set(u8 line, int value) + { + if (value == IXP4XX_GPIO_HIGH) + *IXP4XX_GPIO_GPOUTR |= (1 << line); +Index: linux-3.14.25/arch/arm/mach-ixp4xx/include/mach/platform.h +=================================================================== +--- linux-3.14.25.orig/arch/arm/mach-ixp4xx/include/mach/platform.h 2014-11-30 15:26:43.020130937 +0100 ++++ linux-3.14.25/arch/arm/mach-ixp4xx/include/mach/platform.h 2014-12-01 07:16:22.024919689 +0100 +@@ -142,5 +142,21 @@ + extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); + extern struct pci_ops ixp4xx_ops; + ++/* GPIO pin types */ ++#define IXP4XX_GPIO_OUT 0x1 ++#define IXP4XX_GPIO_IN 0x2 ++ ++/* GPIO signal types */ ++#define IXP4XX_GPIO_LOW 0 ++#define IXP4XX_GPIO_HIGH 1 ++ ++/* GPIO Clocks */ ++#define IXP4XX_GPIO_CLK_0 14 ++#define IXP4XX_GPIO_CLK_1 15 ++ ++void gpio_line_config(u8 line, u32 direction); ++void gpio_line_get(u8 line, int *value); ++void gpio_line_set(u8 line, int value); ++ + #endif // __ASSEMBLY__ + |