All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Emil Renner Berthing <kernel@esmil.dk>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	devicetree@vger.kernel.org,  linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	 linux-clk <linux-clk@vger.kernel.org>
Subject: Re: [PATCH] riscv: dts: starfive: replace underscores in node names
Date: Tue, 5 Mar 2024 15:44:59 +0100	[thread overview]
Message-ID: <CAMuHMdWw0dteXO2jw4cwGvzKcL6vmnb96C=qgPgUqNDMtF6X0Q@mail.gmail.com> (raw)
In-Reply-To: <20240213144638.341509-1-krzysztof.kozlowski@linaro.org>

Hi Krzysztof

On Tue, Feb 13, 2024 at 3:48 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> Underscores should not be used in node names (dtc with W=2 warns about
> them), so replace them with hyphens.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks for your patch, which is now commit f03606470886e781 ("riscv:
dts: starfive: replace underscores in node names") in v6.8-rc6.

This causes e.g. BeagleV Starlight to hang during boot without any
output.  Booting with "earlycon" reveals:

    dw-apb-uart 12440000.serial: error -EINVAL: clock rate not defined
    dw-apb-uart: probe of 12440000.serial failed with error -22

and indeed, p->uartclk = 0.

> --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi
> @@ -113,28 +113,28 @@ cpu_crit {
>                 };
>         };
>
> -       osc_sys: osc_sys {
> +       osc_sys: osc-sys {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* This value must be overridden by the board */
>                 clock-frequency = <0>;
>         };
>
> -       osc_aud: osc_aud {
> +       osc_aud: osc-aud {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* This value must be overridden by the board */
>                 clock-frequency = <0>;
>         };
>
> -       gmac_rmii_ref: gmac_rmii_ref {
> +       gmac_rmii_ref: gmac-rmii-ref {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* Should be overridden by the board when needed */
>                 clock-frequency = <0>;
>         };
>
> -       gmac_gr_mii_rxclk: gmac_gr_mii_rxclk {
> +       gmac_gr_mii_rxclk: gmac-gr-mii-rxclk {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* Should be overridden by the board when needed */

The clock driver relies on the clock names, which are (in the absence
of clock-output-names properties) identical to the actual node names:

drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name = "osc_sys";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name = "osc_aud";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name =
"gmac_rmii_ref";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name =
"gmac_gr_mii_rxclk";

Hence these clocks can no longer be found, and all children have a
zero clock rate, causing the breakage.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Emil Renner Berthing <kernel@esmil.dk>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	devicetree@vger.kernel.org,  linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	 linux-clk <linux-clk@vger.kernel.org>
Subject: Re: [PATCH] riscv: dts: starfive: replace underscores in node names
Date: Tue, 5 Mar 2024 15:44:59 +0100	[thread overview]
Message-ID: <CAMuHMdWw0dteXO2jw4cwGvzKcL6vmnb96C=qgPgUqNDMtF6X0Q@mail.gmail.com> (raw)
In-Reply-To: <20240213144638.341509-1-krzysztof.kozlowski@linaro.org>

Hi Krzysztof

On Tue, Feb 13, 2024 at 3:48 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> Underscores should not be used in node names (dtc with W=2 warns about
> them), so replace them with hyphens.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks for your patch, which is now commit f03606470886e781 ("riscv:
dts: starfive: replace underscores in node names") in v6.8-rc6.

This causes e.g. BeagleV Starlight to hang during boot without any
output.  Booting with "earlycon" reveals:

    dw-apb-uart 12440000.serial: error -EINVAL: clock rate not defined
    dw-apb-uart: probe of 12440000.serial failed with error -22

and indeed, p->uartclk = 0.

> --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi
> @@ -113,28 +113,28 @@ cpu_crit {
>                 };
>         };
>
> -       osc_sys: osc_sys {
> +       osc_sys: osc-sys {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* This value must be overridden by the board */
>                 clock-frequency = <0>;
>         };
>
> -       osc_aud: osc_aud {
> +       osc_aud: osc-aud {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* This value must be overridden by the board */
>                 clock-frequency = <0>;
>         };
>
> -       gmac_rmii_ref: gmac_rmii_ref {
> +       gmac_rmii_ref: gmac-rmii-ref {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* Should be overridden by the board when needed */
>                 clock-frequency = <0>;
>         };
>
> -       gmac_gr_mii_rxclk: gmac_gr_mii_rxclk {
> +       gmac_gr_mii_rxclk: gmac-gr-mii-rxclk {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* Should be overridden by the board when needed */

The clock driver relies on the clock names, which are (in the absence
of clock-output-names properties) identical to the actual node names:

drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name = "osc_sys";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name = "osc_aud";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name =
"gmac_rmii_ref";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name =
"gmac_gr_mii_rxclk";

Hence these clocks can no longer be found, and all children have a
zero clock rate, causing the breakage.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

  parent reply	other threads:[~2024-03-05 14:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 14:46 [PATCH] riscv: dts: starfive: replace underscores in node names Krzysztof Kozlowski
2024-02-13 14:46 ` Krzysztof Kozlowski
2024-02-13 16:41 ` Conor Dooley
2024-02-13 16:41   ` Conor Dooley
2024-03-05 14:44 ` Geert Uytterhoeven [this message]
2024-03-05 14:44   ` Geert Uytterhoeven
2024-03-05 15:55   ` Krzysztof Kozlowski
2024-03-05 15:55     ` Krzysztof Kozlowski

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='CAMuHMdWw0dteXO2jw4cwGvzKcL6vmnb96C=qgPgUqNDMtF6X0Q@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@esmil.dk \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.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.