Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754606AbbHLLGV (ORCPT ); Wed, 12 Aug 2015 07:06:21 -0400 Received: from regular1.263xmail.com ([211.150.99.133]:41315 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbbHLLGT (ORCPT ); Wed, 12 Aug 2015 07:06:19 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: lyz@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: lyz@rock-chips.com X-UNIQUE-TAG: <59d1d2c45b78313d12e17da1ad47f22d> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <55CB28A1.6090208@rock-chips.com> Date: Wed, 12 Aug 2015 19:06:09 +0800 From: Yunzhi Li User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: balbi@ti.com CC: jwerner@chromium.org, dianders@chromium.org, huangtao@rock-chips.com, cf@rock-chips.com, hl@rock-chips.com, linux-rockchip@lists.infradead.org, John Youn , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] usb: dwc2: reset AHB hclk domain before init References: <1439260062-12049-1-git-send-email-lyz@rock-chips.com> <20150811141229.GB13920@saruman.tx.rr.com> In-Reply-To: <20150811141229.GB13920@saruman.tx.rr.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2129 Lines: 59 Hi , 在 2015/8/11 22:12, Felipe Balbi 写道: > Hi, > > On Tue, Aug 11, 2015 at 10:27:42AM +0800, Yunzhi Li wrote: >> We initiate dwc2 usb controller in BIOS, when kernel driver >> start-up we should reset AHB hclk domain to reset all AHB >> interface registers to default. Without this the FIFO value >> setting might be incorrect because calculating FIFO size need the >> power-on value of GRXFSIZ/GNPTXFSIZ/HPTXFSIZ registers. >> >> This patch could avoid warnning massage like in rk3288 platform: >> [ 2.074764] dwc2 ff580000.usb: 256 invalid for >> host_perio_tx_fifo_size. Check HW configuration. >> >> Signed-off-by: Yunzhi Li >> >> --- >> >> drivers/usb/dwc2/platform.c | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c >> index 9093530..3da21ab 100644 >> --- a/drivers/usb/dwc2/platform.c >> +++ b/drivers/usb/dwc2/platform.c >> @@ -42,6 +42,7 @@ >> #include >> #include >> #include >> +#include >> >> #include >> >> @@ -165,6 +166,7 @@ static int dwc2_driver_probe(struct platform_device *dev) >> struct resource *res; >> struct phy *phy; >> struct usb_phy *uphy; >> + struct reset_control *rst; >> int retval; >> int irq; >> >> @@ -189,6 +191,16 @@ static int dwc2_driver_probe(struct platform_device *dev) >> >> hsotg->dev = &dev->dev; >> >> + /* AHB hclk domain reset, set all AHB interface registers to default */ >> + rst = devm_reset_control_get_optional(&dev->dev, "ahb_reset"); > why isn't this done in core so PCI systems can also make use of it ? > I have no ides about how to reset a PCI interface dwc2 controller, John could you please give some infomation about it ? Is it also needed for PCI interface dwc2 IP ? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/