diff options
author | Peter Chen <peter.chen@freescale.com> | 2015-02-10 23:44:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-18 11:19:09 -0400 |
commit | 2e37cfd8e0a0bb161a75ce2bc2302a1a1662fdb7 (patch) | |
tree | aeb71ea89c3ceaa076969ecd410fca615c6ef29b /drivers/usb/chipidea/core.c | |
parent | 01e3ad863fc0f15b802c8a5247e1c252bd04f429 (diff) |
usb: chipidea: clear otg interrupt status for otg capable controller
We need to do it for all otg capable controller, not only peripheral
featured otg capable controller, otherwise, the host-only role, but
otg capable controller may be responded by otg interrupt.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r-- | drivers/usb/chipidea/core.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 6d9dc2d175eb..23373543a149 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c | |||
@@ -649,8 +649,12 @@ static void ci_get_otg_capable(struct ci_hdrc *ci) | |||
649 | ci->is_otg = (hw_read(ci, CAP_DCCPARAMS, | 649 | ci->is_otg = (hw_read(ci, CAP_DCCPARAMS, |
650 | DCCPARAMS_DC | DCCPARAMS_HC) | 650 | DCCPARAMS_DC | DCCPARAMS_HC) |
651 | == (DCCPARAMS_DC | DCCPARAMS_HC)); | 651 | == (DCCPARAMS_DC | DCCPARAMS_HC)); |
652 | if (ci->is_otg) | 652 | if (ci->is_otg) { |
653 | dev_dbg(ci->dev, "It is OTG capable controller\n"); | 653 | dev_dbg(ci->dev, "It is OTG capable controller\n"); |
654 | /* Disable and clear all OTG irq */ | ||
655 | hw_write_otgsc(ci, OTGSC_INT_EN_BITS | OTGSC_INT_STATUS_BITS, | ||
656 | OTGSC_INT_STATUS_BITS); | ||
657 | } | ||
654 | } | 658 | } |
655 | 659 | ||
656 | static int ci_hdrc_probe(struct platform_device *pdev) | 660 | static int ci_hdrc_probe(struct platform_device *pdev) |
@@ -749,9 +753,6 @@ static int ci_hdrc_probe(struct platform_device *pdev) | |||
749 | } | 753 | } |
750 | 754 | ||
751 | if (ci->is_otg && ci->roles[CI_ROLE_GADGET]) { | 755 | if (ci->is_otg && ci->roles[CI_ROLE_GADGET]) { |
752 | /* Disable and clear all OTG irq */ | ||
753 | hw_write_otgsc(ci, OTGSC_INT_EN_BITS | OTGSC_INT_STATUS_BITS, | ||
754 | OTGSC_INT_STATUS_BITS); | ||
755 | ret = ci_hdrc_otg_init(ci); | 756 | ret = ci_hdrc_otg_init(ci); |
756 | if (ret) { | 757 | if (ret) { |
757 | dev_err(dev, "init otg fails, ret = %d\n", ret); | 758 | dev_err(dev, "init otg fails, ret = %d\n", ret); |