X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Flinux%2Fixp4xx%2Fpatches-3.18%2F030-gpio_line_config.patch;h=0e51793273350ed8a8a6ecb1afc106d69c25b45e;hp=0477b3863d901619c6f7765382ef979204dce5fc;hb=8c822ec4ca7557563370aa568c034edda81e6b6e;hpb=ed84ceaa02386efa5eb46ac24abb644a1d176cfd;ds=sidebyside 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..0e51793273 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 @@ void __init ixp4xx_map_io(void) /* * 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 @@ static void gpio_line_config(u8 line, u3 *IXP4XX_GPIO_GPOER &= ~(1 << line); } @@ -37,8 +37,16 @@ -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;