aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r--drivers/usb/chipidea/core.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 619d13e29995..3df5005c554d 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -139,6 +139,8 @@ static int hw_alloc_regmap(struct ci_hdrc *ci, bool is_lpm)
139/** 139/**
140 * hw_read_intr_enable: returns interrupt enable register 140 * hw_read_intr_enable: returns interrupt enable register
141 * 141 *
142 * @ci: the controller
143 *
142 * This function returns register data 144 * This function returns register data
143 */ 145 */
144u32 hw_read_intr_enable(struct ci_hdrc *ci) 146u32 hw_read_intr_enable(struct ci_hdrc *ci)
@@ -149,6 +151,8 @@ u32 hw_read_intr_enable(struct ci_hdrc *ci)
149/** 151/**
150 * hw_read_intr_status: returns interrupt status register 152 * hw_read_intr_status: returns interrupt status register
151 * 153 *
154 * @ci: the controller
155 *
152 * This function returns register data 156 * This function returns register data
153 */ 157 */
154u32 hw_read_intr_status(struct ci_hdrc *ci) 158u32 hw_read_intr_status(struct ci_hdrc *ci)
@@ -176,6 +180,8 @@ int hw_port_test_set(struct ci_hdrc *ci, u8 mode)
176/** 180/**
177 * hw_port_test_get: reads port test mode value 181 * hw_port_test_get: reads port test mode value
178 * 182 *
183 * @ci: the controller
184 *
179 * This function returns port test mode value 185 * This function returns port test mode value
180 */ 186 */
181u8 hw_port_test_get(struct ci_hdrc *ci) 187u8 hw_port_test_get(struct ci_hdrc *ci)
@@ -295,7 +301,7 @@ static void hw_phymode_configure(struct ci_hdrc *ci)
295/** 301/**
296 * ci_usb_phy_init: initialize phy according to different phy type 302 * ci_usb_phy_init: initialize phy according to different phy type
297 * @ci: the controller 303 * @ci: the controller
298 * 304 *
299 * This function returns an error code if usb_phy_init has failed 305 * This function returns an error code if usb_phy_init has failed
300 */ 306 */
301static int ci_usb_phy_init(struct ci_hdrc *ci) 307static int ci_usb_phy_init(struct ci_hdrc *ci)
@@ -473,6 +479,10 @@ static int ci_get_platdata(struct device *dev,
473 PTR_ERR(platdata->reg_vbus)); 479 PTR_ERR(platdata->reg_vbus));
474 return PTR_ERR(platdata->reg_vbus); 480 return PTR_ERR(platdata->reg_vbus);
475 } 481 }
482 /* Get TPL support */
483 if (!platdata->tpl_support)
484 platdata->tpl_support =
485 of_usb_host_tpl_support(dev->of_node);
476 } 486 }
477 487
478 if (of_usb_get_maximum_speed(dev->of_node) == USB_SPEED_FULL) 488 if (of_usb_get_maximum_speed(dev->of_node) == USB_SPEED_FULL)
@@ -658,7 +668,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
658 goto deinit_phy; 668 goto deinit_phy;
659 } 669 }
660 670
661 if (ci->is_otg) { 671 if (ci->is_otg && ci->roles[CI_ROLE_GADGET]) {
662 /* Disable and clear all OTG irq */ 672 /* Disable and clear all OTG irq */
663 hw_write_otgsc(ci, OTGSC_INT_EN_BITS | OTGSC_INT_STATUS_BITS, 673 hw_write_otgsc(ci, OTGSC_INT_EN_BITS | OTGSC_INT_STATUS_BITS,
664 OTGSC_INT_STATUS_BITS); 674 OTGSC_INT_STATUS_BITS);