[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR04MB3751BE40C3EC0BD2F392E9EEE7380@CY4PR04MB3751.namprd04.prod.outlook.com>
Date: Wed, 23 Sep 2020 00:27:42 +0000
From: Damien Le Moal <Damien.LeMoal@....com>
To: Sasha Levin <sashal@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
CC: Palmer Dabbelt <palmerdabbelt@...gle.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH AUTOSEL 5.8 20/20] riscv: Fix Kendryte K210 device tree
On 2020/09/21 23:41, Sasha Levin wrote:
> From: Damien Le Moal <damien.lemoal@....com>
>
> [ Upstream commit f025d9d9934b84cd03b7796072d10686029c408e ]
>
> The Kendryte K210 SoC CLINT is compatible with Sifive clint v0
> (sifive,clint0). Fix the Kendryte K210 device tree clint entry to be
> inline with the sifive timer definition documented in
> Documentation/devicetree/bindings/timer/sifive,clint.yaml.
> The device tree clint entry is renamed similarly to u-boot device tree
> definition to improve compatibility with u-boot defined device tree.
> To ensure correct initialization, the interrup-cells attribute is added
> and the interrupt-extended attribute definition fixed.
>
> This fixes boot failures with Kendryte K210 SoC boards.
>
> Note that the clock referenced is kept as K210_CLK_ACLK, which does not
> necessarilly match the clint MTIME increment rate. This however does not
> seem to cause any problem for now.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@....com>
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@...gle.com>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
> arch/riscv/boot/dts/kendryte/k210.dtsi | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/kendryte/k210.dtsi b/arch/riscv/boot/dts/kendryte/k210.dtsi
> index c1df56ccb8d55..d2d0ff6456325 100644
> --- a/arch/riscv/boot/dts/kendryte/k210.dtsi
> +++ b/arch/riscv/boot/dts/kendryte/k210.dtsi
> @@ -95,10 +95,12 @@ sysctl: sysctl@...40000 {
> #clock-cells = <1>;
> };
>
> - clint0: interrupt-controller@...0000 {
> + clint0: clint@...0000 {
> + #interrupt-cells = <1>;
> compatible = "riscv,clint0";
> reg = <0x2000000 0xC000>;
> - interrupts-extended = <&cpu0_intc 3>, <&cpu1_intc 3>;
> + interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
> + &cpu1_intc 3 &cpu1_intc 7>;
> clocks = <&sysctl K210_CLK_ACLK>;
> };
>
>
Sasha,
This is a fix for a problem in 5.9 tree. 5.8 kernel is fine without this patch.
And I think applying it to 5.8 might actually break things since the proper
clint driver was added to kernel 5.9 and does not exist in 5.8.
Best regards.
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists