aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-02-13 10:54:01 +0000
committerJohn Crispin <blogic@openwrt.org>2015-02-13 10:54:01 +0000
commit1c8c37a44a362018420808f526d3a984a96349ef (patch)
tree526f3fd2bb3d6bb12acdcd99ae2b233c4e717cc5 /target/linux
parentb79d1ca819a2f74eccce637d17d4a69d9d899c75 (diff)
downloadupstream-1c8c37a44a362018420808f526d3a984a96349ef.tar.gz
upstream-1c8c37a44a362018420808f526d3a984a96349ef.tar.bz2
upstream-1c8c37a44a362018420808f526d3a984a96349ef.zip
ixp4xx: fix gpio_line_set() logic, fixes #18986
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44439 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ixp4xx/patches-3.18/030-gpio_line_config.patch18
1 files changed, 13 insertions, 5 deletions
diff --git a/target/linux/ixp4xx/patches-3.18/030-gpio_line_config.patch b/target/linux/ixp4xx/patches-3.18/030-gpio_line_config.patch
index 0477b3863d..c71ffd6b76 100644
--- a/target/linux/ixp4xx/patches-3.18/030-gpio_line_config.patch
+++ b/target/linux/ixp4xx/patches-3.18/030-gpio_line_config.patch
@@ -1,6 +1,6 @@
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
-@@ -84,22 +84,7 @@ void __init ixp4xx_map_io(void)
+@@ -93,22 +93,7 @@
/*
* GPIO-functions
*/
@@ -24,7 +24,7 @@
{
if (direction == IXP4XX_GPIO_IN)
*IXP4XX_GPIO_GPOER |= (1 << line);
-@@ -107,12 +92,12 @@ static void gpio_line_config(u8 line, u3
+@@ -116,17 +101,17 @@
*IXP4XX_GPIO_GPOER &= ~(1 << line);
}
@@ -37,11 +37,19 @@
-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);
+- if (value == IXP4XX_GPIO_HIGH)
+- *IXP4XX_GPIO_GPOUTR |= (1 << line);
+- else if (value == IXP4XX_GPIO_LOW)
++ if (value == IXP4XX_GPIO_LOW)
+ *IXP4XX_GPIO_GPOUTR &= ~(1 << line);
++ else
++ *IXP4XX_GPIO_GPOUTR |= (1 << line);
+ }
+
+ /*************************************************************************
--- a/arch/arm/mach-ixp4xx/include/mach/platform.h
+++ b/arch/arm/mach-ixp4xx/include/mach/platform.h
-@@ -131,5 +131,21 @@ struct pci_sys_data;
+@@ -131,5 +131,21 @@
extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
extern struct pci_ops ixp4xx_ops;