diff options
| author | Richard Zhao <richard.zhao@freescale.com> | 2012-06-29 05:48:53 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-06 14:03:32 -0400 |
| commit | 77c4400f2f0fd8384ab5cbe41d81ccc664896b2d (patch) | |
| tree | c9c7b4016a4857ea819aab764de3d1d3778b473d /drivers/usb/chipidea | |
| parent | 6bf83594e3fa1b1147ed1baff356d4fd30846b84 (diff) | |
USB: Chipidea: rename struct ci13xxx_udc_driver to struct ci13xxx_platform_data
This patch rename struct ci13xxx_udc_driver and var with the type.
ci13xxx_platform_data reflect it's passed from platfrom driver.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
| -rw-r--r-- | drivers/usb/chipidea/ci.h | 4 | ||||
| -rw-r--r-- | drivers/usb/chipidea/ci13xxx_msm.c | 6 | ||||
| -rw-r--r-- | drivers/usb/chipidea/ci13xxx_pci.c | 20 | ||||
| -rw-r--r-- | drivers/usb/chipidea/core.c | 12 | ||||
| -rw-r--r-- | drivers/usb/chipidea/host.c | 2 | ||||
| -rw-r--r-- | drivers/usb/chipidea/udc.c | 24 |
6 files changed, 34 insertions, 34 deletions
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index 50911f8490d4..0b093308548d 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h | |||
| @@ -125,7 +125,7 @@ struct hw_bank { | |||
| 125 | * @remote_wakeup: host-enabled remote wakeup | 125 | * @remote_wakeup: host-enabled remote wakeup |
| 126 | * @suspended: suspended by host | 126 | * @suspended: suspended by host |
| 127 | * @test_mode: the selected test mode | 127 | * @test_mode: the selected test mode |
| 128 | * @udc_driver: platform specific information supplied by parent device | 128 | * @platdata: platform specific information supplied by parent device |
| 129 | * @vbus_active: is VBUS active | 129 | * @vbus_active: is VBUS active |
| 130 | * @transceiver: pointer to USB PHY, if any | 130 | * @transceiver: pointer to USB PHY, if any |
| 131 | * @hcd: pointer to usb_hcd for ehci host driver | 131 | * @hcd: pointer to usb_hcd for ehci host driver |
| @@ -158,7 +158,7 @@ struct ci13xxx { | |||
| 158 | u8 suspended; | 158 | u8 suspended; |
| 159 | u8 test_mode; | 159 | u8 test_mode; |
| 160 | 160 | ||
| 161 | struct ci13xxx_udc_driver *udc_driver; | 161 | struct ci13xxx_platform_data *platdata; |
| 162 | int vbus_active; | 162 | int vbus_active; |
| 163 | struct usb_phy *transceiver; | 163 | struct usb_phy *transceiver; |
| 164 | struct usb_hcd *hcd; | 164 | struct usb_hcd *hcd; |
diff --git a/drivers/usb/chipidea/ci13xxx_msm.c b/drivers/usb/chipidea/ci13xxx_msm.c index 11a7befdc4ef..12c0dd6a300c 100644 --- a/drivers/usb/chipidea/ci13xxx_msm.c +++ b/drivers/usb/chipidea/ci13xxx_msm.c | |||
| @@ -45,7 +45,7 @@ static void ci13xxx_msm_notify_event(struct ci13xxx *udc, unsigned event) | |||
| 45 | } | 45 | } |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | static struct ci13xxx_udc_driver ci13xxx_msm_udc_driver = { | 48 | static struct ci13xxx_platform_data ci13xxx_msm_platdata = { |
| 49 | .name = "ci13xxx_msm", | 49 | .name = "ci13xxx_msm", |
| 50 | .flags = CI13XXX_REGS_SHARED | | 50 | .flags = CI13XXX_REGS_SHARED | |
| 51 | CI13XXX_REQUIRE_TRANSCEIVER | | 51 | CI13XXX_REQUIRE_TRANSCEIVER | |
| @@ -75,8 +75,8 @@ static int __devinit ci13xxx_msm_probe(struct platform_device *pdev) | |||
| 75 | goto put_platform; | 75 | goto put_platform; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | ret = platform_device_add_data(plat_ci, &ci13xxx_msm_udc_driver, | 78 | ret = platform_device_add_data(plat_ci, &ci13xxx_msm_platdata, |
| 79 | sizeof(ci13xxx_msm_udc_driver)); | 79 | sizeof(ci13xxx_msm_platdata)); |
| 80 | if (ret) | 80 | if (ret) |
| 81 | goto put_platform; | 81 | goto put_platform; |
| 82 | 82 | ||
diff --git a/drivers/usb/chipidea/ci13xxx_pci.c b/drivers/usb/chipidea/ci13xxx_pci.c index e3dab27f5c75..cdcac3a0e94d 100644 --- a/drivers/usb/chipidea/ci13xxx_pci.c +++ b/drivers/usb/chipidea/ci13xxx_pci.c | |||
| @@ -23,17 +23,17 @@ | |||
| 23 | /****************************************************************************** | 23 | /****************************************************************************** |
| 24 | * PCI block | 24 | * PCI block |
| 25 | *****************************************************************************/ | 25 | *****************************************************************************/ |
| 26 | struct ci13xxx_udc_driver pci_driver = { | 26 | struct ci13xxx_platform_data pci_platdata = { |
| 27 | .name = UDC_DRIVER_NAME, | 27 | .name = UDC_DRIVER_NAME, |
| 28 | .capoffset = DEF_CAPOFFSET, | 28 | .capoffset = DEF_CAPOFFSET, |
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | struct ci13xxx_udc_driver langwell_pci_driver = { | 31 | struct ci13xxx_platform_data langwell_pci_platdata = { |
| 32 | .name = UDC_DRIVER_NAME, | 32 | .name = UDC_DRIVER_NAME, |
| 33 | .capoffset = 0, | 33 | .capoffset = 0, |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | struct ci13xxx_udc_driver penwell_pci_driver = { | 36 | struct ci13xxx_platform_data penwell_pci_platdata = { |
| 37 | .name = UDC_DRIVER_NAME, | 37 | .name = UDC_DRIVER_NAME, |
| 38 | .capoffset = 0, | 38 | .capoffset = 0, |
| 39 | .power_budget = 200, | 39 | .power_budget = 200, |
| @@ -51,12 +51,12 @@ struct ci13xxx_udc_driver penwell_pci_driver = { | |||
| 51 | static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev, | 51 | static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev, |
| 52 | const struct pci_device_id *id) | 52 | const struct pci_device_id *id) |
| 53 | { | 53 | { |
| 54 | struct ci13xxx_udc_driver *driver = (void *)id->driver_data; | 54 | struct ci13xxx_platform_data *platdata = (void *)id->driver_data; |
| 55 | struct platform_device *plat_ci; | 55 | struct platform_device *plat_ci; |
| 56 | struct resource res[3]; | 56 | struct resource res[3]; |
| 57 | int retval = 0, nres = 2; | 57 | int retval = 0, nres = 2; |
| 58 | 58 | ||
| 59 | if (!driver) { | 59 | if (!platdata) { |
| 60 | dev_err(&pdev->dev, "device doesn't provide driver data\n"); | 60 | dev_err(&pdev->dev, "device doesn't provide driver data\n"); |
| 61 | return -ENODEV; | 61 | return -ENODEV; |
| 62 | } | 62 | } |
| @@ -95,7 +95,7 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev, | |||
| 95 | goto put_platform; | 95 | goto put_platform; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | retval = platform_device_add_data(plat_ci, driver, sizeof(*driver)); | 98 | retval = platform_device_add_data(plat_ci, platdata, sizeof(*platdata)); |
| 99 | if (retval) | 99 | if (retval) |
| 100 | goto put_platform; | 100 | goto put_platform; |
| 101 | 101 | ||
| @@ -147,19 +147,19 @@ static void __devexit ci13xxx_pci_remove(struct pci_dev *pdev) | |||
| 147 | static DEFINE_PCI_DEVICE_TABLE(ci13xxx_pci_id_table) = { | 147 | static DEFINE_PCI_DEVICE_TABLE(ci13xxx_pci_id_table) = { |
| 148 | { | 148 | { |
| 149 | PCI_DEVICE(0x153F, 0x1004), | 149 | PCI_DEVICE(0x153F, 0x1004), |
| 150 | .driver_data = (kernel_ulong_t)&pci_driver, | 150 | .driver_data = (kernel_ulong_t)&pci_platdata, |
| 151 | }, | 151 | }, |
| 152 | { | 152 | { |
| 153 | PCI_DEVICE(0x153F, 0x1006), | 153 | PCI_DEVICE(0x153F, 0x1006), |
| 154 | .driver_data = (kernel_ulong_t)&pci_driver, | 154 | .driver_data = (kernel_ulong_t)&pci_platdata, |
| 155 | }, | 155 | }, |
| 156 | { | 156 | { |
| 157 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0811), | 157 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0811), |
| 158 | .driver_data = (kernel_ulong_t)&langwell_pci_driver, | 158 | .driver_data = (kernel_ulong_t)&langwell_pci_platdata, |
| 159 | }, | 159 | }, |
| 160 | { | 160 | { |
| 161 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0829), | 161 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0829), |
| 162 | .driver_data = (kernel_ulong_t)&penwell_pci_driver, | 162 | .driver_data = (kernel_ulong_t)&penwell_pci_platdata, |
| 163 | }, | 163 | }, |
| 164 | { 0, 0, 0, 0, 0, 0, 0 /* end: all zeroes */ } | 164 | { 0, 0, 0, 0, 0, 0, 0 /* end: all zeroes */ } |
| 165 | }; | 165 | }; |
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 15e03b308f8a..9a883bd5e113 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c | |||
| @@ -179,7 +179,7 @@ static int hw_device_init(struct ci13xxx *ci, void __iomem *base) | |||
| 179 | ci->hw_bank.abs = base; | 179 | ci->hw_bank.abs = base; |
| 180 | 180 | ||
| 181 | ci->hw_bank.cap = ci->hw_bank.abs; | 181 | ci->hw_bank.cap = ci->hw_bank.abs; |
| 182 | ci->hw_bank.cap += ci->udc_driver->capoffset; | 182 | ci->hw_bank.cap += ci->platdata->capoffset; |
| 183 | ci->hw_bank.op = ci->hw_bank.cap + ioread8(ci->hw_bank.cap); | 183 | ci->hw_bank.op = ci->hw_bank.cap + ioread8(ci->hw_bank.cap); |
| 184 | 184 | ||
| 185 | hw_alloc_regmap(ci, false); | 185 | hw_alloc_regmap(ci, false); |
| @@ -227,11 +227,11 @@ int hw_device_reset(struct ci13xxx *ci, u32 mode) | |||
| 227 | udelay(10); /* not RTOS friendly */ | 227 | udelay(10); /* not RTOS friendly */ |
| 228 | 228 | ||
| 229 | 229 | ||
| 230 | if (ci->udc_driver->notify_event) | 230 | if (ci->platdata->notify_event) |
| 231 | ci->udc_driver->notify_event(ci, | 231 | ci->platdata->notify_event(ci, |
| 232 | CI13XXX_CONTROLLER_RESET_EVENT); | 232 | CI13XXX_CONTROLLER_RESET_EVENT); |
| 233 | 233 | ||
| 234 | if (ci->udc_driver->flags & CI13XXX_DISABLE_STREAMING) | 234 | if (ci->platdata->flags & CI13XXX_DISABLE_STREAMING) |
| 235 | hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS); | 235 | hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS); |
| 236 | |||
