From patchwork Thu Apr 9 08:33:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 6184341 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 24D229F2EC for ; Thu, 9 Apr 2015 08:35:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4006F20411 for ; Thu, 9 Apr 2015 08:35:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 620E9203DB for ; Thu, 9 Apr 2015 08:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932604AbbDIIeD (ORCPT ); Thu, 9 Apr 2015 04:34:03 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:37128 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932586AbbDIIeA (ORCPT ); Thu, 9 Apr 2015 04:34:00 -0400 Received: by wiaa2 with SMTP id a2so88954099wia.0 for ; Thu, 09 Apr 2015 01:33:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HEfIwmrIZ4SO88IlzYpDkbFaSTCy48Y0psI36jlO5pw=; b=gm1flAQz6JAtdKBKDyGHrYOGzTr1gO7/mWw6T8qyoyTaZVbd2qR69LBGEePUvNLMPc YegiXQXImguo5+kZ9gxXzwgw7B02Zy9sMKq9Jkb5jrVg85M5odEAj38SErVhyktaszSg g3MA4+FjkPDz/kOB3Acleip+RxqFCx0EeqM6jBthdaJzCBjJqs3pvbPjj8v5Q36Tr4rV cPUQKrnzP6csLelLg0h399umcaSIhzSz53a69OrHQ4G2MTw7Fc9k0FbVh0lHrzPJjFCJ PeyERDqOfI4P3ruSU8s2VDOlHGbDg9aa9lGu3g9R0JVvsMqN4O5Su0+BZbpL616L52Ou ZmDg== X-Gm-Message-State: ALoCoQm/YVLdu1nVG/iE8qDhPevAsPU3gyu5vEFYq/4hlmfKcyVfIbYkMIKXr+OtwDQprM4CLtzT X-Received: by 10.194.61.82 with SMTP id n18mr2827217wjr.35.1428568439386; Thu, 09 Apr 2015 01:33:59 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by mx.google.com with ESMTPSA id g8sm19094579wiy.19.2015.04.09.01.33.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Apr 2015 01:33:58 -0700 (PDT) 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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,