linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "krzk@kernel.org" <krzk@kernel.org>
To: Yao Lihua <ylhuajnu@outlook.com>
Cc: "linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	"kgene@kernel.org" <kgene@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] ARM: dts: s3c64xx: factor out external fixed clocks
Date: Mon, 9 Sep 2019 20:51:48 +0200	[thread overview]
Message-ID: <20190909185148.GA10163@kozik-lap> (raw)
In-Reply-To: <BY5PR12MB36996A79D9B1EEC5162B00F4C4B50@BY5PR12MB3699.namprd12.prod.outlook.com>

On Sat, Sep 07, 2019 at 02:48:08AM +0000, Yao Lihua wrote:
> From: Lihua Yao <ylhuajnu@outlook.com>
> 
> As per arch/arm/mach-s3c64xx/common.c, the external oscillators
> of S3C6400 and S3C6410 are identical. Move them to s3c64xx.dtsi
> and place under root node directly.

Hi,

Thanks for patches!

These are external oscillators so they are not a SoC property. They
should be external.

They could be moved to their own shared DTSI but I am not sure how much
benefit it will bring - it is rather small code duplication.

You need to fix the error in different way. However I do not quite
understand why moving them to the end of DTS fixed the error - they
should be now registered at the end...

Best regards,
Krzysztof

> This introduces side effect of changing the initialization order of
> fin_pll and clock-controller@7e00f000. As of commit 3f6d439f2022
> ("clk: reverse default clk provider initialization order in of_clk_init()"),
> clock providers are initialized in the orders they are present in the
> device tree unless the clocks' dependencies are specified explicitly.
> 
> without this patch:
>   [    0.000000] S3C6410 clocks: apll = 0, mpll = 0
>   [    0.000000]  epll = 0, arm_clk = 0
> 
> with this patch:
>   [    0.000000] S3C6410 clocks: apll = 532000000, mpll = 532000000
>   [    0.000000]  epll = 24000000, arm_clk = 532000000
> 
> Fixes: 3f6d439f2022 ("clk: reverse default clk provider initialization order in of_clk_init()")
> Signed-off-by: Lihua Yao <ylhuajnu@outlook.com>
> ---
>  arch/arm/boot/dts/s3c6410-mini6410.dts | 22 ----------------------
>  arch/arm/boot/dts/s3c6410-smdk6410.dts | 22 ----------------------
>  arch/arm/boot/dts/s3c64xx.dtsi         | 14 ++++++++++++++
>  3 files changed, 14 insertions(+), 44 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/s3c6410-mini6410.dts b/arch/arm/boot/dts/s3c6410-mini6410.dts
> index 5201512054c4..7028507b7076 100644
> --- a/arch/arm/boot/dts/s3c6410-mini6410.dts
> +++ b/arch/arm/boot/dts/s3c6410-mini6410.dts
> @@ -28,28 +28,6 @@
>  		bootargs = "console=ttySAC0,115200n8 earlyprintk root=/dev/nfs rw nfsroot=192.168.31.2:/srv/nfs/tiny6410,nfsvers=3 ip=dhcp";
>  	};
>  
> -	clocks {
> -		compatible = "simple-bus";
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -
> -		fin_pll: oscillator@0 {
> -			compatible = "fixed-clock";
> -			reg = <0>;
> -			clock-frequency = <12000000>;
> -			clock-output-names = "fin_pll";
> -			#clock-cells = <0>;
> -		};
> -
> -		xusbxti: oscillator@1 {
> -			compatible = "fixed-clock";
> -			reg = <1>;
> -			clock-output-names = "xusbxti";
> -			clock-frequency = <48000000>;
> -			#clock-cells = <0>;
> -		};
> -	};
> -
>  	srom-cs1@18000000 {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> diff --git a/arch/arm/boot/dts/s3c6410-smdk6410.dts b/arch/arm/boot/dts/s3c6410-smdk6410.dts
> index a9a5689dc462..10a854b488a8 100644
> --- a/arch/arm/boot/dts/s3c6410-smdk6410.dts
> +++ b/arch/arm/boot/dts/s3c6410-smdk6410.dts
> @@ -28,28 +28,6 @@
>  		bootargs = "console=ttySAC0,115200n8 earlyprintk rootwait root=/dev/mmcblk0p1";
>  	};
>  
> -	clocks {
> -		compatible = "simple-bus";
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -
> -		fin_pll: oscillator@0 {
> -			compatible = "fixed-clock";
> -			reg = <0>;
> -			clock-frequency = <12000000>;
> -			clock-output-names = "fin_pll";
> -			#clock-cells = <0>;
> -		};
> -
> -		xusbxti: oscillator@1 {
> -			compatible = "fixed-clock";
> -			reg = <1>;
> -			clock-output-names = "xusbxti";
> -			clock-frequency = <48000000>;
> -			#clock-cells = <0>;
> -		};
> -	};
> -
>  	srom-cs1@18000000 {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> diff --git a/arch/arm/boot/dts/s3c64xx.dtsi b/arch/arm/boot/dts/s3c64xx.dtsi
> index 2e611df37911..672764133cea 100644
> --- a/arch/arm/boot/dts/s3c64xx.dtsi
> +++ b/arch/arm/boot/dts/s3c64xx.dtsi
> @@ -39,6 +39,20 @@
>  		};
>  	};
>  
> +	fin_pll: oscillator-0 {
> +		compatible = "fixed-clock";
> +		clock-frequency = <12000000>;
> +		clock-output-names = "fin_pll";
> +		#clock-cells = <0>;
> +	};
> +
> +	xusbxti: oscillator-1 {
> +		compatible = "fixed-clock";
> +		clock-frequency = <48000000>;
> +		clock-output-names = "xusbxti";
> +		#clock-cells = <0>;
> +	};
> +
>  	soc: soc {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> -- 
> 2.17.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-09 18:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190907024719.16974-1-ylhuajnu@outlook.com>
2019-09-07  2:48 ` [PATCH 1/2] ARM: dts: s3c64xx: factor out external fixed clocks Yao Lihua
2019-09-09 18:51   ` krzk [this message]
2019-09-10 13:07     ` Lihua Yao
2019-09-07  2:48 ` [PATCH 2/2] ARM: dts: s3c64xx: specify dependency of clock providers Yao Lihua
2019-09-09 18:53   ` krzk

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=20190909185148.GA10163@kozik-lap \
    --to=krzk@kernel.org \
    --cc=kgene@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=ylhuajnu@outlook.com \
    /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;
as well as URLs for NNTP newsgroup(s).