diff options
author | Simon Glass <sjg@chromium.org> | 2020-09-22 12:45:22 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-09-25 11:27:20 +0800 |
commit | ea78675b963e2e9991b4f787a29421799c13a49e (patch) | |
tree | 1855a9f1247eef014bd45aa290b7ceafa9d686d3 /arch | |
parent | 60c0231078add5bb6b6ca79edb5432fe6df69deb (diff) | |
download | u-boot-ea78675b963e2e9991b4f787a29421799c13a49e.zip u-boot-ea78675b963e2e9991b4f787a29421799c13a49e.tar.gz u-boot-ea78675b963e2e9991b4f787a29421799c13a49e.tar.bz2 |
x86: apl: Generate ACPI table for LPC
Add an ACPI table for the LPC on Apollo Lake.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/cpu/apollolake/lpc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c index b81a458..a29832c 100644 --- a/arch/x86/cpu/apollolake/lpc.c +++ b/arch/x86/cpu/apollolake/lpc.c @@ -9,10 +9,14 @@ #include <dm.h> #include <log.h> #include <spl.h> +#include <acpi/acpi_table.h> +#include <asm/cpu_common.h> +#include <asm/intel_acpi.h> #include <asm/lpc_common.h> #include <asm/pci.h> #include <asm/arch/iomap.h> #include <asm/arch/lpc.h> +#include <dm/acpi.h> #include <linux/log2.h> void lpc_enable_fixed_io_ranges(uint io_enables) @@ -110,6 +114,19 @@ void lpc_io_setup_comm_a_b(void) lpc_enable_fixed_io_ranges(com_enable); } +static int apl_acpi_lpc_get_name(const struct udevice *dev, char *out_name) +{ + return acpi_copy_name(out_name, "LPCB"); +} + +struct acpi_ops apl_lpc_acpi_ops = { + .get_name = apl_acpi_lpc_get_name, +#ifdef CONFIG_GENERATE_ACPI_TABLE + .write_tables = intel_southbridge_write_acpi_tables, +#endif + .inject_dsdt = southbridge_inject_dsdt, +}; + static const struct udevice_id apl_lpc_ids[] = { { .compatible = "intel,apl-lpc" }, { } @@ -120,4 +137,5 @@ U_BOOT_DRIVER(apl_lpc_drv) = { .name = "intel_apl_lpc", .id = UCLASS_LPC, .of_match = apl_lpc_ids, + ACPI_OPS_PTR(&apl_lpc_acpi_ops) }; |