From patchwork Thu Sep 1 00:40: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: 75142 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp20036qga; Wed, 31 Aug 2016 17:41:37 -0700 (PDT) X-Received: by 10.66.80.2 with SMTP id n2mr21805772pax.134.1472690485894; Wed, 31 Aug 2016 17:41:25 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oy8si2396026pac.126.2016.08.31.17.41.25; Wed, 31 Aug 2016 17:41:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933993AbcIAAlM (ORCPT + 8 others); Wed, 31 Aug 2016 20:41:12 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33772 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933791AbcIAAk5 (ORCPT ); Wed, 31 Aug 2016 20:40:57 -0400 Received: by mail-pa0-f53.google.com with SMTP id cy9so23605613pac.0 for ; Wed, 31 Aug 2016 17:40: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=XMlwgRKfa9b5rDN0l0bSBaQXIHXQvpOK7c7qjHHLFdM=; b=eYCh1PRIr81VHNqtFc2J53lDmwgV/ofYETmnpIVBWuaFvPi0bgx6O4Xr7lYb8NlZCA B+eZyNio5y3Ek1lRKFLrfSHLw6lpZrueOnuhiieGc5eMOYYi+ouphpiEkvC/ZZI5i8P5 xFh9FyLPR1sEJnhootiRTfbOIq5IM8Ih4rQxU= 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=XMlwgRKfa9b5rDN0l0bSBaQXIHXQvpOK7c7qjHHLFdM=; b=P0zi6qRDAILqcZCEAQKx25dPHICDjRsvNYMao0f8VUSfHyHxVwEnB1EhdDmLY4NLT8 XGmxMIu/VKga6py2ont+FNUVh/in0N+TY8wgyvDT+lfN78dTt6GXGyywiHh+BhQtEkBg kbMuufwbfQRHJytYGxiOm2fcJvGTDTm1OpN0bIyoPWwDd4XW2jwSyWi7R+eXuZWDODN4 WDhpr1e/XZwuWjoF2H2wapw0IweBR0li4gU0UAUlVFGUgeCOhsMAK72/BgeJMh6ubUnv FQzU2O1YaeWIGPOLZkeOXqyG5PXWzkFVepIQ1z29a7PidXZSdDPqGd1+VJjPZJGF4ewc m2FA== X-Gm-Message-State: AE9vXwO/6PGwZPRJB3P+aLFBz01OECFCYtkpWMVpvyLekE9hoofnJHaHVAb8sCYnxUNQRFzX X-Received: by 10.66.119.11 with SMTP id kq11mr21952789pab.14.1472690451927; Wed, 31 Aug 2016 17:40:51 -0700 (PDT) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id m5sm2292303paw.40.2016.08.31.17.40.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Aug 2016 17:40:51 -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 v3 13/22] usb: chipidea: msm: Use hw_write_id_reg() instead of writel Date: Wed, 31 Aug 2016 17:40:27 -0700 Message-Id: <20160901004036.23936-14-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.9.0.rc2.8.ga28705d In-Reply-To: <20160901004036.23936-1-stephen.boyd@linaro.org> References: <20160901004036.23936-1-stephen.boyd@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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.9.0.rc2.8.ga28705d -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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: