Linux USB
 help / color / mirror / Atom feed
* [PATCH] usb: xhci-plat: mvebu: restore MBus windows on resume
@ 2026-12-03  5:36 Rosen Penev
  2026-12-03  5:46 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-12-03  5:36 UTC (permalink / raw)
  To: linux-usb
  Cc: Mathias Nyman, Greg Kroah-Hartman, Thomas Petazzoni,
	Gregory CLEMENT

The Armada 375/38x xHCI reaches DRAM through MBus decoding windows in
its second register block. They are only programmed from ->init_quirk()
at probe time. On boards that lose SoC power in suspend-to-RAM, the
windows read back as zero on resume, so the controller has no path to
memory and its DMA fails.

The AHCI and mvneta drivers on the same SoCs already reprogram their
windows on resume. Do the same here by using the existing MBus setup
as ->resume_quirk(), which xhci_plat_resume_common() calls before
xhci_resume(). Reprogramming is idempotent, so it is also safe when
power was kept.

Fixes: 973747928514 ("usb: host: xhci-plat: add support for the Armada 375/38x XHCI controllers")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/usb/host/xhci-plat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 6fd595f81a30..94ab45c10c16 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -114,6 +114,7 @@ static int xhci_plat_start(struct usb_hcd *hcd)
 #ifdef CONFIG_OF
 static const struct xhci_plat_priv xhci_plat_marvell_armada = {
 	.init_quirk = xhci_mvebu_mbus_init_quirk,
+	.resume_quirk = xhci_mvebu_mbus_init_quirk,
 };
 
 static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = {
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: xhci-plat: mvebu: restore MBus windows on resume
  2026-12-03  5:36 [PATCH] usb: xhci-plat: mvebu: restore MBus windows on resume Rosen Penev
@ 2026-12-03  5:46 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-03  5:46 UTC (permalink / raw)
  To: Rosen Penev, linux-usb

> The Armada 375/38x xHCI reaches DRAM through MBus decoding windows in
> its second register block. They are only programmed from ->init_quirk()
> at probe time. On boards that lose SoC power in suspend-to-RAM, the
> windows read back as zero on resume, so the controller has no path to
> memory and its DMA fails.
> 
> The AHCI and mvneta drivers on the same SoCs already reprogram their
> windows on resume. Do the same here by using the existing MBus setup
> as ->resume_quirk(), which xhci_plat_resume_common() calls before
> xhci_resume(). Reprogramming is idempotent, so it is also safe when
> power was kept.
> 
> Fixes: 973747928514 ("usb: host: xhci-plat: add support for the Armada 375/38x XHCI controllers")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203053651.928611-1-rosenp@gmail.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-03  5:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  5:36 [PATCH] usb: xhci-plat: mvebu: restore MBus windows on resume Rosen Penev
2026-12-03  5:46 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox