Re: [RFC PATCH v1 12/21] irqchip/riscv-intc: Use swnode framework to create fwnode

Sunil V L
2023-08-09T05:49:18Z

On Tue, Aug 08, 2023 at 09:31:49AM +0100, Conor Dooley wrote:
> Hey Sunil,
>
> On Thu, Aug 03, 2023 at 11:29:07PM +0530, Sunil V L wrote:
> > By using swnode framework, all data from ACPI tables can
> > be populated as properties of the swnode. This simplifies
> > the driver code and removes the need for ACPI vs DT checks.
> > Use this framework for RISC-V INTC driver.
>
> btw, you are permitted to use more than 60 characters in a commit
> message...
>
Sure.

> >
> > Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
> > ---
> > Documentation/riscv/acpi.rst | 21 +++++++++++++++
> > arch/riscv/include/asm/acpi.h | 1 +
> > drivers/acpi/riscv/Makefile | 2 +-
> > drivers/acpi/riscv/irqchip.c | 46 ++++++++++++++++++++++++++++++++
> > drivers/irqchip/irq-riscv-intc.c | 12 ++++-----
> > 5 files changed, 75 insertions(+), 7 deletions(-)
> > create mode 100644 drivers/acpi/riscv/irqchip.c
> >
> > diff --git a/Documentation/riscv/acpi.rst b/Documentation/riscv/acpi.rst
> > index 9870a282815b..e2406546bc16 100644
> > --- a/Documentation/riscv/acpi.rst
> > +++ b/Documentation/riscv/acpi.rst
> > @@ -8,3 +8,24 @@ The ISA string parsing rules for ACPI are defined by `Version ASCIIDOC
> > Conversion, 12/2022 of the RISC-V specifications, as defined by tag
> > "riscv-isa-release-1239329-2023-05-23" (commit 1239329
> > ) <https://github.com/riscv/riscv-isa-manual/releases/tag/riscv-isa-release-1239329-2023-05-23>`_
> > +
> > +Interrupt Controller Drivers
> > +=======
> > +
> > +ACPI drivers for RISC-V interrupt controllers use software node framework to
> > +create the fwnode for the interrupt controllers. Below properties are
> > +additionally required for some firmware nodes apart from the properties
> > +defined by the device tree bindings for these interrupt controllers. The
> > +properties are created using the data in MADT table.
>
> I don't really understand this text, specifically what you are getting
> at w/ the dependency on devicetree properties. What exactly does "apart
> from the properties defined by the devicetree bindings" mean?
>
> Is there prior art for this kind of "ACPI needs swnodes that look
> vaguely similar to devicetree" for other interrupt controllers?
>
Never mind. This will not be required with Marc's feedback.

Thanks,
Sunil