Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 718d4a6

Browse files
Peter Chengregkh
authored andcommitted
Revert "usb: chipidea: move ci_ulpi_init after the phy initialization"
This reverts commit 22ffd39. People report this commit causes the driver defer probed, and never back to work[1][2]. [1] https://lore.kernel.org/lkml/20240407011913.GA168730@nchen-desktop/T/#mc2b93bc11a8b01ec7cd0d0bf6b0b03951d9ef751 [2] https://lore.kernel.org/lkml/20240407011913.GA168730@nchen-desktop/T/#me87d9a2a76c07619d83b3879ea14780da89fbbbf Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Wouter Franken <wouter@franken-peeters.be> Signed-off-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20240517023648.3459188-1-peter.chen@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c3f38fa commit 718d4a6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

drivers/usb/chipidea/core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,10 @@ static int ci_hdrc_probe(struct platform_device *pdev)
10841084
return -ENODEV;
10851085
}
10861086

1087+
ret = ci_ulpi_init(ci);
1088+
if (ret)
1089+
return ret;
1090+
10871091
if (ci->platdata->phy) {
10881092
ci->phy = ci->platdata->phy;
10891093
} else if (ci->platdata->usb_phy) {
@@ -1138,10 +1142,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
11381142
goto ulpi_exit;
11391143
}
11401144

1141-
ret = ci_ulpi_init(ci);
1142-
if (ret)
1143-
return ret;
1144-
11451145
ci->hw_bank.phys = res->start;
11461146

11471147
ci->irq = platform_get_irq(pdev, 0);

drivers/usb/chipidea/ulpi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ int ci_ulpi_init(struct ci_hdrc *ci)
6868
if (ci->platdata->phy_mode != USBPHY_INTERFACE_MODE_ULPI)
6969
return 0;
7070

71+
/*
72+
* Set PORTSC correctly so we can read/write ULPI registers for
73+
* identification purposes
74+
*/
75+
hw_phymode_configure(ci);
7176

7277
ci->ulpi_ops.read = ci_ulpi_read;
7378
ci->ulpi_ops.write = ci_ulpi_write;

0 commit comments

Comments
 (0)