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: 46915 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9312A218D6 for ; Thu, 9 Apr 2015 08:34:17 +0000 (UTC) Received: by widjs5 with SMTP id js5sf15620384wid.3 for ; Thu, 09 Apr 2015 01:34:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=mBRmrvg4rVzAUBaK9Tf5nlIZ03tLMnnmKatkJn2Yy38=; b=OPbm/d6h6qqEpOR/u0qbm2enq6gUw8G4HPrBkozalgSFM53vwSU4G/hszOzgcKW/ea uMglQCrN0AEZivKXl2Lglg6vS0ALYoP43ChK1w6iJMhBv7lIcpEHJu5RtZrztqyfC9M4 tFfI42WblkltDo99dOssoouKohZznvwvSw57fHcTqorYo9uYBVYV8o3zfwy+KJIrQm8n urUzvvQvv61zPbDeDi7GiwB1QjbfCiaVsbASPKPRYSzjrrMGMWjdRcP5JSjs/duCa0fx /43ffO7BdeOKiXiTkvdQw3+c4IE653I19NFWdNBb/jgO/4iFW7Rv1ToSNleV/pXPE7EJ CaWQ== X-Gm-Message-State: ALoCoQlxE3+vCt12wvZ3P73d64fMiytKq6CxOwICO1JtDByXUNrzIa6ZARvFgTTXZvsLgAheQZqV X-Received: by 10.152.23.7 with SMTP id i7mr164514laf.1.1428568456876; Thu, 09 Apr 2015 01:34:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.68 with SMTP id la4ls265052lab.25.gmail; Thu, 09 Apr 2015 01:34:16 -0700 (PDT) X-Received: by 10.152.225.133 with SMTP id rk5mr3395294lac.14.1428568456666; Thu, 09 Apr 2015 01:34:16 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id az14si10863074lab.154.2015.04.09.01.34.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2015 01:34:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbbqq2 with SMTP id qq2so76926526lbb.3 for ; Thu, 09 Apr 2015 01:34:16 -0700 (PDT) X-Received: by 10.152.36.2 with SMTP id m2mr3344359laj.72.1428568456576; Thu, 09 Apr 2015 01:34:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp333026lbt; Thu, 9 Apr 2015 01:34:15 -0700 (PDT) X-Received: by 10.70.89.199 with SMTP id bq7mr42829643pdb.168.1428568454866; Thu, 09 Apr 2015 01:34:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ny9si13037067pab.202.2015.04.09.01.34.10; Thu, 09 Apr 2015 01:34:14 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755043AbbDIIeF (ORCPT + 27 others); 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 Received: by widdi4 with SMTP id di4so83355711wid.0 for ; Thu, 09 Apr 2015 01:33:59 -0700 (PDT) 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-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.ivanov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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-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/ 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,