From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Yunzhi Li <lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
hl-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
cf-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
jwerner-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Subject: Re: [PATCH v1] usb: dwc2: reset AHB hclk domain before init
Date: Wed, 12 Aug 2015 14:32:44 -0500 [thread overview]
Message-ID: <20150812193244.GA20972@saruman.tx.rr.com> (raw)
In-Reply-To: <55CB28A1.6090208-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2151 bytes --]
On Wed, Aug 12, 2015 at 07:06:09PM +0800, Yunzhi Li wrote:
> 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 <lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> >>
> >>---
> >>
> >> 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 <linux/of_device.h>
> >> #include <linux/mutex.h>
> >> #include <linux/platform_device.h>
> >>+#include <linux/reset.h>
> >> #include <linux/usb/of.h>
> >>@@ -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 ?
even on platform only, how do you know all users provide a ahb_reset
reset controller ?
--
balbi
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 200 bytes --]
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2015-08-12 19:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 2:27 [PATCH v1] usb: dwc2: reset AHB hclk domain before init Yunzhi Li
[not found] ` <1439260062-12049-1-git-send-email-lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-08-11 14:12 ` Felipe Balbi
2015-08-12 11:06 ` Yunzhi Li
[not found] ` <55CB28A1.6090208-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-08-12 19:32 ` Felipe Balbi [this message]
2015-08-13 8:37 ` John Youn
[not found] ` <2B3535C5ECE8B5419E3ECBE300772909017528D354-Yu2iAY70zvrYN67daEjeMPufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2015-08-13 14:28 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150812193244.GA20972@saruman.tx.rr.com \
--to=balbi-l0cymroini0@public.gmane.org \
--cc=cf-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=hl-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=jwerner-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox