summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Lin <johnny_lin@wiwynn.com>2019-08-22 09:21:34 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-08-27 09:43:11 +0000
commiteb6cac2f16b2df0922d5104481d36029d4a13712 (patch)
tree740b9ad06247a526f93d2acb71042e4c8f525550
parent1799011dc6914927d951cc076a405c6b20ead5d5 (diff)
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 <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35027 Reviewed-by: Johnny Lin Reviewed-by: Andrey Petrov <anpetrov@fb.com> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/soc/intel/fsp_broadwell_de/Kconfig4
-rw-r--r--src/soc/intel/fsp_broadwell_de/acpi.c11
-rw-r--r--src/soc/intel/fsp_broadwell_de/include/soc/acpi.h4
-rw-r--r--src/soc/intel/fsp_broadwell_de/southcluster.c3
4 files changed, 20 insertions, 2 deletions
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 <soc/lpc.h>
#include <soc/pci_devs.h>
#include <soc/ramstage.h>
-
+#include <soc/acpi.h>
#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,