Skip to content

Commit 3b5d3e6

Browse files
ruehlchrisgregkh
authored andcommitted
usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag
* init the sts flag to 0 (missed) * fix write the real bit not sts value * Set PORTCS_STS and DEVLC_STS only if sts = 1 [Peter Chen: This one and the next patch fix the problem occurred imx27 and imx31, and imx27 and imx31 usb support are enabled until 3.14, so these two patches isn't needed for -stable] Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1071055 commit 3b5d3e6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/usb/chipidea/core.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static int hw_device_init(struct ci_hdrc *ci, void __iomem *base)
236236

237237
static void hw_phymode_configure(struct ci_hdrc *ci)
238238
{
239-
u32 portsc, lpm, sts;
239+
u32 portsc, lpm, sts = 0;
240240

241241
switch (ci->platdata->phy_mode) {
242242
case USBPHY_INTERFACE_MODE_UTMI:
@@ -266,10 +266,12 @@ static void hw_phymode_configure(struct ci_hdrc *ci)
266266

267267
if (ci->hw_bank.lpm) {
268268
hw_write(ci, OP_DEVLC, DEVLC_PTS(7) | DEVLC_PTW, lpm);
269-
hw_write(ci, OP_DEVLC, DEVLC_STS, sts);
269+
if (sts)
270+
hw_write(ci, OP_DEVLC, DEVLC_STS, DEVLC_STS);
270271
} else {
271272
hw_write(ci, OP_PORTSC, PORTSC_PTS(7) | PORTSC_PTW, portsc);
272-
hw_write(ci, OP_PORTSC, PORTSC_STS, sts);
273+
if (sts)
274+
hw_write(ci, OP_PORTSC, PORTSC_STS, PORTSC_STS);
273275
}
274276
}
275277

0 commit comments

Comments
 (0)