From patchwork Tue Oct 18 01:56:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 77909 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp657636qge; Mon, 17 Oct 2016 19:00:54 -0700 (PDT) X-Received: by 10.99.53.193 with SMTP id c184mr558576pga.169.1476756053997; Mon, 17 Oct 2016 19:00:53 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h190si29678563pgc.72.2016.10.17.19.00.53; Mon, 17 Oct 2016 19:00:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030267AbcJRCAd (ORCPT + 27 others); Mon, 17 Oct 2016 22:00:33 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:35828 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936445AbcJRB4z (ORCPT ); Mon, 17 Oct 2016 21:56:55 -0400 Received: by mail-pf0-f182.google.com with SMTP id s8so85942281pfj.2 for ; Mon, 17 Oct 2016 18:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7+cuLliKUNLr3GScCv9jqYqaJ+tfyproUSg4CDmwAYk=; b=WTigwNdbHt2nWKOqQYCdrxeF3QDd3umOj1Cp346ewDcBF2h+2JmN0o3Lzw4qv6WnK5 Y+oYMeDCE5bM8NdImUl9e1WC3mhiwjBWDEg6fkpJ56fTymKEZvDKf11v/u/niajZ8c5x jUCnnLK6xn2hnQ1+bysS2eFwrdU8aascD9Ey4= 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:in-reply-to :references; bh=7+cuLliKUNLr3GScCv9jqYqaJ+tfyproUSg4CDmwAYk=; b=m007K0TyhOIfvQMgCwlC8jFARugSu/8TAFEqF3svxhgXs9aDHs0GFOjrLJFsGYfzP/ /jLE40cCZ0MrrE8K8e2zZIuwABxlMk5d7YaYFF6nWbwtL2zIgjRcosiHsaJ8muqQMj5b I+XvfV4w1uWu9jY3cKfiDIvza+3+xP/i6SiFYLlDNa0S05Ro/wOoib4KzGHhfGABeZAe mHm7ACeeoOgqqmQpjSCNe3uQdvq/2OWMVqqOgXWQE/IZtyEHjeqsdZtVoTUNZpmoNH8g Kx8Jbo5qiY31o/0/VhnW23/atNVa45g7+q70q7WoihIajrUKY8AtSLU7+8U/2iVOGrwW npAg== X-Gm-Message-State: AA6/9RnIx53NX59DeHCkW3QID32KzxMPfVBKt+r8g5gsRTi54DC9Owrd8toS+Sl+JuJ7Lu1R X-Received: by 10.99.169.25 with SMTP id u25mr597668pge.6.1476755814788; Mon, 17 Oct 2016 18:56:54 -0700 (PDT) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id j6sm51020430paa.44.2016.10.17.18.56.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Oct 2016 18:56:54 -0700 (PDT) From: Stephen Boyd To: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Neil Armstrong , Arnd Bergmann , Felipe Balbi , Peter Chen , Greg Kroah-Hartman Subject: [PATCH v5 14/23] usb: chipidea: msm: Use hw_write_id_reg() instead of writel Date: Mon, 17 Oct 2016 18:56:27 -0700 Message-Id: <20161018015636.11701-15-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.10.0.297.gf6727b0 In-Reply-To: <20161018015636.11701-1-stephen.boyd@linaro.org> References: <20161018015636.11701-1-stephen.boyd@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The MSM_USB_BASE macro trick is not very clear, and we're using it for only one register write so let's just move to using hw_write_id_reg() and passing the ci pointer instead. That clearly shows what offset we're using and avoids needing to include the msm_hsusb_hw.h file when we're going to delete that file soon. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- drivers/usb/chipidea/ci_hdrc_msm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.10.0.297.gf6727b0 diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index 719b20caf88e..b282a717bf8c 100644 --- a/drivers/usb/chipidea/ci_hdrc_msm.c +++ b/drivers/usb/chipidea/ci_hdrc_msm.c @@ -8,14 +8,12 @@ #include #include #include -#include -#include #include #include #include "ci.h" -#define MSM_USB_BASE (ci->hw_bank.abs) +#define HS_PHY_AHB_MODE 0x0098 static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event) { @@ -25,7 +23,7 @@ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event) case CI_HDRC_CONTROLLER_RESET_EVENT: dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n"); /* use AHB transactor, allow posted data writes */ - writel(0x8, USB_AHBMODE); + hw_write_id_reg(ci, HS_PHY_AHB_MODE, 0xffffffff, 0x8); usb_phy_init(ci->usb_phy); break; case CI_HDRC_CONTROLLER_STOPPED_EVENT: