All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Kuske <jenskuske@gmail.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
	Chen-Yu Tsai <wens@csie.org>
Cc: Mike Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Vishnu Patekar <vishnupatekar0510@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	Jean-Francois Moine <moinejf@free.fr>
Subject: Re: [PATCH v3 2/2] clk: sunxi: Refactor A31 PLL6 so that it can be reused
Date: Fri, 29 Jan 2016 11:02:46 +0100	[thread overview]
Message-ID: <56AB38C6.2010909@gmail.com> (raw)
In-Reply-To: <1454008958-12655-2-git-send-email-maxime.ripard@free-electrons.com>

Hi,

On 28/01/16 20:22, Maxime Ripard wrote:
> Remove the fixed dividers from the PLL6 driver to be able to have a
> reusable driver that can be used across several SoCs that share the same
> controller, but don't have the same set of dividers for this clock, and to
> also be reused multiple times in the same SoC, since we're droping the
> clock name.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
> Changes from v2
>   - Rebased and converted over to the new factors refactoring. Fixed the
>     retrieved rate
> 
>  arch/arm/boot/dts/sun6i-a31.dtsi     | 36 ++++++++++++++++++------------------
>  arch/arm/boot/dts/sun8i-a23-a33.dtsi | 25 +++++++++++++++++--------
>  arch/arm/boot/dts/sun8i-a23.dtsi     |  2 +-
>  arch/arm/boot/dts/sun8i-a33.dtsi     |  4 ++--
>  arch/arm/boot/dts/sun8i-h3.dtsi      | 36 ++++++++++++++++++------------------
>  drivers/clk/sunxi/clk-sunxi.c        | 32 ++++++++++++++++----------------
>  6 files changed, 72 insertions(+), 63 deletions(-)
> 
[...]
> diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
> index 1524130e43c9..19aadf47027d 100644
> --- a/arch/arm/boot/dts/sun8i-h3.dtsi
> +++ b/arch/arm/boot/dts/sun8i-h3.dtsi
> @@ -121,27 +121,27 @@
>  		};
>  
>  		pll6: clk@01c20028 {
> -			#clock-cells = <1>;
> +			#clock-cells = <0>;
>  			compatible = "allwinner,sun6i-a31-pll6-clk";
>  			reg = <0x01c20028 0x4>;
>  			clocks = <&osc24M>;
> -			clock-output-names = "pll6", "pll6x2";
> +			clock-output-names = "pll6";
>  		};
>  
> -		pll6d2: pll6d2_clk {
> +		pll6x2: pll6x2_clk {
>  			#clock-cells = <0>;
>  			compatible = "fixed-factor-clock";
> -			clock-div = <2>;
> -			clock-mult = <1>;
> -			clocks = <&pll6 0>;
> -			clock-output-names = "pll6d2";
> +			clock-div = <1>;
> +			clock-mult = <2>;
> +			clocks = <&pll6>;
> +			clock-output-names = "pll6-2x";
>  		};
>  
> -		/* dummy clock until pll6 can be reused */
> -		pll8: pll8_clk {
> +		pll8: clk@01c20044 {
>  			#clock-cells = <0>;
> -			compatible = "fixed-clock";
> -			clock-frequency = <1>;
> +			compatible = "allwinner,sun6i-a31-pll6-clk";
> +			reg = <0x01c20044 0x4>;
> +			clocks = <&osc24M>;
>  			clock-output-names = "pll8";
>  		};
>  
> @@ -165,7 +165,7 @@
>  			#clock-cells = <0>;
>  			compatible = "allwinner,sun6i-a31-ahb1-clk";
>  			reg = <0x01c20054 0x4>;
> -			clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
> +			clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>;
>  			clock-output-names = "ahb1";
>  		};
>  
> @@ -173,7 +173,7 @@
>  			#clock-cells = <0>;
>  			compatible = "allwinner,sun8i-h3-ahb2-clk";
>  			reg = <0x01c2005c 0x4>;
> -			clocks = <&ahb1>, <&pll6d2>;
> +			clocks = <&ahb1>, <&pll6>;

According to the datasheet AHB2 really has PLL6 / 2 as parent, not PLL6
directly.

Jens

WARNING: multiple messages have this Message-ID (diff)
From: jenskuske@gmail.com (Jens Kuske)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] clk: sunxi: Refactor A31 PLL6 so that it can be reused
Date: Fri, 29 Jan 2016 11:02:46 +0100	[thread overview]
Message-ID: <56AB38C6.2010909@gmail.com> (raw)
In-Reply-To: <1454008958-12655-2-git-send-email-maxime.ripard@free-electrons.com>

Hi,

On 28/01/16 20:22, Maxime Ripard wrote:
> Remove the fixed dividers from the PLL6 driver to be able to have a
> reusable driver that can be used across several SoCs that share the same
> controller, but don't have the same set of dividers for this clock, and to
> also be reused multiple times in the same SoC, since we're droping the
> clock name.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
> Changes from v2
>   - Rebased and converted over to the new factors refactoring. Fixed the
>     retrieved rate
> 
>  arch/arm/boot/dts/sun6i-a31.dtsi     | 36 ++++++++++++++++++------------------
>  arch/arm/boot/dts/sun8i-a23-a33.dtsi | 25 +++++++++++++++++--------
>  arch/arm/boot/dts/sun8i-a23.dtsi     |  2 +-
>  arch/arm/boot/dts/sun8i-a33.dtsi     |  4 ++--
>  arch/arm/boot/dts/sun8i-h3.dtsi      | 36 ++++++++++++++++++------------------
>  drivers/clk/sunxi/clk-sunxi.c        | 32 ++++++++++++++++----------------
>  6 files changed, 72 insertions(+), 63 deletions(-)
> 
[...]
> diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
> index 1524130e43c9..19aadf47027d 100644
> --- a/arch/arm/boot/dts/sun8i-h3.dtsi
> +++ b/arch/arm/boot/dts/sun8i-h3.dtsi
> @@ -121,27 +121,27 @@
>  		};
>  
>  		pll6: clk at 01c20028 {
> -			#clock-cells = <1>;
> +			#clock-cells = <0>;
>  			compatible = "allwinner,sun6i-a31-pll6-clk";
>  			reg = <0x01c20028 0x4>;
>  			clocks = <&osc24M>;
> -			clock-output-names = "pll6", "pll6x2";
> +			clock-output-names = "pll6";
>  		};
>  
> -		pll6d2: pll6d2_clk {
> +		pll6x2: pll6x2_clk {
>  			#clock-cells = <0>;
>  			compatible = "fixed-factor-clock";
> -			clock-div = <2>;
> -			clock-mult = <1>;
> -			clocks = <&pll6 0>;
> -			clock-output-names = "pll6d2";
> +			clock-div = <1>;
> +			clock-mult = <2>;
> +			clocks = <&pll6>;
> +			clock-output-names = "pll6-2x";
>  		};
>  
> -		/* dummy clock until pll6 can be reused */
> -		pll8: pll8_clk {
> +		pll8: clk at 01c20044 {
>  			#clock-cells = <0>;
> -			compatible = "fixed-clock";
> -			clock-frequency = <1>;
> +			compatible = "allwinner,sun6i-a31-pll6-clk";
> +			reg = <0x01c20044 0x4>;
> +			clocks = <&osc24M>;
>  			clock-output-names = "pll8";
>  		};
>  
> @@ -165,7 +165,7 @@
>  			#clock-cells = <0>;
>  			compatible = "allwinner,sun6i-a31-ahb1-clk";
>  			reg = <0x01c20054 0x4>;
> -			clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
> +			clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>;
>  			clock-output-names = "ahb1";
>  		};
>  
> @@ -173,7 +173,7 @@
>  			#clock-cells = <0>;
>  			compatible = "allwinner,sun8i-h3-ahb2-clk";
>  			reg = <0x01c2005c 0x4>;
> -			clocks = <&ahb1>, <&pll6d2>;
> +			clocks = <&ahb1>, <&pll6>;

According to the datasheet AHB2 really has PLL6 / 2 as parent, not PLL6
directly.

Jens

  parent reply	other threads:[~2016-01-29 10:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 19:22 [PATCH v3 1/2] clk: sunxi: factors: Add missing recalc pointer copy Maxime Ripard
2016-01-28 19:22 ` Maxime Ripard
2016-01-28 19:22 ` [PATCH v3 2/2] clk: sunxi: Refactor A31 PLL6 so that it can be reused Maxime Ripard
2016-01-28 19:22   ` Maxime Ripard
2016-01-29  9:56   ` Chen-Yu Tsai
2016-01-29  9:56     ` Chen-Yu Tsai
2016-01-29 10:02   ` Jens Kuske [this message]
2016-01-29 10:02     ` Jens Kuske
2016-01-29 10:14     ` Chen-Yu Tsai
2016-01-29 10:14       ` Chen-Yu Tsai
2016-02-01 19:46       ` Maxime Ripard
2016-02-01 19:46         ` Maxime Ripard
2016-01-30 17:57   ` Jean-Francois Moine
2016-01-30 17:57     ` Jean-Francois Moine
2016-01-31 12:08     ` Chen-Yu Tsai
2016-01-31 12:08       ` Chen-Yu Tsai
2016-01-31 14:26       ` Jean-Francois Moine
2016-01-31 14:26         ` Jean-Francois Moine
2016-02-01 20:17     ` Maxime Ripard
2016-02-01 20:17       ` Maxime Ripard
2016-02-02  6:52       ` Jean-Francois Moine
2016-02-02  6:52         ` Jean-Francois Moine
2016-02-03 19:07         ` Maxime Ripard
2016-02-03 19:07           ` Maxime Ripard
2016-01-29  6:18 ` [PATCH v3 1/2] clk: sunxi: factors: Add missing recalc pointer copy Chen-Yu Tsai
2016-01-29  6:18   ` Chen-Yu Tsai
2016-01-29 10:37   ` Maxime Ripard
2016-01-29 10:37     ` Maxime Ripard

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=56AB38C6.2010909@gmail.com \
    --to=jenskuske@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=moinejf@free.fr \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=vishnupatekar0510@gmail.com \
    --cc=wens@csie.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 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.