summaryrefslogtreecommitdiff
path: root/src/acpi/acpi.c
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-02-23 16:32:20 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-02-25 17:44:11 +0000
commit972d9f2cce2792b847c4c1879f5b52c19585c37c (patch)
tree87166acd957448e6b262a331106e7a276806043c /src/acpi/acpi.c
parent887d4ed912ef80afbf7827150f52e207edc9c033 (diff)
arch/x86: consolidate HPET base address definitions
Both the HPET_BASE_ADDRESS define from arch/x86/include/arch/hpet.h and the HPET_ADDRESS Kconfig option define the base address of the HPET MMIO region which is 0xfed00000 on all chipsets and SoCs in the coreboot tree. Since these two different constants are used in different places that however might end up used in the same coreboot build, drop the Kconfig option and use the definition from arch/x86 instead. Since it's no longer needed to check for a mismatch of those two constants, the corresponding checks are dropped too. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ia797bb8ac150ae75807cb3bd1f9db5b25dfca35e Reviewed-on: https://review.coreboot.org/c/coreboot/+/62307 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Lance Zhao Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/acpi/acpi.c')
-rw-r--r--src/acpi/acpi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c
index 26552982e2..4e2b8dfcd9 100644
--- a/src/acpi/acpi.c
+++ b/src/acpi/acpi.c
@@ -18,6 +18,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi_ivrs.h>
#include <acpi/acpigen.h>
+#include <arch/hpet.h>
#include <arch/mmio.h>
#include <device/pci.h>
#include <cbmem.h>
@@ -848,10 +849,10 @@ void acpi_create_hpet(acpi_hpet_t *hpet)
addr->space_id = ACPI_ADDRESS_SPACE_MEMORY;
addr->bit_width = 64;
addr->bit_offset = 0;
- addr->addrl = CONFIG_HPET_ADDRESS & 0xffffffff;
- addr->addrh = ((unsigned long long)CONFIG_HPET_ADDRESS) >> 32;
+ addr->addrl = HPET_BASE_ADDRESS & 0xffffffff;
+ addr->addrh = ((unsigned long long)HPET_BASE_ADDRESS) >> 32;
- hpet->id = read32p(CONFIG_HPET_ADDRESS);
+ hpet->id = read32p(HPET_BASE_ADDRESS);
hpet->number = 0;
hpet->min_tick = CONFIG_HPET_MIN_TICKS;