Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107199123
D35700.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35700.diff
View Options
diff --git a/sys/dev/usb/controller/dwc3.c b/sys/dev/usb/controller/dwc3.c
--- a/sys/dev/usb/controller/dwc3.c
+++ b/sys/dev/usb/controller/dwc3.c
@@ -147,22 +147,33 @@
return (0);
}
-#if 0
+#ifdef DWC3_DEBUG
static void
-snsp_dwc3_dump_regs(struct snps_dwc3_softc *sc)
+snsp_dwc3_dump_regs(struct snps_dwc3_softc *sc, const char *msg)
{
+ struct xhci_softc *xsc;
uint32_t reg;
+ if (!bootverbose)
+ return;
+
+ device_printf(sc->dev, "%s: %s:\n", __func__, msg ? msg : "");
+
reg = DWC3_READ(sc, DWC3_GCTL);
- device_printf(sc->dev, "GCTL: %x\n", reg);
+ device_printf(sc->dev, "GCTL: %#012x\n", reg);
+ reg = DWC3_READ(sc, DWC3_GUCTL);
+ device_printf(sc->dev, "GUCTL: %#012x\n", reg);
reg = DWC3_READ(sc, DWC3_GUCTL1);
- device_printf(sc->dev, "GUCTL1: %x\n", reg);
+ device_printf(sc->dev, "GUCTL1: %#012x\n", reg);
reg = DWC3_READ(sc, DWC3_GUSB2PHYCFG0);
- device_printf(sc->dev, "GUSB2PHYCFG0: %x\n", reg);
+ device_printf(sc->dev, "GUSB2PHYCFG0: %#012x\n", reg);
reg = DWC3_READ(sc, DWC3_GUSB3PIPECTL0);
- device_printf(sc->dev, "GUSB3PIPECTL0: %x\n", reg);
+ device_printf(sc->dev, "GUSB3PIPECTL0: %#012x\n", reg);
reg = DWC3_READ(sc, DWC3_DCFG);
- device_printf(sc->dev, "DCFG: %x\n", reg);
+ device_printf(sc->dev, "DCFG: %#012x\n", reg);
+
+ xsc = &sc->sc;
+ device_printf(sc->dev, "xhci quirks: %#012x\n", xsc->sc_quirks);
}
#endif
@@ -384,10 +395,14 @@
snps_dwc3_configure_host(sc);
snps_dwc3_configure_phy(sc);
snps_dwc3_do_quirks(sc);
-#if 0
- snsp_dwc3_dump_regs(sc);
+
+#ifdef DWC3_DEBUG
+ snsp_dwc3_dump_regs(sc, "Pre XHCI init");
#endif
snps_dwc3_attach_xhci(dev);
+#ifdef DWC3_DEBUG
+ snsp_dwc3_dump_regs(sc, "Post XHCI init");
+#endif
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 1:37 PM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15769788
Default Alt Text
D35700.diff (1 KB)
Attached To
Mode
D35700: dwc3: improve debugging
Attached
Detach File
Event Timeline
Log In to Comment