From patchwork Wed May 18 21:24:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9122591 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 60AF99F1D3 for ; Wed, 18 May 2016 21:26:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87C75202EC for ; Wed, 18 May 2016 21:26:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EDD02010C for ; Wed, 18 May 2016 21:26:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754225AbcERV0C (ORCPT ); Wed, 18 May 2016 17:26:02 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:50365 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753921AbcERVY4 (ORCPT ); Wed, 18 May 2016 17:24:56 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0LgtFa-1bOT9F2tza-00oDxJ; Wed, 18 May 2016 23:24:39 +0200 From: Arnd Bergmann To: Felipe Balbi Cc: Arnd Bergmann , Andy Gross , David Brown , Peter Chen , Greg Kroah-Hartman , Alan Stern , Mark Brown , Bjorn Andersson , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-usb@vger.kernel.org Subject: [RFC 3/8] usb: chipidea: msm: remove open-coded phy init Date: Wed, 18 May 2016 23:24:08 +0200 Message-Id: <1463606653-325131-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1463606653-325131-1-git-send-email-arnd@arndb.de> References: <1463606653-325131-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:bGlYaVsX8PlhOAPSHSWRhsbYGp5aTqdWN7R0Na1puKOhw6azz+v xfNfc34aHiqQiA1MbTk8xXP79XgOmr82YHY3faJWbbW/W8YCBwiQCgCzy4m68fWqDXpsI1w d9YH2ciIPPnEHS7VJMDv02fcIXXduzgZGxLSv6zWBS3dr5d7Xe5ttAnsTnO6HGQK0ds3ufP 0tN6LM7RVHxIkg9UaHEkg== X-UI-Out-Filterresults: notjunk:1; V01:K0:NutqGIXUyUI=:oBPIiXkLIoCLMK9LUejocC gZL4HovwBfSgHVMIqNt4kGgNJaGSLnIO7AdD2j9rVRxCQujDPKtyRgf57/U+6h/SdR7nJS11B wJMDoUHAnH8w5fH1gl7yx27C/ZGP3WrP2sWXeiRdD4ljmM312FyZNtgjTqKqeDvy3mB2ArulD xqUVWeC82lSy15mpB1wtxR5hX6eXt9meErZWzN/lVZESLjvkUoB/ostyGrdpISGvdDoQ1w0Yb bfO+Jj6tIaggp9yqtLZVJKT2kJGi2HjYtAnwiuPbe5n9FCCTfO/HfgtTVulwru8BFAjR0K60r JEojMTy1HweVDQADvUZ1m1j6y3CFhFxqImHWDGqrEzSDAhlapk5oRgo1zE/Kn9cgx2oDNiyca bXk3rFNFDxbJYpRQBwjplP9Fp1A8YtcQFvVSgGGLeDbV22zK28d1wO8dzXUfQ5ftbukfJ8nMY at4rFUE0sS/BDgj5SmL5/cnf+BjYywRM4U7SGY9BLlohVd9sa/MvVwdk8Rc9zG1SuJHFqKjuj 5MXNbDYRB/Nxr6AiD8e54lMBGXabBv/9XWidKffCD2UIoY9XhYxEJ069oV2WCMKAEa0x59XG+ 63dXm9ozpfdkqKK1sohRujcp1ISyj2Annvqx0YRHeVsd4XhU87tK9+fvA9b4xF+6fMelrO4l+ eNRWgCYLYLCKpH//8XeNU1Mc5vXpSCXwVaBmyDEVplQDNC+4EcvFWjeWgmz4cCPn0hYo= Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After commit 233c7daf4eec ("usb: chipidea: msm: Initialize PHY on reset event"), we always call usb_phy_init() when receiving a CI_HDRC_CONTROLLER_RESET_EVENT event, but we also set the USB_AHBBURST and USB_AHBMODE registers to the same values that the reset function does. This removes the duplicate initialization, to avoid the dependency on the header file and the phy registers. Signed-off-by: Arnd Bergmann --- drivers/usb/chipidea/ci_hdrc_msm.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index 3889809fd0c4..7cae571d15f8 100644 --- a/drivers/usb/chipidea/ci_hdrc_msm.c +++ b/drivers/usb/chipidea/ci_hdrc_msm.c @@ -8,15 +8,12 @@ #include #include #include -#include #include #include #include #include "ci.h" -#define MSM_USB_BASE (ci->hw_bank.abs) - static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event) { struct device *dev = ci->gadget.dev.parent; @@ -24,9 +21,6 @@ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event) switch (event) { case CI_HDRC_CONTROLLER_RESET_EVENT: dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n"); - writel(0, USB_AHBBURST); - /* use AHB transactor, allow posted data writes */ - writel(0x8, USB_AHBMODE); usb_phy_init(ci->usb_phy); break; case CI_HDRC_CONTROLLER_STOPPED_EVENT: