mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[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
This commit is contained in:
@@ -109,7 +109,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 +171,7 @@ Changes from v2:
|
||||
+ 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;
|
||||
@@ -183,7 +183,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 +195,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;
|
||||
|
||||
Reference in New Issue
Block a user