From: narmstrong@baylibre.com (Neil Armstrong)
To: linus-amlogic@lists.infradead.org
Subject: [U-Boot] [PATCH v3 u-boot 1/3] usb: host: Add simple of glue driver for DWC3 USB Controllers integration
Date: Thu, 12 Apr 2018 10:05:50 +0200 [thread overview]
Message-ID: <873d3df8-787e-27ec-3d66-73d723ee7ddb@baylibre.com> (raw)
In-Reply-To: <75bafa27-9f08-7d3d-91a2-6b2878df16ae@ti.com>
Hi Jean-Jacques,
On 11/04/2018 18:17, Jean-Jacques Hiblot wrote:
>
>
> On 11/04/2018 17:08, Neil Armstrong wrote:
>> This is a port of the dwc3-of-simple driver from Linux to enable/deassert
>> clock and resets of a simple DWC3 Controller HW glue.
>>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>> ? drivers/usb/host/Kconfig????????? |?? 7 +++
>> ? drivers/usb/host/Makefile???????? |?? 1 +
>> ? drivers/usb/host/dwc3-of-simple.c | 109 ++++++++++++++++++++++++++++++++++++++
>> ? 3 files changed, 117 insertions(+)
>> ? create mode 100644 drivers/usb/host/dwc3-of-simple.c
>>
>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>> index a7249b7..6caa615 100644
>> --- a/drivers/usb/host/Kconfig
>> +++ b/drivers/usb/host/Kconfig
>> @@ -21,6 +21,13 @@ config USB_XHCI_DWC3
[...]
>> +
>> +static int dwc3_of_simple_clk_init(struct udevice *dev,
>> +?????????????????? struct dwc3_of_simple *simple)
>> +{
>> +??? int ret;
>> +
>> +??? ret = clk_get_bulk(dev, &simple->clks);
>> +??? if (ret == -ENOTSUPP)
>
> Must be ENOSYS instead of ENOTSUPP, otherwise probe fails on platform not using the clk framework
You are right, I naively used the same between reset and clock...
>
> tested-by: Jean-Jacques hiblot <jjhiblot@ti.com>
>
>> +??????? return 0;
>> +??? if (ret)
>> +??????? return ret;
>> +
>> +#if CONFIG_IS_ENABLED(CLK)
>> +??? ret = clk_enable_bulk(&simple->clks);
>> +??? if (ret) {
>> +??????? clk_release_bulk(&simple->clks);
>> +??????? return ret;
>> +??? }
>> +#endif
>> +
>> +??? return 0;
>> +}
[...]
Thanks,
Neil
next prev parent reply other threads:[~2018-04-12 8:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 15:07 [PATCH v3 u-boot 0/3] Add USB Support for Amlogic Meson GXL SoCs Neil Armstrong
2018-04-11 15:08 ` [PATCH v3 u-boot 1/3] usb: host: Add simple of glue driver for DWC3 USB Controllers integration Neil Armstrong
2018-04-11 16:17 ` [U-Boot] " Jean-Jacques Hiblot
2018-04-12 8:05 ` Neil Armstrong [this message]
2018-04-12 8:07 ` Ben Dooks
2018-04-12 8:08 ` Neil Armstrong
2018-04-11 15:08 ` [PATCH v3 u-boot 2/3] usb: host: dwc3: Add support for multiple PHYs Neil Armstrong
2018-04-11 15:08 ` [PATCH v3 u-boot 3/3] phy: Add Amlogic Meson USB2 & USB3 Generic PHY drivers Neil Armstrong
2018-04-11 15:20 ` [PATCH v3 u-boot 0/3] Add USB Support for Amlogic Meson GXL SoCs Marek Vasut
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=873d3df8-787e-27ec-3d66-73d723ee7ddb@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=linus-amlogic@lists.infradead.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
all inboxes | Powered by JetHome®