From edad34b883efc20c9cd28b96ec77318556508663 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Mon, 6 Jan 2020 22:21:37 -0700 Subject: mb/google/dedede: Enable ACPI and add ACPI table Enable ACPI configuration and add DSDT ACPI table. BUG=b:144768001 TEST=Build Test Change-Id: I0aa889cd52bff3e1e9ff7b7b93ec1000045bcfd2 Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://review.coreboot.org/c/coreboot/+/38279 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/mainboard/google/dedede/Kconfig | 2 ++ src/mainboard/google/dedede/dsdt.asl | 41 +++++++++++++++++++++++++++++++++ src/mainboard/google/dedede/mainboard.c | 10 +++++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/mainboard/google/dedede/dsdt.asl (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig index 7c42404d09..21ba001757 100644 --- a/src/mainboard/google/dedede/Kconfig +++ b/src/mainboard/google/dedede/Kconfig @@ -1,5 +1,7 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE def_bool n + select HAVE_ACPI_RESUME + select HAVE_ACPI_TABLES select SOC_INTEL_JASPERLAKE if BOARD_GOOGLE_BASEBOARD_DEDEDE diff --git a/src/mainboard/google/dedede/dsdt.asl b/src/mainboard/google/dedede/dsdt.asl new file mode 100644 index 0000000000..c387fd38d7 --- /dev/null +++ b/src/mainboard/google/dedede/dsdt.asl @@ -0,0 +1,41 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2020 The coreboot project Authors. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include + +DefinitionBlock( + "dsdt.aml", + "DSDT", + 0x02, /* DSDT revision: ACPI v2.0 and up */ + OEM_ID, + ACPI_TABLE_CREATOR, + 0x20110725 /* OEM revision */ +) +{ + /* Some generic macros */ + #include + + /* global NVS and variables */ + #include + + /* CPU */ + #include + + Scope (\_SB) { + Device (PCI0) + { + #include + #include + } + } + + /* Chipset specific sleep states */ + #include + +} diff --git a/src/mainboard/google/dedede/mainboard.c b/src/mainboard/google/dedede/mainboard.c index 3b36abe661..b663a43071 100644 --- a/src/mainboard/google/dedede/mainboard.c +++ b/src/mainboard/google/dedede/mainboard.c @@ -6,6 +6,7 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ +#include #include #include @@ -18,9 +19,16 @@ static void mainboard_init(void *chip_info) gpio_configure_pads(pads, num); } +static unsigned long mainboard_write_acpi_tables( + struct device *device, unsigned long current, acpi_rsdp_t *rsdp) +{ + return current; +} + static void mainboard_enable(struct device *dev) { - /* TODO: Enable mainboard */ + dev->ops->write_acpi_tables = mainboard_write_acpi_tables; + dev->ops->acpi_inject_dsdt_generator = NULL; } struct chip_operations mainboard_ops = { -- cgit v1.2.3