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: 102318 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2858964qge; Wed, 18 May 2016 14:26:21 -0700 (PDT) X-Received: by 10.98.31.65 with SMTP id f62mr14145770pff.83.1463606780925; Wed, 18 May 2016 14:26:20 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si14548728pad.28.2016.05.18.14.26.20; Wed, 18 May 2016 14:26:20 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754276AbcERV0E (ORCPT + 29 others); Wed, 18 May 2016 17:26:04 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.0 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: