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: 89225 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp5739821qgi; Wed, 28 Dec 2016 15:00:52 -0800 (PST) X-Received: by 10.84.197.129 with SMTP id n1mr82837380pld.30.1482966052052; Wed, 28 Dec 2016 15:00:52 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si51393881pli.198.2016.12.28.15.00.51; Wed, 28 Dec 2016 15:00:52 -0800 (PST) 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 S1752482AbcL1XAq (ORCPT + 25 others); Wed, 28 Dec 2016 18:00:46 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:34392 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752246AbcL1W5a (ORCPT ); Wed, 28 Dec 2016 17:57:30 -0500 Received: by mail-pg0-f48.google.com with SMTP id y62so107848534pgy.1 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=d8j4wXtrltqaSb6YPwL9te1szse0Q2omAaDcI9vC2twdRDYKZljmG/SnEqTONcQbux APzdukXtcK6hOZPZsq4Q499r1aqWZ9z70iC+IKTny+sp7cvGECAd8IXiZu+3ltCf1tVy AonUf9P2cvLUjZq3F4RSa2D24rOwo41LSbDTBMqwt/a0W/rw6/wc0Rz+P33nhDZdNa1j sEYPWguNPmxeE8nO03JUkGg3exj3VroS85w5QizJ3NIyrE6eYDf+R/stLmn4N0ucsXJF hd/I8e7ba2rWEjjCca8uZKfDY7cVAjnjG9Ar5p0PUCCc8aESSobiEhBmfiaXDSzGh3kS Mwyw== X-Gm-Message-State: AIkVDXIQlb5f6B9lf0vG0hSui/joI7LymkmLKxxZKXjigQocomP8SNVR9AQfzlEFiDKNo+SC 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 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 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> 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: