From patchwork Mon Jan 27 05:06:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 240245 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 26 Jan 2020 22:06:41 -0700 Subject: [PATCH 094/108] x86: apl: Generate ACPI table for LPC In-Reply-To: <20200127050655.170614-1-sjg@chromium.org> References: <20200127050655.170614-1-sjg@chromium.org> Message-ID: <20200126220508.94.Ie219a98cd7e07d939f53d36c407ed88e7089b54a@changeid> Add an ACPI table for the LPC on Apollo Lake. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/lpc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c index 45b2144fc6..7c0ebf332b 100644 --- a/arch/x86/cpu/apollolake/lpc.c +++ b/arch/x86/cpu/apollolake/lpc.c @@ -6,12 +6,16 @@ */ #include +#include #include #include +#include +#include #include #include #include #include +#include #include void lpc_enable_fixed_io_ranges(uint io_enables) @@ -109,6 +113,17 @@ 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_return_name(out_name, "LPCB"); +} + +struct acpi_ops apl_lpc_acpi_ops = { + .get_name = apl_acpi_lpc_get_name, + .write_tables = intel_southbridge_write_acpi_tables, + .inject_dsdt = southbridge_inject_dsdt, +}; + static const struct udevice_id apl_lpc_ids[] = { { .compatible = "intel,apl-lpc" }, { } @@ -119,4 +134,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) };