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: 9199223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C8B960754 for ; Sun, 26 Jun 2016 07:34:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FD992849E for ; Sun, 26 Jun 2016 07:34:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54B4128542; Sun, 26 Jun 2016 07:34:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DFBE62849E for ; Sun, 26 Jun 2016 07:34:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bH4X8-00049H-6O; Sun, 26 Jun 2016 07:31:10 +0000 Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bH4VI-00014O-9d for linux-arm-kernel@lists.infradead.org; Sun, 26 Jun 2016 07:29:17 +0000 Received: by mail-pf0-x234.google.com with SMTP id t190so51885109pfb.3 for ; Sun, 26 Jun 2016 00:28:56 -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=Vqbe/wZApsKfgEZQKvpJESLdHDrf6NsNgZzp9Ut4oxCUPQ6NJx8VaDxle7nNWoT+HE 0Vl6G8g9rG29QjzCGnmGoDzTqNlacf8iEzmYC8bjcpHHT9JKTAxE7la/7Zu9rnJDiem9 mdJS5VBpJ6LKBEXFAFZwWRQXq1XwrhDHEOjeLI8QQ5RzOgV+UXGpMVzYP6kPWB15Sx3Q vs2KvTStmrK8WV9gNCWs4cTNga5mIbuBAAhF6vW1hFBrgt8dFErgqxtbmJlxafXz6kA8 xlDJ06WLZGgZx26B7xYclkaekoxTf4OssinWSzdB+18OfzwCtTAoD7x4twuppdVLu7KP /F5A== X-Gm-Message-State: ALyK8tJNR05+GgB/k+Yl8gLZxyA5MFHGHnhPJgVqGWtbwQ2zLEwFL8KUoeIJoKdJDRyE0KGG 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160626_002916_441334_313B2ECA X-CRM114-Status: GOOD ( 13.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Arnd Bergmann , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Peter Chen , Greg Kroah-Hartman , Andy Gross , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Peter Chen --- drivers/usb/chipidea/ci_hdrc_msm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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: