Skip to contentSkip to conversation

usb: dwc3: debugfs: fix regdump offset

PATCH New Jack Pham 1 participant 1 message Dec 10, 2012

Subsystems (3)
lore
Share & tools
lore

Jack Pham

author
#0 lore raw

PATCH 1/1 usb: dwc3: debugfs: fix regdump offset

As with dwc_readl/writel, the global registers are specified as offsets starting from the beginning of the xHCI address space, but the memory region pointed to by dwc->regs already maps to the start of the global addresses. Fix by offsetting each of the regs relative to DWC3_GLOBALS_REGS_START.

---
 drivers/usb/dwc3/debugfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/dwc3/debugfs.c +1 -1
index d4a30f1..be4eff7 100644
@@ -56,7 +56,7 @@
 #define dump_register(nm)				\
 {							\
 	.name	= __stringify(nm),			\
-	.offset	= DWC3_ ##nm,				\
+	.offset	= DWC3_ ##nm - DWC3_GLOBALS_REGS_START,	\
 }
 
 static const struct debugfs_reg32 dwc3_regs[] = {
Signature · 8 lines
Employee of Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html