UPSTREAM: usb: dwc3: debugfs: fix regdump offset
authorJack Pham <jackp@codeaurora.org>
Mon, 10 Dec 2012 22:28:13 +0000 (14:28 -0800)
committerChromeBot <chrome-bot@google.com>
Tue, 23 Apr 2013 22:47:56 +0000 (15:47 -0700)
commitdb04aad0d3b3d103ec3b5b7c850c90755ecce42d
tree6736c51b5edbc30f566ca8d4c605771abb99bc9e
parenta526ff4dd6922a53701f029b3a83d0e84fba7964
UPSTREAM: 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.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 1604c1e760119ab3fe9f71679ebaeb058d3d8ae1)
Cherry pick from Linus' tree, applied cleanly

BUG=chromium:229725
TEST='cat /sys/kernel/debug/dwc3.0/regdump' should not crash on Snow.

Change-Id: Ic58153b9c3f4135355094a5dc49ad0fabb2fcd25
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48554
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
drivers/usb/dwc3/debugfs.c