[RFC PATCH 3/4] usb: dwc3: core: Share global register access with xhci driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
 drivers/usb/dwc3/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index e027c0420dc3..b19b7b540182 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -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);
 
-- 
2.28.0




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux