+ .name = "wdt-reg",
+ .start = RDC321X_WDT_CTRL,
+ .end = RDC321X_WDT_CTRL + 0x3,
+ .name = "wdt-reg",
+ .start = RDC321X_WDT_CTRL,
+ .end = RDC321X_WDT_CTRL + 0x3,
-+ .flags = IORESOURCE_MEM,
++ .flags = IORESOURCE_IO,
+ .name = "gpio-reg1",
+ .start = RDC321X_GPIO_CTRL_REG1,
+ .end = RDC321X_GPIO_CTRL_REG1 + 0x7,
+ .name = "gpio-reg1",
+ .start = RDC321X_GPIO_CTRL_REG1,
+ .end = RDC321X_GPIO_CTRL_REG1 + 0x7,
-+ .flags = IORESOURCE_MEM,
++ .flags = IORESOURCE_IO,
+ }, {
+ .name = "gpio-reg2",
+ .start = RDC321X_GPIO_CTRL_REG2,
+ .end = RDC321X_GPIO_CTRL_REG2 + 0x7,
+ }, {
+ .name = "gpio-reg2",
+ .start = RDC321X_GPIO_CTRL_REG2,
+ .end = RDC321X_GPIO_CTRL_REG2 + 0x7,
-+ .flags = IORESOURCE_MEM,
++ .flags = IORESOURCE_IO,
+ gpch->data_reg[reg] &= ~(1 << (gpio & 0x1f));
+
+ pci_write_config_dword(gpch->sb_pdev,
+ 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]);
+}
+
+ gpch->data_reg[reg]);
+}
+
+ struct rdc321x_gpio *rdc321x_gpio_dev;
+ struct rdc321x_gpio_pdata *pdata;
+
+ 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;
+ if (!pdata) {
+ dev_err(&pdev->dev, "no platform data supplied\n");
+ return -ENODEV;
-+ 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;
+ if (!r) {
+ dev_err(&pdev->dev, "failed to get gpio-reg1 resource\n");
+ err = -ENODEV;
+ rdc321x_gpio_dev->reg1_ctrl_base = r->start;
+ rdc321x_gpio_dev->reg1_data_base = r->start + 0x4;
+
+ 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;
+ if (!r) {
+ dev_err(&pdev->dev, "failed to get gpio-reg2 resource\n");
+ err = -ENODEV;
+ struct resource *r;
+ struct rdc321x_wdt_pdata *pdata;
+
+ struct resource *r;
+ struct rdc321x_wdt_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;
+ }
+
+ if (!pdata) {
+ dev_err(&pdev->dev, "no platform data supplied\n");
+ return -ENODEV;
+ }
+
-+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wdt-reg");
++ r = platform_get_resource_byname(pdev, IORESOURCE_IO, "wdt-reg");
+ if (!r) {
+ dev_err(&pdev->dev, "failed to get wdt-reg resource\n");
+ return -ENODEV;
+ if (!r) {
+ dev_err(&pdev->dev, "failed to get wdt-reg resource\n");
+ return -ENODEV;
- removed pci_dev accessors
- use DEFINE_PCI_DEVICE_TABLE
- removed pci_dev accessors
- use DEFINE_PCI_DEVICE_TABLE
---- a/drivers/mfd/Kconfig
-+++ b/drivers/mfd/Kconfig
-@@ -305,6 +305,15 @@ config EZX_PCAP
+Index: linux-2.6.32.10/drivers/mfd/Kconfig
+===================================================================
+--- linux-2.6.32.10.orig/drivers/mfd/Kconfig 2010-03-15 16:52:04.000000000 +0100
++++ linux-2.6.32.10/drivers/mfd/Kconfig 2010-05-15 21:48:27.000000000 +0200
+@@ -305,6 +305,15 @@
This enables the PCAP ASIC present on EZX Phones. This is
needed for MMC, TouchScreen, Sound, USB, etc..
This enables the PCAP ASIC present on EZX Phones. This is
needed for MMC, TouchScreen, Sound, USB, etc..
endmenu
menu "Multimedia Capabilities Port drivers"
endmenu
menu "Multimedia Capabilities Port drivers"
---- a/drivers/mfd/Makefile
-+++ b/drivers/mfd/Makefile
-@@ -50,3 +50,5 @@ obj-$(CONFIG_PCF50633_ADC) += pcf50633-a
+Index: linux-2.6.32.10/drivers/mfd/Makefile
+===================================================================
+--- linux-2.6.32.10.orig/drivers/mfd/Makefile 2010-03-15 16:52:04.000000000 +0100
++++ linux-2.6.32.10/drivers/mfd/Makefile 2010-05-15 21:48:27.000000000 +0200
+@@ -50,3 +50,5 @@
obj-$(CONFIG_PCF50633_GPIO) += pcf50633-gpio.o
obj-$(CONFIG_AB3100_CORE) += ab3100-core.o
obj-$(CONFIG_AB3100_OTP) += ab3100-otp.o
+
+obj-$(CONFIG_MFD_RDC321X) += rdc321x-southbridge.o
obj-$(CONFIG_PCF50633_GPIO) += pcf50633-gpio.o
obj-$(CONFIG_AB3100_CORE) += ab3100-core.o
obj-$(CONFIG_AB3100_OTP) += ab3100-otp.o
+
+obj-$(CONFIG_MFD_RDC321X) += rdc321x-southbridge.o
---- /dev/null
-+++ b/drivers/mfd/rdc321x-southbridge.c
+Index: linux-2.6.32.10/drivers/mfd/rdc321x-southbridge.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.32.10/drivers/mfd/rdc321x-southbridge.c 2010-05-15 22:53:39.000000000 +0200
@@ -0,0 +1,123 @@
+/*
+ * RDC321x MFD southbrige driver
@@ -0,0 +1,123 @@
+/*
+ * RDC321x MFD southbrige driver
+ .name = "wdt-reg",
+ .start = RDC321X_WDT_CTRL,
+ .end = RDC321X_WDT_CTRL + 0x3,
+ .name = "wdt-reg",
+ .start = RDC321X_WDT_CTRL,
+ .end = RDC321X_WDT_CTRL + 0x3,
-+ .flags = IORESOURCE_MEM,
++ .flags = IORESOURCE_IO,
+ .name = "gpio-reg1",
+ .start = RDC321X_GPIO_CTRL_REG1,
+ .end = RDC321X_GPIO_CTRL_REG1 + 0x7,
+ .name = "gpio-reg1",
+ .start = RDC321X_GPIO_CTRL_REG1,
+ .end = RDC321X_GPIO_CTRL_REG1 + 0x7,
-+ .flags = IORESOURCE_MEM,
++ .flags = IORESOURCE_IO,
+ }, {
+ .name = "gpio-reg2",
+ .start = RDC321X_GPIO_CTRL_REG2,
+ .end = RDC321X_GPIO_CTRL_REG2 + 0x7,
+ }, {
+ .name = "gpio-reg2",
+ .start = RDC321X_GPIO_CTRL_REG2,
+ .end = RDC321X_GPIO_CTRL_REG2 + 0x7,
-+ .flags = IORESOURCE_MEM,
++ .flags = IORESOURCE_IO,
+MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("RDC R-321x MFD southbridge driver");
+MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("RDC R-321x MFD southbridge driver");
---- /dev/null
-+++ b/include/linux/mfd/rdc321x.h
+Index: linux-2.6.32.10/include/linux/mfd/rdc321x.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.32.10/include/linux/mfd/rdc321x.h 2010-05-15 21:48:27.000000000 +0200
@@ -0,0 +1,26 @@
+#ifndef __RDC321X_MFD_H
+#define __RDC321X_MFD_H
@@ -0,0 +1,26 @@
+#ifndef __RDC321X_MFD_H
+#define __RDC321X_MFD_H
- use the pci_dev pointer passed as platform data
- replaced rdc321x_pci_{read,write}
- 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.
help
Say Y here to support Intel Moorestown platform GPIO.
comment "SPI GPIO expanders:"
config GPIO_MAX7301
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
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
@@ -0,0 +1,245 @@
+/*
+ * RDC321x GPIO driver
+ gpch->data_reg[reg] &= ~(1 << (gpio & 0x1f));
+
+ pci_write_config_dword(gpch->sb_pdev,
+ 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]);
+}
+
+ gpch->data_reg[reg]);
+}
+
+ struct rdc321x_gpio *rdc321x_gpio_dev;
+ struct rdc321x_gpio_pdata *pdata;
+
+ 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;
+ if (!pdata) {
+ dev_err(&pdev->dev, "no platform data supplied\n");
+ return -ENODEV;
-+ 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;
+ if (!r) {
+ dev_err(&pdev->dev, "failed to get gpio-reg1 resource\n");
+ err = -ENODEV;
+ rdc321x_gpio_dev->reg1_ctrl_base = r->start;
+ rdc321x_gpio_dev->reg1_data_base = r->start + 0x4;
+
+ 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;
+ if (!r) {
+ dev_err(&pdev->dev, "failed to get gpio-reg2 resource\n");
+ err = -ENODEV;
- replaced rdc321x_pci_{read,write}
- use the pci_dev pointer passed as platform_data
- replaced rdc321x_pci_{read,write}
- use the pci_dev pointer passed as platform_data
---- a/drivers/watchdog/rdc321x_wdt.c
-+++ b/drivers/watchdog/rdc321x_wdt.c
+Index: linux-2.6.32.10/drivers/watchdog/rdc321x_wdt.c
+===================================================================
+--- linux-2.6.32.10.orig/drivers/watchdog/rdc321x_wdt.c 2010-05-15 22:14:28.000000000 +0200
++++ linux-2.6.32.10/drivers/watchdog/rdc321x_wdt.c 2010-05-15 22:15:24.000000000 +0200
@@ -1,7 +1,7 @@
/*
* RDC321x watchdog driver
@@ -1,7 +1,7 @@
/*
* RDC321x watchdog driver
#define RDC_WDT_MASK 0x80000000 /* Mask */
#define RDC_WDT_EN 0x00800000 /* Enable bit */
#define RDC_WDT_MASK 0x80000000 /* Mask */
#define RDC_WDT_EN 0x00800000 /* Enable bit */
-@@ -63,6 +62,8 @@ static struct {
int default_ticks;
unsigned long inuse;
spinlock_t lock;
int default_ticks;
unsigned long inuse;
spinlock_t lock;
} rdc321x_wdt_device;
/* generic helper functions */
} rdc321x_wdt_device;
/* generic helper functions */
-@@ -70,14 +71,18 @@ static struct {
static void rdc321x_wdt_trigger(unsigned long unused)
{
unsigned long flags;
static void rdc321x_wdt_trigger(unsigned long unused)
{
unsigned long flags;
spin_unlock_irqrestore(&rdc321x_wdt_device.lock, flags);
/* requeue?? */
spin_unlock_irqrestore(&rdc321x_wdt_device.lock, flags);
/* requeue?? */
-@@ -105,10 +110,13 @@ static void rdc321x_wdt_start(void)
/* Clear the timer */
spin_lock_irqsave(&rdc321x_wdt_device.lock, flags);
/* Clear the timer */
spin_lock_irqsave(&rdc321x_wdt_device.lock, flags);
spin_unlock_irqrestore(&rdc321x_wdt_device.lock, flags);
mod_timer(&rdc321x_wdt_device.timer,
spin_unlock_irqrestore(&rdc321x_wdt_device.lock, flags);
mod_timer(&rdc321x_wdt_device.timer,
-@@ -148,7 +156,7 @@ static long rdc321x_wdt_ioctl(struct fil
unsigned long arg)
{
void __user *argp = (void __user *)arg;
unsigned long arg)
{
void __user *argp = (void __user *)arg;
static struct watchdog_info ident = {
.options = WDIOF_CARDRESET,
.identity = "RDC321x WDT",
static struct watchdog_info ident = {
.options = WDIOF_CARDRESET,
.identity = "RDC321x WDT",
-@@ -162,9 +170,10 @@ static long rdc321x_wdt_ioctl(struct fil
case WDIOC_GETSTATUS:
/* Read the value from the DATA register */
spin_lock_irqsave(&rdc321x_wdt_device.lock, flags);
case WDIOC_GETSTATUS:
/* Read the value from the DATA register */
spin_lock_irqsave(&rdc321x_wdt_device.lock, flags);
return -EFAULT;
break;
case WDIOC_GETSUPPORT:
return -EFAULT;
break;
case WDIOC_GETSUPPORT:
-@@ -219,17 +228,35 @@ static struct miscdevice rdc321x_wdt_mis
static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
{
int err;
+ struct resource *r;
+ struct rdc321x_wdt_pdata *pdata;
+
static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
{
int err;
+ struct resource *r;
+ struct rdc321x_wdt_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;
+ }
+
+ if (!pdata) {
+ dev_err(&pdev->dev, "no platform data supplied\n");
+ return -ENODEV;
+ }
+
-+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wdt-reg");
++ r = platform_get_resource_byname(pdev, IORESOURCE_IO, "wdt-reg");
+ if (!r) {
+ dev_err(&pdev->dev, "failed to get wdt-reg resource\n");
+ return -ENODEV;
+ if (!r) {
+ dev_err(&pdev->dev, "failed to get wdt-reg resource\n");
+ return -ENODEV;
init_completion(&rdc321x_wdt_device.stop);
rdc321x_wdt_device.queue = 0;
init_completion(&rdc321x_wdt_device.stop);
rdc321x_wdt_device.queue = 0;
-@@ -240,7 +267,7 @@ static int __devinit rdc321x_wdt_probe(s
rdc321x_wdt_device.default_ticks = ticks;
rdc321x_wdt_device.default_ticks = ticks;