Re: [PATCH v14 01/18] irqchip/sifive-plic: Convert PLIC driver into a platform driver

Emil Renner Berthing
2024-06-19T17:47:01Z

Anup Patel wrote:
> On Tue, Jun 18, 2024 at 7:00 PM Emil Renner Berthing
> <emil.renner.berthing@canonical.com> wrote:
> >
> > Anup Patel wrote:
> > > The PLIC driver does not require very early initialization so convert
> > > it into a platform driver.
> > >
> > > After conversion, the PLIC driver is probed after CPUs are brought-up
> > > so setup cpuhp state after context handler of all online CPUs are
> > > initialized otherwise PLIC driver crashes for platforms with multiple
> > > PLIC instances.
> > >
> > > Signed-off-by: Anup Patel <apatel@ventanamicro.com>
> >
> > Hi Anup,
> >
> > Sorry for the late reply to the mailing list, but ever since 6.9 where this was
> > applied my Allwinner D1 based boards no longer boot. This is the log of my
> > LicheeRV Dock booting plain 6.10-rc4, locking up and then rebooting due to the
> > the watchdog timing out:
> >
> > https://pastebin.com/raw/nsbzgEKW
> >
> > On 6.10-rc4 I can bring the same board to boot by reverting this patch and all
> > patches building on it. Eg.:
> >
> > git revert e306a894bd51 a7fb69ffd7ce abb720579490 \
> > 956521064780 a15587277a24 6c725f33d67b \
> > b68d0ff529a9 25d862e183d4 8ec99b033147
>
> Does your board boot with only SBI timer driver enabled ?

I'm not 100% sure this is what you mean, but with this change I can disable
CONFIG_SUN4I_TIMER:

diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index f51bb24bc84c..0143545348eb 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -39,7 +39,6 @@ config ARCH_SUNXI
bool "Allwinner sun20i SoCs"
depends on MMU && !XIP_KERNEL
select ERRATA_THEAD
- select SUN4I_TIMER
help
This enables support for Allwinner sun20i platform hardware,
including boards based on the D1 and D1s SoCs.

But unfortunately the board still doesn't boot:
https://pastebin.com/raw/AwRxcfeu

/Emil