diff options
author | Florian Fainelli <florian@openwrt.org> | 2010-05-15 21:26:56 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2010-05-15 21:26:56 +0000 |
commit | 62accf6c0400c35a8304165f3d8a73e91127abc1 (patch) | |
tree | ad299e5d847df5a0e9a3cb9ebbc3fae81d1c3c7a /target/linux/rdc/patches-2.6.32/002-rdc321x_gpio.patch | |
parent | 994b4517fa707007edaf5f9a127fedd7d07d0921 (diff) | |
download | master-187ad058-62accf6c0400c35a8304165f3d8a73e91127abc1.tar.gz master-187ad058-62accf6c0400c35a8304165f3d8a73e91127abc1.tar.bz2 master-187ad058-62accf6c0400c35a8304165f3d8a73e91127abc1.zip |
[rdc] fix panic on boot due to invalid IORESOURCE for MFD cells, fix gpio value setting
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21459 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rdc/patches-2.6.32/002-rdc321x_gpio.patch')
-rw-r--r-- | target/linux/rdc/patches-2.6.32/002-rdc321x_gpio.patch | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/target/linux/rdc/patches-2.6.32/002-rdc321x_gpio.patch b/target/linux/rdc/patches-2.6.32/002-rdc321x_gpio.patch index e1aa46e8a4..c2365b7bf5 100644 --- a/target/linux/rdc/patches-2.6.32/002-rdc321x_gpio.patch +++ b/target/linux/rdc/patches-2.6.32/002-rdc321x_gpio.patch @@ -8,9 +8,11 @@ Changes from v2: - use the pci_dev pointer passed as platform data - replaced rdc321x_pci_{read,write} ---- a/drivers/gpio/Kconfig -+++ b/drivers/gpio/Kconfig -@@ -196,6 +196,14 @@ config GPIO_LANGWELL +Index: linux-2.6.32.10/drivers/gpio/Kconfig +=================================================================== +--- linux-2.6.32.10.orig/drivers/gpio/Kconfig 2010-05-15 22:54:31.000000000 +0200 ++++ linux-2.6.32.10/drivers/gpio/Kconfig 2010-05-15 22:54:51.000000000 +0200 +@@ -196,6 +196,14 @@ help Say Y here to support Intel Moorestown platform GPIO. @@ -25,15 +27,19 @@ Changes from v2: comment "SPI GPIO expanders:" config GPIO_MAX7301 ---- a/drivers/gpio/Makefile -+++ b/drivers/gpio/Makefile -@@ -19,3 +19,4 @@ obj-$(CONFIG_GPIO_XILINX) += xilinx_gpio +Index: linux-2.6.32.10/drivers/gpio/Makefile +=================================================================== +--- linux-2.6.32.10.orig/drivers/gpio/Makefile 2010-05-15 22:54:31.000000000 +0200 ++++ linux-2.6.32.10/drivers/gpio/Makefile 2010-05-15 22:54:51.000000000 +0200 +@@ -19,3 +19,4 @@ obj-$(CONFIG_GPIO_BT8XX) += bt8xxgpio.o obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o obj-$(CONFIG_GPIO_WM831X) += wm831x-gpio.o +obj-$(CONFIG_GPIO_RDC321X) += rdc321x-gpio.o ---- /dev/null -+++ b/drivers/gpio/rdc321x-gpio.c +Index: linux-2.6.32.10/drivers/gpio/rdc321x-gpio.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.32.10/drivers/gpio/rdc321x-gpio.c 2010-05-15 22:55:10.000000000 +0200 @@ -0,0 +1,245 @@ +/* + * RDC321x GPIO driver @@ -109,7 +115,7 @@ Changes from v2: + 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]); +} + @@ -171,7 +177,7 @@ Changes from v2: + struct rdc321x_gpio *rdc321x_gpio_dev; + struct rdc321x_gpio_pdata *pdata; + -+ pdata = pdev->dev.platform_data; ++ pdata = platform_get_drvdata(pdev); + if (!pdata) { + dev_err(&pdev->dev, "no platform data supplied\n"); + return -ENODEV; @@ -183,7 +189,7 @@ Changes from v2: + 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; @@ -195,7 +201,7 @@ Changes from v2: + 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; |