diff options
| -rw-r--r-- | drivers/usb/chipidea/ci.h | 5 | ||||
| -rw-r--r-- | drivers/usb/chipidea/ci_hdrc_imx.c | 2 | ||||
| -rw-r--r-- | drivers/usb/chipidea/ci_hdrc_msm.c | 8 | ||||
| -rw-r--r-- | drivers/usb/chipidea/core.c | 20 | ||||
| -rw-r--r-- | drivers/usb/chipidea/debug.c | 2 | ||||
| -rw-r--r-- | drivers/usb/chipidea/host.c | 7 | ||||
| -rw-r--r-- | drivers/usb/chipidea/otg_fsm.c | 16 | ||||
| -rw-r--r-- | drivers/usb/chipidea/udc.c | 4 | ||||
| -rw-r--r-- | drivers/usb/core/hcd.c | 7 | ||||
| -rw-r--r-- | include/linux/usb/chipidea.h | 2 |
10 files changed, 33 insertions, 40 deletions
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index ea40626e0246..9015139a8027 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h | |||
| @@ -161,7 +161,7 @@ struct hw_bank { | |||
| 161 | * @test_mode: the selected test mode | 161 | * @test_mode: the selected test mode |
| 162 | * @platdata: platform specific information supplied by parent device | 162 | * @platdata: platform specific information supplied by parent device |
| 163 | * @vbus_active: is VBUS active | 163 | * @vbus_active: is VBUS active |
| 164 | * @transceiver: pointer to USB PHY, if any | 164 | * @usb_phy: pointer to USB PHY, if any |
| 165 | * @hcd: pointer to usb_hcd for ehci host driver | 165 | * @hcd: pointer to usb_hcd for ehci host driver |
| 166 | * @debugfs: root dentry for this controller in debugfs | 166 | * @debugfs: root dentry for this controller in debugfs |
| 167 | * @id_event: indicates there is an id event, and handled at ci_otg_work | 167 | * @id_event: indicates there is an id event, and handled at ci_otg_work |
| @@ -177,6 +177,7 @@ struct ci_hdrc { | |||
| 177 | struct ci_role_driver *roles[CI_ROLE_END]; | 177 | struct ci_role_driver *roles[CI_ROLE_END]; |
| 178 | enum ci_role role; | 178 | enum ci_role role; |
| 179 | bool is_otg; | 179 | bool is_otg; |
| 180 | struct usb_otg otg; | ||
| 180 | struct otg_fsm fsm; | 181 | struct otg_fsm fsm; |
| 181 | struct ci_otg_fsm_timer_list *fsm_timer; | 182 | struct ci_otg_fsm_timer_list *fsm_timer; |
| 182 | struct work_struct work; | 183 | struct work_struct work; |
| @@ -201,7 +202,7 @@ struct ci_hdrc { | |||
| 201 | 202 | ||
| 202 | struct ci_hdrc_platform_data *platdata; | 203 | struct ci_hdrc_platform_data *platdata; |
| 203 | int vbus_active; | 204 | int vbus_active; |
| 204 | struct usb_phy *transceiver; | 205 | struct usb_phy *usb_phy; |
| 205 | struct usb_hcd *hcd; | 206 | struct usb_hcd *hcd; |
| 206 | struct dentry *debugfs; | 207 | struct dentry *debugfs; |
| 207 | bool id_event; | 208 | bool id_event; |
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index a7ab0f15926e..6f8b1b1045b5 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c | |||
| @@ -147,7 +147,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) | |||
| 147 | goto err_clk; | 147 | goto err_clk; |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | pdata.phy = data->phy; | 150 | pdata.usb_phy = data->phy; |
| 151 | 151 | ||
| 152 | if (imx_platform_flag->flags & CI_HDRC_IMX_IMX28_WRITE_FIX) | 152 | if (imx_platform_flag->flags & CI_HDRC_IMX_IMX28_WRITE_FIX) |
| 153 | pdata.flags |= CI_HDRC_IMX28_WRITE_FIX; | 153 | pdata.flags |= CI_HDRC_IMX28_WRITE_FIX; |
diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index 4935ac38fd00..3edf969ed797 100644 --- a/drivers/usb/chipidea/ci_hdrc_msm.c +++ b/drivers/usb/chipidea/ci_hdrc_msm.c | |||
| @@ -26,15 +26,15 @@ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event) | |||
| 26 | dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n"); | 26 | dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n"); |
| 27 | writel(0, USB_AHBBURST); | 27 | writel(0, USB_AHBBURST); |
| 28 | writel(0, USB_AHBMODE); | 28 | writel(0, USB_AHBMODE); |
| 29 | usb_phy_init(ci->transceiver); | 29 | usb_phy_init(ci->usb_phy); |
| 30 | break; | 30 | break; |
| 31 | case CI_HDRC_CONTROLLER_STOPPED_EVENT: | 31 | case CI_HDRC_CONTROLLER_STOPPED_EVENT: |
| 32 | dev_dbg(dev, "CI_HDRC_CONTROLLER_STOPPED_EVENT received\n"); | 32 | dev_dbg(dev, "CI_HDRC_CONTROLLER_STOPPED_EVENT received\n"); |
| 33 | /* | 33 | /* |
| 34 | * Put the transceiver in non-driving mode. Otherwise host | 34 | * Put the phy in non-driving mode. Otherwise host |
| 35 | * may not detect soft-disconnection. | 35 | * may not detect soft-disconnection. |
| 36 | */ | 36 | */ |
| 37 | usb_phy_notify_disconnect(ci->transceiver, USB_SPEED_UNKNOWN); | 37 | usb_phy_notify_disconnect(ci->usb_phy, USB_SPEED_UNKNOWN); |
| 38 | break; | 38 | break; |
| 39 | default: | 39 | default: |
| 40 | dev_dbg(dev, "unknown ci_hdrc event\n"); | 40 | dev_dbg(dev, "unknown ci_hdrc event\n"); |
| @@ -68,7 +68,7 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev) | |||
| 68 | if (IS_ERR(phy)) | 68 | if (IS_ERR(phy)) |
| 69 | return PTR_ERR(phy); | 69 | return PTR_ERR(phy); |
| 70 | 70 | ||
| 71 | ci_hdrc_msm_platdata.phy = phy; | 71 | ci_hdrc_msm_platdata.usb_phy = phy; |
| 72 | 72 | ||
| 73 | plat_ci = ci_hdrc_add_device(&pdev->dev, | 73 | plat_ci = ci_hdrc_add_device(&pdev->dev, |
| 74 | pdev->resource, pdev->num_resources, | 74 | pdev->resource, pdev->num_resources, |
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 9bdc6bd73432..30f89426bf05 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c | |||
| @@ -312,7 +312,7 @@ static int ci_usb_phy_init(struct ci_hdrc *ci) | |||
| 312 | case USBPHY_INTERFACE_MODE_UTMI: | 312 | case USBPHY_INTERFACE_MODE_UTMI: |
| 313 | case USBPHY_INTERFACE_MODE_UTMIW: | 313 | case USBPHY_INTERFACE_MODE_UTMIW: |
| 314 | case USBPHY_INTERFACE_MODE_HSIC: | 314 | case USBPHY_INTERFACE_MODE_HSIC: |
| 315 | ret = usb_phy_init(ci->transceiver); | 315 | ret = usb_phy_init(ci->usb_phy); |
| 316 | if (ret) | 316 | if (ret) |
| 317 | return ret; | 317 | return ret; |
| 318 | hw_phymode_configure(ci); | 318 | hw_phymode_configure(ci); |
| @@ -320,12 +320,12 @@ static int ci_usb_phy_init(struct ci_hdrc *ci) | |||
| 320 | case USBPHY_INTERFACE_MODE_ULPI: | 320 | case USBPHY_INTERFACE_MODE_ULPI: |
| 321 | case USBPHY_INTERFACE_MODE_SERIAL: | 321 | case USBPHY_INTERFACE_MODE_SERIAL: |
| 322 | hw_phymode_configure(ci); | 322 | hw_phymode_configure(ci); |
| 323 | ret = usb_phy_init(ci->transceiver); | 323 | ret = usb_phy_init(ci->usb_phy); |
| 324 | if (ret) | 324 | if (ret) |
| 325 | return ret; | 325 | return ret; |
| 326 | break; | 326 | break; |
| 327 | default: | 327 | default: |
| 328 | ret = usb_phy_init(ci->transceiver); | 328 | ret = usb_phy_init(ci->usb_phy); |
| 329 | } | 329 | } |
| 330 | 330 | ||
| 331 | return ret; | 331 | return ret; |
| @@ -605,13 +605,13 @@ static int ci_hdrc_probe(struct platform_device *pdev) | |||
| 605 | return -ENODEV; | 605 | return -ENODEV; |
| 606 | } | 606 | } |
| 607 | 607 | ||
| 608 | if (ci->platdata->phy) | 608 | if (ci->platdata->usb_phy) |
| 609 | ci->transceiver = ci->platdata->phy; | 609 | ci->usb_phy = ci->platdata->usb_phy; |
| 610 | else | 610 | else |
| 611 | ci->transceiver = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); | 611 | ci->usb_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); |
| 612 | 612 | ||
| 613 | if (IS_ERR(ci->transceiver)) { | 613 | if (IS_ERR(ci->usb_phy)) { |
| 614 | ret = PTR_ERR(ci->transceiver); | 614 | ret = PTR_ERR(ci->usb_phy); |
| 615 | /* | 615 | /* |
| 616 | * if -ENXIO is returned, it means PHY layer wasn't | 616 | * if -ENXIO is returned, it means PHY layer wasn't |
| 617 | * enabled, so it makes no sense to return -EPROBE_DEFER | 617 | * enabled, so it makes no sense to return -EPROBE_DEFER |
| @@ -728,7 +728,7 @@ static int ci_hdrc_probe(struct platform_device *pdev) | |||
| 728 | stop: | 728 | stop: |
| 729 | ci_role_destroy(ci); | 729 | ci_role_destroy(ci); |
| 730 | deinit_phy: | 730 | deinit_phy: |
| 731 | usb_phy_shutdown(ci->transceiver); | 731 | usb_phy_shutdown(ci->usb_phy); |
| 732 | 732 | ||
| 733 | return ret; | 733 | return ret; |
| 734 | } | 734 | } |
| @@ -741,7 +741,7 @@ static int ci_hdrc_remove(struct platform_device *pdev) | |||
| 741 | free_irq(ci->irq, ci); | 741 | free_irq(ci->irq, ci); |
| 742 | ci_role_destroy(ci); | 742 | ci_role_destroy(ci); |
| 743 | ci_hdrc_enter_lpm(ci, true); | 743 | ci_hdrc_enter_lpm(ci, true); |
| 744 | usb_phy_shutdown(ci->transceiver); | 744 | usb_phy_shutdown(ci->usb_phy); |
| 745 | 745 | ||
| 746 | return 0; | 746 | return 0; |
| 747 | } | 747 | } |
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index f038804d13dd..268e4236e84c 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c | |||
| @@ -220,7 +220,7 @@ static int ci_otg_show(struct seq_file *s, void *unused) | |||
| 220 | 220 | ||
| 221 | /* ------ State ----- */ | 221 | /* ------ State ----- */ |
| 222 | seq_printf(s, "OTG state: %s\n\n", | 222 | seq_printf(s, "OTG state: %s\n\n", |
| 223 | usb_otg_state_string(ci->transceiver->otg->state)); | 223 | usb_otg_state_string(ci->otg.state)); |
| 224 | 224 | ||
| 225 | /* ------ State Machine Variables ----- */ | 225 | /* ------ State Machine Variables ----- */ |
| 226 | seq_printf(s, "a_bus_drop: %d\n", fsm->a_bus_drop); | 226 | seq_printf(s, "a_bus_drop: %d\n", fsm->a_bus_drop); |
