Hi Patrick, On Wed, 11 Sept 2024 at 00:26, Patrick Rudolph <patrick.rudo...@9elements.com> wrote: > > Generate SoC specific ACPI tables for BCM2711: > - MADT > - FADT > - PPTT > - GTDT > > Board specific tables like DSDT and SSDT are added in a separate patch. > > When ACPI is enabled for a different SoC compliation will fail by > design, indicating the required functions that needs to be implemented. > When ACPI is not enabled the added code does nothing, keeping existing > behaviour. > > TEST: Booted on RPi4 with only ACPI enabled, providing no FDT to the OS. > > Signed-off-by: Patrick Rudolph <patrick.rudo...@9elements.com> > Cc: Simon Glass <s...@chromium.org> > Cc: Matthias Brugger <mbrug...@suse.com> > Cc: Peter Robinson <pbrobin...@gmail.com> > Cc: Tom Rini <tr...@konsulko.com> > --- > Changelog v2: > - Drop duplicated code to generate ACPI tables. Is now part of efi loader. > > --- > arch/arm/mach-bcm283x/Makefile | 4 + > arch/arm/mach-bcm283x/bcm2711_acpi.c | 150 +++++++++++++++++++++++++++ > 2 files changed, 154 insertions(+) > create mode 100644 arch/arm/mach-bcm283x/bcm2711_acpi.c >
Reviewed-by: Simon Glass <s...@chromium.org> nit below > diff --git a/arch/arm/mach-bcm283x/Makefile b/arch/arm/mach-bcm283x/Makefile > index 7cd068832f..38e320307d 100644 > --- a/arch/arm/mach-bcm283x/Makefile > +++ b/arch/arm/mach-bcm283x/Makefile > @@ -4,3 +4,7 @@ > > obj-$(CONFIG_BCM2835) += lowlevel_init.o > obj-y += init.o reset.o mbox.o msg.o phys2bus.o > + > +ifeq ($(CONFIG_GENERATE_ACPI_TABLE),y) > +obj-$(CONFIG_BCM2711) += bcm2711_acpi.o > +endif > \ No newline at end of file > diff --git a/arch/arm/mach-bcm283x/bcm2711_acpi.c > b/arch/arm/mach-bcm283x/bcm2711_acpi.c > new file mode 100644 > index 0000000000..34adc0aa42 > --- /dev/null > +++ b/arch/arm/mach-bcm283x/bcm2711_acpi.c > @@ -0,0 +1,150 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * (C) Copyright 2024 9elements GmbH > + * > + * See file CREDITS for list of people who contributed to this > + * project. > + */ > + > +#include <acpi/acpi_table.h> > +#include <asm/acpi_table.h> > +#include <asm/armv8/sec_firmware.h> > +#include <asm/arch/acpi/bcm2711.h> > +#include <dm/uclass.h> > +#include <tables_csum.h> > +#include <string.h> Please fix header order [1] [1] https://docs.u-boot.org/en/latest/develop/codingstyle.html#include-files