aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-01 19:33:53 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-01 19:33:53 -0500
commit7b05d3b37437f8d50a75545a0fd56ee585c58821 (patch)
tree6fcc08874c05fa3d8b274d2569c0fe620f790360 /drivers/usb/chipidea
parent71e41bbb43794e0fe4ce3b766d713e222ccfb5ea (diff)
parentd3d8425a21ed1b14bc896f827ee495e06bff2504 (diff)
Merge tag 'usb-ci-v4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next
Peter writes: - Add platform interface to choose ttctrl.ttha - Some tiny improvements
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.c13
-rw-r--r--drivers/usb/chipidea/core.c3
-rw-r--r--drivers/usb/chipidea/udc.c1
3 files changed, 12 insertions, 5 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index f14f4ab47ebb..9ce8c9f91674 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -28,6 +28,11 @@ struct ci_hdrc_imx_platform_flag {
28 bool runtime_pm; 28 bool runtime_pm;
29}; 29};
30 30
31static const struct ci_hdrc_imx_platform_flag imx23_usb_data = {
32 .flags = CI_HDRC_TURN_VBUS_EARLY_ON |
33 CI_HDRC_DISABLE_STREAMING,
34};
35
31static const struct ci_hdrc_imx_platform_flag imx27_usb_data = { 36static const struct ci_hdrc_imx_platform_flag imx27_usb_data = {
32 CI_HDRC_DISABLE_STREAMING, 37 CI_HDRC_DISABLE_STREAMING,
33}; 38};
@@ -66,6 +71,7 @@ static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = {
66}; 71};
67 72
68static const struct of_device_id ci_hdrc_imx_dt_ids[] = { 73static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
74 { .compatible = "fsl,imx23-usb", .data = &imx23_usb_data},
69 { .compatible = "fsl,imx28-usb", .data = &imx28_usb_data}, 75 { .compatible = "fsl,imx28-usb", .data = &imx28_usb_data},
70 { .compatible = "fsl,imx27-usb", .data = &imx27_usb_data}, 76 { .compatible = "fsl,imx27-usb", .data = &imx27_usb_data},
71 { .compatible = "fsl,imx6q-usb", .data = &imx6q_usb_data}, 77 { .compatible = "fsl,imx6q-usb", .data = &imx6q_usb_data},
@@ -244,7 +250,6 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
244 struct ci_hdrc_platform_data pdata = { 250 struct ci_hdrc_platform_data pdata = {
245 .name = dev_name(&pdev->dev), 251 .name = dev_name(&pdev->dev),
246 .capoffset = DEF_CAPOFFSET, 252 .capoffset = DEF_CAPOFFSET,
247 .flags = CI_HDRC_SET_NON_ZERO_TTHA,
248 }; 253 };
249 int ret; 254 int ret;
250 const struct of_device_id *of_id; 255 const struct of_device_id *of_id;
@@ -302,9 +307,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
302 &pdata); 307 &pdata);
303 if (IS_ERR(data->ci_pdev)) { 308 if (IS_ERR(data->ci_pdev)) {
304 ret = PTR_ERR(data->ci_pdev); 309 ret = PTR_ERR(data->ci_pdev);
305 dev_err(&pdev->dev, 310 if (ret != -EPROBE_DEFER)
306 "Can't register ci_hdrc platform device, err=%d\n", 311 dev_err(&pdev->dev,
307 ret); 312 "ci_hdrc_add_device failed, err=%d\n", ret);
308 goto err_clk; 313 goto err_clk;
309 } 314 }
310 315
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 7404064b9bbc..69426e644d17 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -721,6 +721,9 @@ static int ci_get_platdata(struct device *dev,
721 return ret; 721 return ret;
722 } 722 }
723 723
724 if (of_find_property(dev->of_node, "non-zero-ttctrl-ttha", NULL))
725 platdata->flags |= CI_HDRC_SET_NON_ZERO_TTHA;
726
724 ext_id = ERR_PTR(-ENODEV); 727 ext_id = ERR_PTR(-ENODEV);
725 ext_vbus = ERR_PTR(-ENODEV); 728 ext_vbus = ERR_PTR(-ENODEV);
726 if (of_property_read_bool(dev->of_node, "extcon")) { 729 if (of_property_read_bool(dev->of_node, "extcon")) {
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 3eafa2c9a2ba..00250ab38ddb 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -819,7 +819,6 @@ static int _ep_queue(struct usb_ep *ep, struct usb_request *req,
819 ci->ep0out : ci->ep0in; 819 ci->ep0out : ci->ep0in;
820 if (!list_empty(&hwep->qh.queue)) { 820 if (!list_empty(&hwep->qh.queue)) {
821 _ep_nuke(hwep); 821 _ep_nuke(hwep);
822 retval = -EOVERFLOW;
823 dev_warn(hwep->ci->dev, "endpoint ctrl %X nuked\n", 822 dev_warn(hwep->ci->dev, "endpoint ctrl %X nuked\n",
824 _usb_addr(hwep)); 823 _usb_addr(hwep));
825 } 824 }