From patchwork Wed Sep 7 21:35:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9320027 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 03DC9607D3 for ; Wed, 7 Sep 2016 21:39:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1007929433 for ; Wed, 7 Sep 2016 21:39:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 048A829436; Wed, 7 Sep 2016 21:39:08 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75A8F29433 for ; Wed, 7 Sep 2016 21:39:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935484AbcIGVhD (ORCPT ); Wed, 7 Sep 2016 17:37:03 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34498 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757406AbcIGVfi (ORCPT ); Wed, 7 Sep 2016 17:35:38 -0400 Received: by mail-pa0-f52.google.com with SMTP id to9so9974831pac.1 for ; Wed, 07 Sep 2016 14:35:38 -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=ZWlnQpqx2W99HerlDGOjGtRvadVnsArswzngB2fHxFHPXERfcpOnotvnXFgaqmKyNE jvTEy02wKM113a4X+ryXywJ/A43T1TgaLRr2WQEjkL0ych7wt7eabtrFxlaLe9tyAFKG EgdbtXj/oA7Qcdn8F6kQANSdXRIzNSBzpXOsQ= 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=CNgYgLauwg7rUXA6PlXyxoaYt9EapvXPCuHHvpEplDi2o0btaiGf2z9cR9cxgPTBX/ SG+txeLSb333pUjIEo68BNg6BJxr+ABRmD9Bf75BAk2ZlpC/LpSBfhJyfO+VD8hPP8R9 CIUXtIO6V9hZQlX1v6Gobnc/Upqwoxid8+j6iTBAHMVb+ujCfihbDkqHErnT7KkpsPYO V52G5FBCHke0dVz/crExg0ug/bR1pzUNVyZ7bPf4t8tSV3y4V1fsK78t16QocSLvPvxH 0yK0skTmholdp9GsCDqEeSeOXCLhL9wqtfYUQTO++Nq33DOMzPIHCnCRomSVy/I6p/pc QbbQ== X-Gm-Message-State: AE9vXwNypOJ73P9xsNlR3xNboQ3xzOe6REshjcgFM5VAGwiN13A5n4zWV6rvbBGd5vlfUNPa X-Received: by 10.66.155.129 with SMTP id vw1mr85842229pab.148.1473284138106; Wed, 07 Sep 2016 14:35:38 -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 75sm51015417pfw.92.2016.09.07.14.35.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 14:35:37 -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 v4 13/22] usb: chipidea: msm: Use hw_write_id_reg() instead of writel Date: Wed, 7 Sep 2016 14:35:10 -0700 Message-Id: <20160907213519.27340-14-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.9.0.rc2.8.ga28705d In-Reply-To: <20160907213519.27340-1-stephen.boyd@linaro.org> References: <20160907213519.27340-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 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: