From patchwork Wed Dec 28 22:57:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9490815 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 3607C62AB7 for ; Wed, 28 Dec 2016 23:09:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C25E20855 for ; Wed, 28 Dec 2016 23:09:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1067A266F3; Wed, 28 Dec 2016 23:09:30 +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 8F24A262F2 for ; Wed, 28 Dec 2016 23:09:29 +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 1cMNK0-0000le-5a; Wed, 28 Dec 2016 23:07:48 +0000 Received: from mail-pg0-x22f.google.com ([2607:f8b0:400e:c05::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cMNAM-00012L-V3 for linux-arm-kernel@lists.infradead.org; Wed, 28 Dec 2016 22:57:52 +0000 Received: by mail-pg0-x22f.google.com with SMTP id g1so120720234pgn.0 for ; Wed, 28 Dec 2016 14:57:30 -0800 (PST) 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=IFJeohzYcFGfD0l7Zdxob6Nqqh4qKrGrEuj0UbRzEZc/8aqC+tzqKBLzKn66dcB6eZ vSOuYxBPIso2/VZCL3gEqvIhWxZEiLzn3DtcFWFEsi0WkeLyMN3+ieSey6v0nfxmK+E6 nYHqtnB+hshAE/RQqQYRSlZmPnYG4pc5MNDA8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7+cuLliKUNLr3GScCv9jqYqaJ+tfyproUSg4CDmwAYk=; b=C+MDOE5oWjtTF5lL+B/WQEZRAEgcZNlC++tT/p1D79RU9cb71aqX6Urs5fxQsxbJFl lU0L+XExKz5SeNqsKCXKbcCF6tu2BwMhpqZ/yWz3fxh/YpWTXAFqfEcFty38Bk4M1VN/ 2ZOxFIv1seDSg1Pwl3m821BJx1KTHRFj6dvaxDAQDEm8AzlKWNlngTa1s4L22n4/2RgS pfbUzNKSvpDXrjAwgFmd+mTIo7qrtcGldDhqxtczhuJYKOX3WmSq1vAdzJKhe6KKNUjH jnQwN/TfeLwo+iuzX26tLQsPU13Gw+oPR1HJtuvDUv46HslqbxHuDbqBDNqEq+d+PhEY rW4g== X-Gm-Message-State: AIkVDXLBOvCtyrhj39hlQgb++ClDnfgJBW1vJSnqSlfqalzg4g+WbYqDoixiZseCCokYbdH5 X-Received: by 10.84.212.144 with SMTP id e16mr82462787pli.140.1482965849941; Wed, 28 Dec 2016 14:57:29 -0800 (PST) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id x4sm100355741pgc.14.2016.12.28.14.57.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Dec 2016 14:57:29 -0800 (PST) From: Stephen Boyd To: linux-usb@vger.kernel.org Subject: [PATCH v6 14/25] usb: chipidea: msm: Use hw_write_id_reg() instead of writel Date: Wed, 28 Dec 2016 14:57:00 -0800 Message-Id: <20161228225711.698-15-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.10.0.297.gf6727b0 In-Reply-To: <20161228225711.698-1-stephen.boyd@linaro.org> References: <20161228225711.698-1-stephen.boyd@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161228_145751_138348_D034CE9B X-CRM114-Status: GOOD ( 12.62 ) 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. 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(-) 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: