X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/dac867236df7563d94f533920a95e8370a3a4c74..d4c3de0bb61cb8f738e892f4ae9f674d107ff7da:/target/linux/rdc/patches-2.6.30/002-rdc321x_gpio.patch diff --git a/target/linux/rdc/patches-2.6.30/002-rdc321x_gpio.patch b/target/linux/rdc/patches-2.6.30/002-rdc321x_gpio.patch index f2b96b32c..592d86ab0 100644 --- a/target/linux/rdc/patches-2.6.30/002-rdc321x_gpio.patch +++ b/target/linux/rdc/patches-2.6.30/002-rdc321x_gpio.patch @@ -8,11 +8,9 @@ Changes from v2: - use the pci_dev pointer passed as platform data - replaced rdc321x_pci_{read,write} -Index: linux-2.6.30.10/drivers/gpio/Kconfig -=================================================================== ---- linux-2.6.30.10.orig/drivers/gpio/Kconfig 2009-12-04 07:00:07.000000000 +0100 -+++ linux-2.6.30.10/drivers/gpio/Kconfig 2010-04-28 10:16:52.000000000 +0200 -@@ -161,6 +161,14 @@ +--- a/drivers/gpio/Kconfig ++++ b/drivers/gpio/Kconfig +@@ -161,6 +161,14 @@ config GPIO_BT8XX If unsure, say N. @@ -27,19 +25,15 @@ Index: linux-2.6.30.10/drivers/gpio/Kconfig comment "SPI GPIO expanders:" config GPIO_MAX7301 -Index: linux-2.6.30.10/drivers/gpio/Makefile -=================================================================== ---- linux-2.6.30.10.orig/drivers/gpio/Makefile 2009-12-04 07:00:07.000000000 +0100 -+++ linux-2.6.30.10/drivers/gpio/Makefile 2010-04-28 10:17:13.000000000 +0200 -@@ -12,3 +12,4 @@ +--- a/drivers/gpio/Makefile ++++ b/drivers/gpio/Makefile +@@ -12,3 +12,4 @@ obj-$(CONFIG_GPIO_PCF857X) += pcf857x.o obj-$(CONFIG_GPIO_TWL4030) += twl4030-gpio.o obj-$(CONFIG_GPIO_XILINX) += xilinx_gpio.o obj-$(CONFIG_GPIO_BT8XX) += bt8xxgpio.o +obj-$(CONFIG_GPIO_RDC321X) += rdc321x-gpio.o -Index: linux-2.6.30.10/drivers/gpio/rdc321x-gpio.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.30.10/drivers/gpio/rdc321x-gpio.c 2010-04-28 10:16:52.000000000 +0200 +--- /dev/null ++++ b/drivers/gpio/rdc321x-gpio.c @@ -0,0 +1,245 @@ +/* + * RDC321x GPIO driver @@ -115,7 +109,7 @@ Index: linux-2.6.30.10/drivers/gpio/rdc321x-gpio.c + gpch->data_reg[reg] &= ~(1 << (gpio & 0x1f)); + + pci_write_config_dword(gpch->sb_pdev, -+ reg ? gpch->reg1_data_base : gpch->reg2_data_base, ++ reg ? gpch->reg2_data_base : gpch->reg1_data_base, + gpch->data_reg[reg]); +} + @@ -177,7 +171,7 @@ Index: linux-2.6.30.10/drivers/gpio/rdc321x-gpio.c + struct rdc321x_gpio *rdc321x_gpio_dev; + struct rdc321x_gpio_pdata *pdata; + -+ pdata = pdev->dev.platform_data; ++ pdata = pdev->dev.driver_data; + if (!pdata) { + dev_err(&pdev->dev, "no platform data supplied\n"); + return -ENODEV; @@ -189,7 +183,7 @@ Index: linux-2.6.30.10/drivers/gpio/rdc321x-gpio.c + return -ENOMEM; + } + -+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gpio-reg1"); ++ r = platform_get_resource_byname(pdev, IORESOURCE_IO, "gpio-reg1"); + if (!r) { + dev_err(&pdev->dev, "failed to get gpio-reg1 resource\n"); + err = -ENODEV; @@ -201,7 +195,7 @@ Index: linux-2.6.30.10/drivers/gpio/rdc321x-gpio.c + rdc321x_gpio_dev->reg1_ctrl_base = r->start; + rdc321x_gpio_dev->reg1_data_base = r->start + 0x4; + -+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gpio-reg2"); ++ r = platform_get_resource_byname(pdev, IORESOURCE_IO, "gpio-reg2"); + if (!r) { + dev_err(&pdev->dev, "failed to get gpio-reg2 resource\n"); + err = -ENODEV;