@@ -1697,7 +1697,7 @@ static int dwc3_probe(struct platform_device *pdev)
dwc->xhci_resources[0].start = res->start;
dwc->xhci_resources[0].end = dwc->xhci_resources[0].start +
- DWC3_XHCI_REGS_END;
+ DWC3_GLOBALS_REGS_END;
dwc->xhci_resources[0].flags = res->flags;
dwc->xhci_resources[0].name = res->name;
@@ -1708,7 +1708,7 @@ static int dwc3_probe(struct platform_device *pdev)
dwc_res = *res;
dwc_res.start += DWC3_GLOBALS_REGS_START;
- regs = devm_ioremap_resource(dev, &dwc_res);
+ regs = devm_ioremap(dev, dwc_res.start, resource_size(&dwc_res));
if (IS_ERR(regs))
return PTR_ERR(regs);
When the dwc3 driver create a xhci platform device and pass its control to the xhci driver, allow it to also have access to dwc3 global registers. The xhci-snps needs access to the global register parameters to handle some quirks. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> --- drivers/usb/dwc3/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)