* [PATCH 1/6] usb: host: ehci-msm: Fix pointer check
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
@ 2025-04-07 9:54 ` Stephan Gerhold
2025-04-07 9:54 ` [PATCH 2/6] usb: host: echi-msm: Drop ulpi definitions Stephan Gerhold
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Stephan Gerhold @ 2025-04-07 9:54 UTC (permalink / raw)
To: Caleb Connolly, Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot
dev_read_addr_ptr() returns a null pointer on error, not FDT_ADDR_T_NONE.
Fixes: 2be1130a9305 ("usb: ehci-msm: Use dev interface to get device address")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/usb/host/ehci-msm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index a759aea9db38dd5af2bb85b677ac403018983cfb..dd1d527a3a2c3f38df747dbb41cbb84bf76286e2 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -141,7 +141,7 @@ static int ehci_usb_of_to_plat(struct udevice *dev)
priv->ulpi_vp.port_num = 0;
priv->ehci = dev_read_addr_ptr(dev);
- if (priv->ehci == (void *)FDT_ADDR_T_NONE)
+ if (!priv->ehci)
return -EINVAL;
/* Warning: this will not work if viewport address is > 64 bit due to
--
2.47.2
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 2/6] usb: host: echi-msm: Drop ulpi definitions
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
2025-04-07 9:54 ` [PATCH 1/6] usb: host: ehci-msm: Fix pointer check Stephan Gerhold
@ 2025-04-07 9:54 ` Stephan Gerhold
2025-04-07 9:54 ` [PATCH 3/6] usb: host: ehci-msm: Disable clocks after all register accesses Stephan Gerhold
` (6 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Stephan Gerhold @ 2025-04-07 9:54 UTC (permalink / raw)
To: Caleb Connolly, Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot
These are unused.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/usb/host/ehci-msm.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index dd1d527a3a2c3f38df747dbb41cbb84bf76286e2..60b2dc44d3d35ddc5b8cf37f70bbccd91c5e962c 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -24,7 +24,6 @@
struct msm_ehci_priv {
struct ehci_ctrl ctrl; /* Needed by EHCI */
struct usb_ehci *ehci; /* Start of IP core*/
- struct ulpi_viewport ulpi_vp; /* ULPI Viewport */
struct phy phy;
struct clk iface_clk;
struct clk core_clk;
@@ -138,17 +137,11 @@ static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct msm_ehci_priv *priv = dev_get_priv(dev);
- priv->ulpi_vp.port_num = 0;
priv->ehci = dev_read_addr_ptr(dev);
if (!priv->ehci)
return -EINVAL;
- /* Warning: this will not work if viewport address is > 64 bit due to
- * ULPI design.
- */
- priv->ulpi_vp.viewport_addr = (phys_addr_t)&priv->ehci->ulpi_viewpoint;
-
return 0;
}
--
2.47.2
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 3/6] usb: host: ehci-msm: Disable clocks after all register accesses
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
2025-04-07 9:54 ` [PATCH 1/6] usb: host: ehci-msm: Fix pointer check Stephan Gerhold
2025-04-07 9:54 ` [PATCH 2/6] usb: host: echi-msm: Drop ulpi definitions Stephan Gerhold
@ 2025-04-07 9:54 ` Stephan Gerhold
2025-04-07 9:54 ` [PATCH 4/6] usb: host: ehci-msm: Use clk bulk helpers Stephan Gerhold
` (5 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Stephan Gerhold @ 2025-04-07 9:54 UTC (permalink / raw)
To: Caleb Connolly, Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot
We need the USB clocks to do accesses like
wait_for_bit_le32(&ehci->usbcmd, CMD_RESET, ...)
so we should disable them only after all of them are done.
At the moment this works only because the clock driver doesn't actually
disabling these clocks in U-Boot.
Fixes: 9b3a9f896e66 ("ehci: msm: bring up iface + core clocks")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/usb/host/ehci-msm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 60b2dc44d3d35ddc5b8cf37f70bbccd91c5e962c..bf46e89104ecd594587eb9132b8d10d566feb766 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -110,9 +110,6 @@ static int ehci_usb_remove(struct udevice *dev)
/* Stop controller. */
clrbits_le32(&ehci->usbcmd, CMD_RUN);
- clk_disable_unprepare(&p->iface_clk);
- clk_disable_unprepare(&p->core_clk);
-
ret = generic_shutdown_phy(&p->phy);
if (ret)
return ret;
@@ -130,6 +127,8 @@ static int ehci_usb_remove(struct udevice *dev)
return -ETIMEDOUT;
}
+ clk_disable_unprepare(&p->iface_clk);
+ clk_disable_unprepare(&p->core_clk);
return 0;
}
--
2.47.2
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 4/6] usb: host: ehci-msm: Use clk bulk helpers
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
` (2 preceding siblings ...)
2025-04-07 9:54 ` [PATCH 3/6] usb: host: ehci-msm: Disable clocks after all register accesses Stephan Gerhold
@ 2025-04-07 9:54 ` Stephan Gerhold
2025-04-07 9:54 ` [PATCH 5/6] usb: host: ehci-msm: Drop redundant EHCI register writes Stephan Gerhold
` (4 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Stephan Gerhold @ 2025-04-07 9:54 UTC (permalink / raw)
To: Caleb Connolly, Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot
The enable order for the clocks does not matter much, we just need to
enable all the USB clocks. Use the clk bulk helpers to simplify the code.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/usb/host/ehci-msm.c | 36 +++++++++++-------------------------
1 file changed, 11 insertions(+), 25 deletions(-)
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index bf46e89104ecd594587eb9132b8d10d566feb766..17cfff8380c3953900fe6383bee396b147287592 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -25,8 +25,7 @@ struct msm_ehci_priv {
struct ehci_ctrl ctrl; /* Needed by EHCI */
struct usb_ehci *ehci; /* Start of IP core*/
struct phy phy;
- struct clk iface_clk;
- struct clk core_clk;
+ struct clk_bulk clks;
};
static int msm_init_after_reset(struct ehci_ctrl *dev)
@@ -55,25 +54,15 @@ static int ehci_usb_probe(struct udevice *dev)
struct ehci_hcor *hcor;
int ret;
- ret = clk_get_by_name(dev, "core", &p->core_clk);
- if (ret) {
- dev_err(dev, "Failed to get core clock: %d\n", ret);
+ ret = clk_get_bulk(dev, &p->clks);
+ if (ret && (ret != -ENOSYS && ret != -ENOENT)) {
+ dev_err(dev, "Failed to get clocks: %d\n", ret);
return ret;
}
- ret = clk_get_by_name(dev, "iface", &p->iface_clk);
- if (ret) {
- dev_err(dev, "Failed to get iface clock: %d\n", ret);
- return ret;
- }
-
- ret = clk_prepare_enable(&p->core_clk);
- if (ret)
- return ret;
-
- ret = clk_prepare_enable(&p->iface_clk);
+ ret = clk_enable_bulk(&p->clks);
if (ret)
- goto cleanup_core;
+ goto cleanup_clocks;
hccr = (struct ehci_hccr *)((phys_addr_t)&ehci->caplength);
hcor = (struct ehci_hcor *)((phys_addr_t)hccr +
@@ -81,19 +70,17 @@ static int ehci_usb_probe(struct udevice *dev)
ret = generic_setup_phy(dev, &p->phy, 0, PHY_MODE_USB_HOST, 0);
if (ret)
- goto cleanup_iface;
+ goto cleanup_clocks;
ret = board_usb_init(0, plat->init_type);
if (ret < 0)
- goto cleanup_iface;
+ goto cleanup_clocks;
return ehci_register(dev, hccr, hcor, &msm_ehci_ops, 0,
plat->init_type);
-cleanup_iface:
- clk_disable_unprepare(&p->iface_clk);
-cleanup_core:
- clk_disable_unprepare(&p->core_clk);
+cleanup_clocks:
+ clk_release_bulk(&p->clks);
return ret;
}
@@ -127,8 +114,7 @@ static int ehci_usb_remove(struct udevice *dev)
return -ETIMEDOUT;
}
- clk_disable_unprepare(&p->iface_clk);
- clk_disable_unprepare(&p->core_clk);
+ clk_release_bulk(&p->clks);
return 0;
}
--
2.47.2
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 5/6] usb: host: ehci-msm: Drop redundant EHCI register writes
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
` (3 preceding siblings ...)
2025-04-07 9:54 ` [PATCH 4/6] usb: host: ehci-msm: Use clk bulk helpers Stephan Gerhold
@ 2025-04-07 9:54 ` Stephan Gerhold
2025-04-07 9:54 ` [PATCH 6/6] usb: host: ehci-msm: Register ULPI PHY through NOP wrapper Stephan Gerhold
` (3 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Stephan Gerhold @ 2025-04-07 9:54 UTC (permalink / raw)
To: Caleb Connolly, Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot
ehci_unregister() already clears the CMD_RUN bit with more careful checks.
It also ensures that we only do this in case we were actually in USB host
(rather than USB device) mode. It's not clear what the extra register
writes in the Qualcomm-specific ehci-msm driver are supposed to do, so just
drop them.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/usb/host/ehci-msm.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 17cfff8380c3953900fe6383bee396b147287592..659a917ad27372f8f5c7138c40881b60413323e5 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -87,16 +87,12 @@ cleanup_clocks:
static int ehci_usb_remove(struct udevice *dev)
{
struct msm_ehci_priv *p = dev_get_priv(dev);
- struct usb_ehci *ehci = p->ehci;
int ret;
ret = ehci_deregister(dev);
if (ret)
return ret;
- /* Stop controller. */
- clrbits_le32(&ehci->usbcmd, CMD_RUN);
-
ret = generic_shutdown_phy(&p->phy);
if (ret)
return ret;
@@ -105,15 +101,6 @@ static int ehci_usb_remove(struct udevice *dev)
if (ret < 0)
return ret;
- /* Reset controller */
- setbits_le32(&ehci->usbcmd, CMD_RESET);
-
- /* Wait for reset */
- if (wait_for_bit_le32(&ehci->usbcmd, CMD_RESET, false, 30, false)) {
- printf("Stuck on USB reset.\n");
- return -ETIMEDOUT;
- }
-
clk_release_bulk(&p->clks);
return 0;
}
--
2.47.2
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 6/6] usb: host: ehci-msm: Register ULPI PHY through NOP wrapper
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
` (4 preceding siblings ...)
2025-04-07 9:54 ` [PATCH 5/6] usb: host: ehci-msm: Drop redundant EHCI register writes Stephan Gerhold
@ 2025-04-07 9:54 ` Stephan Gerhold
2025-04-09 17:26 ` [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Caleb Connolly
` (2 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Stephan Gerhold @ 2025-04-07 9:54 UTC (permalink / raw)
To: Caleb Connolly, Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot
The UCLASS_USB device is removed and rebound each time you run "usb stop"
followed by "usb start", or when you switch between USB device and USB host
mode. Unfortunately, this causes issues with the current ehci-msm driver:
In ehci_usb_remove() we call generic_shutdown_phy(), but at that point the
ULPI PHY we registered in ehci_usb_of_bind() was already removed again by
the DM core.
Fix this by adding a UCLASS_NOP driver that keeps the PHY driver bound
permanently, and then just re-probe the actual USB part.
Reported-by: Jianfeng Zhu <JianfengA.Zhu@sony.com>
Closes: https://lore.kernel.org/u-boot/OSQPR04MB774067EBEEADD714EFE18C2A90882@OSQPR04MB7740.apcprd04.prod.outlook.com/
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
drivers/usb/host/ehci-msm.c | 107 +++++++++++++++++++++++++++-----------------
1 file changed, 65 insertions(+), 42 deletions(-)
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 659a917ad27372f8f5c7138c40881b60413323e5..8aeb6a915563453ad2a02721d4828fd1b300a4e4 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -25,6 +25,9 @@ struct msm_ehci_priv {
struct ehci_ctrl ctrl; /* Needed by EHCI */
struct usb_ehci *ehci; /* Start of IP core*/
struct phy phy;
+};
+
+struct qcom_ci_hdrc_priv {
struct clk_bulk clks;
};
@@ -54,34 +57,20 @@ static int ehci_usb_probe(struct udevice *dev)
struct ehci_hcor *hcor;
int ret;
- ret = clk_get_bulk(dev, &p->clks);
- if (ret && (ret != -ENOSYS && ret != -ENOENT)) {
- dev_err(dev, "Failed to get clocks: %d\n", ret);
- return ret;
- }
-
- ret = clk_enable_bulk(&p->clks);
- if (ret)
- goto cleanup_clocks;
-
hccr = (struct ehci_hccr *)((phys_addr_t)&ehci->caplength);
hcor = (struct ehci_hcor *)((phys_addr_t)hccr +
HC_LENGTH(ehci_readl(&(hccr)->cr_capbase)));
ret = generic_setup_phy(dev, &p->phy, 0, PHY_MODE_USB_HOST, 0);
if (ret)
- goto cleanup_clocks;
+ return ret;
ret = board_usb_init(0, plat->init_type);
if (ret < 0)
- goto cleanup_clocks;
+ return ret;
return ehci_register(dev, hccr, hcor, &msm_ehci_ops, 0,
plat->init_type);
-
-cleanup_clocks:
- clk_release_bulk(&p->clks);
- return ret;
}
static int ehci_usb_remove(struct udevice *dev)
@@ -101,7 +90,6 @@ static int ehci_usb_remove(struct udevice *dev)
if (ret < 0)
return ret;
- clk_release_bulk(&p->clks);
return 0;
}
@@ -117,24 +105,6 @@ static int ehci_usb_of_to_plat(struct udevice *dev)
return 0;
}
-static int ehci_usb_of_bind(struct udevice *dev)
-{
- ofnode ulpi_node = ofnode_first_subnode(dev_ofnode(dev));
- ofnode phy_node;
-
- if (!ofnode_valid(ulpi_node))
- return 0;
-
- phy_node = ofnode_first_subnode(ulpi_node);
- if (!ofnode_valid(phy_node)) {
- printf("%s: ulpi subnode with no phy\n", __func__);
- return -ENOENT;
- }
-
- return device_bind_driver_to_node(dev, "msm8916_usbphy", "msm8916_usbphy",
- phy_node, NULL);
-}
-
#if defined(CONFIG_CI_UDC)
/* Little quirk that MSM needs with Chipidea controller
* Must reinit phy after reset
@@ -147,17 +117,10 @@ void ci_init_after_reset(struct ehci_ctrl *ctrl)
}
#endif
-static const struct udevice_id ehci_usb_ids[] = {
- { .compatible = "qcom,ci-hdrc", },
- { }
-};
-
U_BOOT_DRIVER(usb_ehci) = {
.name = "ehci_msm",
.id = UCLASS_USB,
- .of_match = ehci_usb_ids,
.of_to_plat = ehci_usb_of_to_plat,
- .bind = ehci_usb_of_bind,
.probe = ehci_usb_probe,
.remove = ehci_usb_remove,
.ops = &ehci_usb_ops,
@@ -165,3 +128,63 @@ U_BOOT_DRIVER(usb_ehci) = {
.plat_auto = sizeof(struct usb_plat),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
};
+
+static int qcom_ci_hdrc_probe(struct udevice *dev)
+{
+ struct qcom_ci_hdrc_priv *p = dev_get_priv(dev);
+ int ret;
+
+ ret = clk_get_bulk(dev, &p->clks);
+ if (ret && (ret != -ENOSYS && ret != -ENOENT)) {
+ dev_err(dev, "Failed to get clocks: %d\n", ret);
+ return ret;
+ }
+
+ return clk_enable_bulk(&p->clks);
+}
+
+static int qcom_ci_hdrc_remove(struct udevice *dev)
+{
+ struct qcom_ci_hdrc_priv *p = dev_get_priv(dev);
+
+ return clk_release_bulk(&p->clks);
+}
+
+static int qcom_ci_hdrc_bind(struct udevice *dev)
+{
+ ofnode ulpi_node = ofnode_first_subnode(dev_ofnode(dev));
+ ofnode phy_node;
+ int ret;
+
+ ret = device_bind_driver_to_node(dev, "ehci_msm", "ehci_msm",
+ dev_ofnode(dev), NULL);
+ if (ret)
+ return ret;
+
+ if (!ofnode_valid(ulpi_node))
+ return 0;
+
+ phy_node = ofnode_first_subnode(ulpi_node);
+ if (!ofnode_valid(phy_node)) {
+ printf("%s: ulpi subnode with no phy\n", __func__);
+ return -ENOENT;
+ }
+
+ return device_bind_driver_to_node(dev, "msm8916_usbphy", "msm8916_usbphy",
+ phy_node, NULL);
+}
+
+static const struct udevice_id qcom_ci_hdrc_ids[] = {
+ { .compatible = "qcom,ci-hdrc", },
+ { }
+};
+
+U_BOOT_DRIVER(qcom_ci_hdrc) = {
+ .name = "qcom_ci_hdrc",
+ .id = UCLASS_NOP,
+ .of_match = qcom_ci_hdrc_ids,
+ .bind = qcom_ci_hdrc_bind,
+ .probe = qcom_ci_hdrc_probe,
+ .remove = qcom_ci_hdrc_remove,
+ .priv_auto = sizeof(struct qcom_ci_hdrc_priv),
+};
--
2.47.2
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
` (5 preceding siblings ...)
2025-04-07 9:54 ` [PATCH 6/6] usb: host: ehci-msm: Register ULPI PHY through NOP wrapper Stephan Gerhold
@ 2025-04-09 17:26 ` Caleb Connolly
2025-04-12 10:20 ` Sam Day
2025-09-08 11:39 ` Stephan Gerhold
2025-10-30 12:16 ` Casey Connolly
8 siblings, 1 reply; 12+ messages in thread
From: Caleb Connolly @ 2025-04-09 17:26 UTC (permalink / raw)
To: Stephan Gerhold, Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot
On 4/7/25 11:54, Stephan Gerhold wrote:
> The ehci-msm driver has several subtle issues and stale code. Most of them
> are minor and do not cause issues during normal usage. The last patch is
> the most critical, it fixes a reported crash when stopping/re-configuring
> USB, which has been around for a few months now.
>
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
I'd appreciate a T-b from Sam or some other MSM8916 device, but this all
looks good to me!
Kind regards,> ---
> Stephan Gerhold (6):
> usb: host: ehci-msm: Fix pointer check
> usb: host: echi-msm: Drop ulpi definitions
> usb: host: ehci-msm: Disable clocks after all register accesses
> usb: host: ehci-msm: Use clk bulk helpers
> usb: host: ehci-msm: Drop redundant EHCI register writes
> usb: host: ehci-msm: Register ULPI PHY through NOP wrapper
>
> drivers/usb/host/ehci-msm.c | 146 ++++++++++++++++++++------------------------
> 1 file changed, 67 insertions(+), 79 deletions(-)
> ---
> base-commit: 0efe8ea57fc7a1a6fc5f64fb3cf6bc4a1a4fc219
> change-id: 20250121-ehci-msm-fixes-b1ed17a1eaea
>
> Best regards,
--
Caleb (they/them)
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes
2025-04-09 17:26 ` [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Caleb Connolly
@ 2025-04-12 10:20 ` Sam Day
0 siblings, 0 replies; 12+ messages in thread
From: Sam Day @ 2025-04-12 10:20 UTC (permalink / raw)
To: Caleb Connolly, Stephan Gerhold, Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
u-boot-qcom, u-boot
On Wed Apr 9, 2025 at 7:26 PM CEST, Caleb Connolly wrote:
>
>
> On 4/7/25 11:54, Stephan Gerhold wrote:
>> The ehci-msm driver has several subtle issues and stale code. Most of them
>> are minor and do not cause issues during normal usage. The last patch is
>> the most critical, it fixes a reported crash when stopping/re-configuring
>> USB, which has been around for a few months now.
>>
>> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
>
> Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
>
> I'd appreciate a T-b from Sam or some other MSM8916 device, but this all
> looks good to me!
LGTM - tested on db410c and a samsung-grandprimelte
Tested-by: Sam Day <me@samcday.com>
-Sam
>
> Kind regards,> ---
>> Stephan Gerhold (6):
>> usb: host: ehci-msm: Fix pointer check
>> usb: host: echi-msm: Drop ulpi definitions
>> usb: host: ehci-msm: Disable clocks after all register accesses
>> usb: host: ehci-msm: Use clk bulk helpers
>> usb: host: ehci-msm: Drop redundant EHCI register writes
>> usb: host: ehci-msm: Register ULPI PHY through NOP wrapper
>>
>> drivers/usb/host/ehci-msm.c | 146 ++++++++++++++++++++------------------------
>> 1 file changed, 67 insertions(+), 79 deletions(-)
>> ---
>> base-commit: 0efe8ea57fc7a1a6fc5f64fb3cf6bc4a1a4fc219
>> change-id: 20250121-ehci-msm-fixes-b1ed17a1eaea
>>
>> Best regards,
> --
> Caleb (they/them)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
` (6 preceding siblings ...)
2025-04-09 17:26 ` [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Caleb Connolly
@ 2025-09-08 11:39 ` Stephan Gerhold
2025-09-08 11:47 ` Marek Vasut
2025-10-30 12:16 ` Casey Connolly
8 siblings, 1 reply; 12+ messages in thread
From: Stephan Gerhold @ 2025-09-08 11:39 UTC (permalink / raw)
To: Marek Vasut
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot, Casey Connolly
Hi Marek,
On Mon, Apr 07, 2025 at 11:54:20AM +0200, Stephan Gerhold wrote:
> The ehci-msm driver has several subtle issues and stale code. Most of them
> are minor and do not cause issues during normal usage. The last patch is
> the most critical, it fixes a reported crash when stopping/re-configuring
> USB, which has been around for a few months now.
>
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> Stephan Gerhold (6):
> usb: host: ehci-msm: Fix pointer check
> usb: host: echi-msm: Drop ulpi definitions
> usb: host: ehci-msm: Disable clocks after all register accesses
> usb: host: ehci-msm: Use clk bulk helpers
> usb: host: ehci-msm: Drop redundant EHCI register writes
> usb: host: ehci-msm: Register ULPI PHY through NOP wrapper
>
> drivers/usb/host/ehci-msm.c | 146 ++++++++++++++++++++------------------------
> 1 file changed, 67 insertions(+), 79 deletions(-)
Could you apply these patches and send them to Tom? These are important
fixes to make USB work properly on the dragonboard410c board and they
have been on the list for a few months now. There is already an ack from
Casey as well.
Or would it be easier for you if Casey applies them? I'm sure that would
work too. :)
Thanks,
Stephan
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes
2025-09-08 11:39 ` Stephan Gerhold
@ 2025-09-08 11:47 ` Marek Vasut
0 siblings, 0 replies; 12+ messages in thread
From: Marek Vasut @ 2025-09-08 11:47 UTC (permalink / raw)
To: Stephan Gerhold
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot, Casey Connolly
On 9/8/25 1:39 PM, Stephan Gerhold wrote:
Hello Stephan,
> On Mon, Apr 07, 2025 at 11:54:20AM +0200, Stephan Gerhold wrote:
>> The ehci-msm driver has several subtle issues and stale code. Most of them
>> are minor and do not cause issues during normal usage. The last patch is
>> the most critical, it fixes a reported crash when stopping/re-configuring
>> USB, which has been around for a few months now.
>>
>> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
>> ---
>> Stephan Gerhold (6):
>> usb: host: ehci-msm: Fix pointer check
>> usb: host: echi-msm: Drop ulpi definitions
>> usb: host: ehci-msm: Disable clocks after all register accesses
>> usb: host: ehci-msm: Use clk bulk helpers
>> usb: host: ehci-msm: Drop redundant EHCI register writes
>> usb: host: ehci-msm: Register ULPI PHY through NOP wrapper
>>
>> drivers/usb/host/ehci-msm.c | 146 ++++++++++++++++++++------------------------
>> 1 file changed, 67 insertions(+), 79 deletions(-)
>
> Could you apply these patches and send them to Tom? These are important
> fixes to make USB work properly on the dragonboard410c board and they
> have been on the list for a few months now. There is already an ack from
> Casey as well.
>
> Or would it be easier for you if Casey applies them? I'm sure that would
> work too. :)
I'm fine with that, since they are isolated to msm.
Thank you for the reminder.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes
2025-04-07 9:54 [PATCH 0/6] usb: host: ehci-msm: Clean up and fix crashes Stephan Gerhold
` (7 preceding siblings ...)
2025-09-08 11:39 ` Stephan Gerhold
@ 2025-10-30 12:16 ` Casey Connolly
8 siblings, 0 replies; 12+ messages in thread
From: Casey Connolly @ 2025-10-30 12:16 UTC (permalink / raw)
To: Marek Vasut, Casey Connolly, Stephan Gerhold
Cc: Sumit Garg, Neil Armstrong, Tom Rini, Jianfeng Zhu, Jacky Cao,
Sam Day, u-boot-qcom, u-boot
On Mon, 07 Apr 2025 11:54:20 +0200, Stephan Gerhold wrote:
> The ehci-msm driver has several subtle issues and stale code. Most of them
> are minor and do not cause issues during normal usage. The last patch is
> the most critical, it fixes a reported crash when stopping/re-configuring
> USB, which has been around for a few months now.
>
>
Applied, thanks!
[1/6] usb: host: ehci-msm: Fix pointer check
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/e179d750c751
[2/6] usb: host: echi-msm: Drop ulpi definitions
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/4286c37853b0
[3/6] usb: host: ehci-msm: Disable clocks after all register accesses
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/3d14ccba5355
[4/6] usb: host: ehci-msm: Use clk bulk helpers
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/8b500c715f47
[5/6] usb: host: ehci-msm: Drop redundant EHCI register writes
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/cfcb30960aa4
[6/6] usb: host: ehci-msm: Register ULPI PHY through NOP wrapper
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/cfd083ff4d4d
Best regards,
--
// Caleb (they/them)
^ permalink raw reply [flat|nested] 12+ messages in thread