From patchwork Sun Jun 26 07:28:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 70863 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp554913qgy; Sun, 26 Jun 2016 00:30:13 -0700 (PDT) X-Received: by 10.98.110.195 with SMTP id j186mr22624150pfc.49.1466926213829; Sun, 26 Jun 2016 00:30:13 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f186si18117590pfb.129.2016.06.26.00.30.13; Sun, 26 Jun 2016 00:30:13 -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 S1752396AbcFZH31 (ORCPT + 30 others); Sun, 26 Jun 2016 03:29:27 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:35625 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbcFZH25 (ORCPT ); Sun, 26 Jun 2016 03:28:57 -0400 Received: by mail-pf0-f173.google.com with SMTP id c2so51926803pfa.2 for ; Sun, 26 Jun 2016 00:28:57 -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=EJ6ipqoS7q1NarGFbTklGItzzsGPppiD2bLOr2GMfDY=; b=alxCWkyNFxL2BqzwwairAVVV7esb5JB8XsTypkoPFpdgL6BjKx3SBwUlFtGIl8BCVZ qIiip5BSR+vflqpgf5mP85Se2RFOPUphPU55YlL42Av5GNK+MHy76QKdPExYDQ8c48SV mxLxPSiMP7/3NuzvmryR0mobXud39hsuA3wwM= 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=EJ6ipqoS7q1NarGFbTklGItzzsGPppiD2bLOr2GMfDY=; b=Wfj9SJvzH3I1V2GOxEQb+wbjD3YfzED79YuCcSi3pN9gHf9vv3zYrDMqf7iB63vE+Q JkqQPPtK27Fj/2FHSidEhngWtB816ThtEu3GS+iSfFZaCYiemcQL7PQZ6GHEiyMMFC53 iVkcT22q/G28+VOcVc5Y7ws4NU4BN/Fiz9csDE0qb2KYkcWB6qUk5Yylg75MqAEmrlds kEvpIMnp1EhflRMAs6yDS/ee6YjO1cHLtwSmWGj813pTDoYdvwixozddb6d3UV7JhgPX Ij1tAaFaicE8s3PyzhnRF8ptwk21OK6dUI1i2xTrnu5qZzjkzsCkkLhUh+7+kXtSVVmk ZCUw== X-Gm-Message-State: ALyK8tJ1RFrCnkwO9Rrr8cxEmTO9wtMwE/7Swgod/9cpntCE8BRqwL48P1UgDsavR2loWYqQ X-Received: by 10.98.66.208 with SMTP id h77mr22343857pfd.30.1466926136018; Sun, 26 Jun 2016 00:28:56 -0700 (PDT) Received: from localhost.localdomain (ip68-101-172-78.sd.sd.cox.net. [68.101.172.78]) by smtp.gmail.com with ESMTPSA id f138sm3790495pfa.17.2016.06.26.00.28.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Jun 2016 00:28:55 -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 11/21] usb: chipidea: msm: Use hw_write_id_reg() instead of writel directly Date: Sun, 26 Jun 2016 00:28:28 -0700 Message-Id: <20160626072838.28082-12-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.9.0.rc2.8.ga28705d In-Reply-To: <20160626072838.28082-1-stephen.boyd@linaro.org> References: <20160626072838.28082-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. Cc: 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.9.0.rc2.8.ga28705d diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index 37591a4b1346..520c85e701ef 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: