mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: ehci-msm: Don't ioremap configuration space exclusively
@ 2015-04-09  8:33 Ivan T. Ivanov
  2015-04-09 14:49 ` Alan Stern
  0 siblings, 1 reply; 8+ messages in thread
From: Ivan T. Ivanov @ 2015-04-09  8:33 UTC (permalink / raw)
  To: Alan Stern; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, linux-arm-msm

This allow same IO space to be shared between HCD and Device
controller driver. Which can be loaded simultaneously and
started/stopped on demand by USB OTG PHY driver.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
---
 drivers/usb/host/ehci-msm.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 9db74ca..f059e15 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -88,13 +88,17 @@ static int ehci_msm_probe(struct platform_device *pdev)
 	}

 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hcd->regs = devm_ioremap_resource(&pdev->dev, res);
+	if (!res)
+		return -ENODEV;
+
+	hcd->rsrc_start = res->start;
+	hcd->rsrc_len = resource_size(res);
+
+	hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len);
 	if (IS_ERR(hcd->regs)) {
 		ret = PTR_ERR(hcd->regs);
 		goto put_hcd;
 	}
-	hcd->rsrc_start = res->start;
-	hcd->rsrc_len = resource_size(res);

 	/*
 	 * OTG driver takes care of PHY initialization, clock management,
--
1.9.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-20 17:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-09  8:33 [PATCH] usb: ehci-msm: Don't ioremap configuration space exclusively Ivan T. Ivanov
2015-04-09 14:49 ` Alan Stern
2015-04-15 15:58   ` Vivek Gautam
2015-04-16  7:42     ` Ivan T. Ivanov
2015-04-20  8:18       ` Ivan T. Ivanov
2015-04-20 14:14         ` Alan Stern
2015-04-20 15:55           ` Ivan T. Ivanov
2015-04-20 17:36             ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®