From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>, jbe@pengutronix.de
Subject: Re: [PATCH] usb: imx: Only use clock when it exists
Date: Tue, 23 May 2017 21:42:33 -0700 [thread overview]
Message-ID: <CAHQ1cqE445BUz9y8_rmBENYD5nxhYU9AeJhPv5O7GGQcgq5-ww@mail.gmail.com> (raw)
In-Reply-To: <20170523130937.24433-1-s.hauer@pengutronix.de>
On Tue, May 23, 2017 at 6:09 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Fixes: bbe0df90b8e2463dd8db651e9f1dd57702985d2d
>
> I assumed all chipidea devices actually have a clock. This is true
> when looking at the device tree, but in barebox not all i.MX SoCs
> use the clocks provided by the device tree. Most instead use
> clkdev_add_physbase() to attach a clocks to devices. For these the
> chipidea device does not have a clock.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Just tried on a custom i.MX51 based board I wrote my USB clock patch
from earlier for. Seems to work with said patch dropped from the tree,
so:
Tested-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> drivers/usb/imx/chipidea-imx.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c
> index 67d01d3de5..39593c40fb 100644
> --- a/drivers/usb/imx/chipidea-imx.c
> +++ b/drivers/usb/imx/chipidea-imx.c
> @@ -276,10 +276,8 @@ static int imx_chipidea_probe(struct device_d *dev)
> * devices which have only one.
> */
> ci->clk = clk_get(dev, NULL);
> - if (IS_ERR(ci->clk))
> - return PTR_ERR(ci->clk);
> -
> - clk_enable(ci->clk);
> + if (!IS_ERR(ci->clk))
> + clk_enable(ci->clk);
>
> if (of_property_read_bool(dev->device_node, "fsl,usbphy")) {
> ci->phy = of_phy_get_by_phandle(dev, "fsl,usbphy", 0);
> --
> 2.11.0
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2017-05-24 4:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 13:09 Sascha Hauer
2017-05-24 4:42 ` Andrey Smirnov [this message]
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=CAHQ1cqE445BUz9y8_rmBENYD5nxhYU9AeJhPv5O7GGQcgq5-ww@mail.gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=jbe@pengutronix.de \
--cc=s.hauer@pengutronix.de \
/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