From eb6cac2f16b2df0922d5104481d36029d4a13712 Mon Sep 17 00:00:00 2001 From: Johnny Lin Date: Thu, 22 Aug 2019 09:21:34 +0800 Subject: soc/intel/fsp_broadwell_de: Add ACPI HPET table Tested on Mono Lake TEST=Note the kernel log: hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0 hpet0: 8 comparators, 64-bit 14.318180 MHz counter Change-Id: Idae9a7d3d4233037214d6203996bf44fe5f3a845 Signed-off-by: Johnny Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/35027 Reviewed-by: Johnny Lin Reviewed-by: Andrey Petrov Reviewed-by: David Hendricks Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/soc/intel/fsp_broadwell_de/Kconfig | 4 ++++ src/soc/intel/fsp_broadwell_de/acpi.c | 11 +++++++++++ src/soc/intel/fsp_broadwell_de/include/soc/acpi.h | 4 +++- src/soc/intel/fsp_broadwell_de/southcluster.c | 3 ++- 4 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/fsp_broadwell_de/Kconfig b/src/soc/intel/fsp_broadwell_de/Kconfig index fef7a822d9..c3885258c2 100644 --- a/src/soc/intel/fsp_broadwell_de/Kconfig +++ b/src/soc/intel/fsp_broadwell_de/Kconfig @@ -92,6 +92,10 @@ config DIMM_SPD_SIZE int default 512 +config HPET_MIN_TICKS + hex + default 0x80 + ## Broadwell-DE Specific FSP Kconfig source src/soc/intel/fsp_broadwell_de/fsp/Kconfig diff --git a/src/soc/intel/fsp_broadwell_de/acpi.c b/src/soc/intel/fsp_broadwell_de/acpi.c index fef7773cf9..6b1d3f621b 100644 --- a/src/soc/intel/fsp_broadwell_de/acpi.c +++ b/src/soc/intel/fsp_broadwell_de/acpi.c @@ -566,3 +566,14 @@ unsigned long acpi_madt_irq_overrides(unsigned long current) return current; } + +unsigned long southcluster_write_acpi_tables(struct device *device, + unsigned long current, + acpi_rsdp_t *rsdp) +{ + current = acpi_write_hpet(device, current, rsdp); + current = acpi_align_current(current); + + printk(BIOS_DEBUG, "current = %lx\n", current); + return current; +} diff --git a/src/soc/intel/fsp_broadwell_de/include/soc/acpi.h b/src/soc/intel/fsp_broadwell_de/include/soc/acpi.h index da302520e0..44e17d0daf 100644 --- a/src/soc/intel/fsp_broadwell_de/include/soc/acpi.h +++ b/src/soc/intel/fsp_broadwell_de/include/soc/acpi.h @@ -27,5 +27,7 @@ uint16_t get_pmbase(void); unsigned long vtd_write_acpi_tables(struct device *const dev, unsigned long current, struct acpi_rsdp *const rsdp); - +unsigned long southcluster_write_acpi_tables(struct device *device, + unsigned long start, + acpi_rsdp_t *rsdp); #endif /* _SOC_ACPI_H_ */ diff --git a/src/soc/intel/fsp_broadwell_de/southcluster.c b/src/soc/intel/fsp_broadwell_de/southcluster.c index 2f87cad9da..599b8c5e7f 100644 --- a/src/soc/intel/fsp_broadwell_de/southcluster.c +++ b/src/soc/intel/fsp_broadwell_de/southcluster.c @@ -32,7 +32,7 @@ #include #include #include - +#include #include "chip.h" typedef struct soc_intel_fsp_broadwell_de_config config_t; @@ -277,6 +277,7 @@ static struct device_operations device_ops = { .read_resources = sc_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = NULL, + .write_acpi_tables = southcluster_write_acpi_tables, .init = sc_init, .enable = southcluster_enable_dev, .scan_bus = scan_lpc_bus, -- cgit v1.2.3