Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755042AbbDIIeF (ORCPT ); Thu, 9 Apr 2015 04:34:05 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:34992 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932588AbbDIIeA (ORCPT ); Thu, 9 Apr 2015 04:34:00 -0400 From: "Ivan T. Ivanov" To: Alan Stern Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] usb: ehci-msm: Don't ioremap configuration space exclusively Date: Thu, 9 Apr 2015 11:33:56 +0300 Message-Id: <1428568436-9134-1-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1336 Lines: 42 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/