All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: balbi@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
	gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/3] usb: renesas_usbhs: Add multiple clocks management
Date: Thu, 6 Sep 2018 06:49:47 +0000	[thread overview]
Message-ID: <87sh2n9led.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <1536213014-1325-4-git-send-email-yoshihiro.shimoda.uh@renesas.com>


Hi Shimoda-san

> R-Car Gen3 needs to enable clocks of both host and peripheral.
> Since [eo]hci-platform disables the reset(s) when the drivers are
> removed, renesas_usbhs driver doesn't work correctly. To fix this
> issue, this patch adds multiple clocks management on this
> renesas_usbhs driver.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
(snip)
> +		/* enable clks if exist */
> +		if (priv->num_clks &&
> +		    clk_bulk_prepare_enable(priv->num_clks, priv->clks))
> +			return;
(snip)
> +		/* disable clks if exist */
> +		if (priv->num_clks)
> +			clk_bulk_disable_unprepare(priv->num_clks, priv->clks);

I think clk_bulk_xxx() will do nothing if priv->num_clks was 0.
priv->num_clks check is not neede, I think.

Best regards
---
Kuninori Morimoto

WARNING: multiple messages have this Message-ID
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: <balbi@kernel.org>, <robh+dt@kernel.org>, <mark.rutland@arm.com>,
	<gregkh@linuxfoundation.org>, <linux-usb@vger.kernel.org>,
	<linux-renesas-soc@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] usb: renesas_usbhs: Add multiple clocks management
Date: Thu, 6 Sep 2018 06:49:47 +0000	[thread overview]
Message-ID: <87sh2n9led.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <1536213014-1325-4-git-send-email-yoshihiro.shimoda.uh@renesas.com>


Hi Shimoda-san

> R-Car Gen3 needs to enable clocks of both host and peripheral.
> Since [eo]hci-platform disables the reset(s) when the drivers are
> removed, renesas_usbhs driver doesn't work correctly. To fix this
> issue, this patch adds multiple clocks management on this
> renesas_usbhs driver.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
(snip)
> +		/* enable clks if exist */
> +		if (priv->num_clks &&
> +		    clk_bulk_prepare_enable(priv->num_clks, priv->clks))
> +			return;
(snip)
> +		/* disable clks if exist */
> +		if (priv->num_clks)
> +			clk_bulk_disable_unprepare(priv->num_clks, priv->clks);

I think clk_bulk_xxx() will do nothing if priv->num_clks was 0.
priv->num_clks check is not neede, I think.

Best regards
---
Kuninori Morimoto

WARNING: multiple messages have this Message-ID
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: balbi@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
	gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org
Subject: [v3,3/3] usb: renesas_usbhs: Add multiple clocks management
Date: Thu, 6 Sep 2018 06:49:47 +0000	[thread overview]
Message-ID: <87sh2n9led.wl-kuninori.morimoto.gx@renesas.com> (raw)

Hi Shimoda-san

> R-Car Gen3 needs to enable clocks of both host and peripheral.
> Since [eo]hci-platform disables the reset(s) when the drivers are
> removed, renesas_usbhs driver doesn't work correctly. To fix this
> issue, this patch adds multiple clocks management on this
> renesas_usbhs driver.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
(snip)
> +		/* enable clks if exist */
> +		if (priv->num_clks &&
> +		    clk_bulk_prepare_enable(priv->num_clks, priv->clks))
> +			return;
(snip)
> +		/* disable clks if exist */
> +		if (priv->num_clks)
> +			clk_bulk_disable_unprepare(priv->num_clks, priv->clks);

I think clk_bulk_xxx() will do nothing if priv->num_clks was 0.
priv->num_clks check is not neede, I think.

Best regards
---
Kuninori Morimoto

  reply	other threads:[~2018-09-06  6:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  5:50 [PATCH v3 0/3] usb: renesas_usbhs: add reset_control and " Yoshihiro Shimoda
2018-09-06  5:50 ` [PATCH v3 1/3] usb: renesas_usbhs: Add reset_control Yoshihiro Shimoda
2018-09-06  5:50   ` [v3,1/3] " Yoshihiro Shimoda
2018-09-06  5:50 ` [PATCH v3 2/3] dt-bindings: usb: renesas_usbhs: add clock-names property Yoshihiro Shimoda
2018-09-06  5:50   ` [v3,2/3] " Yoshihiro Shimoda
2018-09-06  5:50 ` [PATCH v3 3/3] usb: renesas_usbhs: Add multiple clocks management Yoshihiro Shimoda
2018-09-06  5:50   ` [v3,3/3] " Yoshihiro Shimoda
2018-09-06  6:49   ` Kuninori Morimoto [this message]
2018-09-06  6:49     ` Kuninori Morimoto
2018-09-06  6:49     ` [PATCH v3 3/3] " Kuninori Morimoto
2018-09-06  7:28   ` Geert Uytterhoeven
2018-09-06  7:28     ` [v3,3/3] " Geert Uytterhoeven
2018-09-06 12:09     ` [PATCH v3 3/3] " Yoshihiro Shimoda
2018-09-06 12:09       ` [v3,3/3] " Yoshihiro Shimoda

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=87sh2n9led.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    --subject='Re: [PATCH v3 3/3] usb: renesas_usbhs: Add multiple clocks management' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.