From 7ad4dc5e9914e927a827ce48a030d2d04e7ec792 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 4 Jan 2017 14:26:26 -0600 Subject: src/amd: Add common definition of AMD ACPI MMIO address The bare ACPI MMIO address 0xFED80000 was used in multiple AMD mainboard files as well as the SB800 native code. Reduce duplication by using a centrally defined value for all AMD ACPI MMIO access. Change-Id: I39a30c0d0733096dbd5892c9e18855aa5bb5a4a7 Signed-off-by: Timothy Pearson Reviewed-on: https://review.coreboot.org/18032 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand Reviewed-by: Aaron Durbin Reviewed-by: Paul Menzel --- src/mainboard/amd/bettong/boardid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainboard/amd/bettong') diff --git a/src/mainboard/amd/bettong/boardid.c b/src/mainboard/amd/bettong/boardid.c index ae33328c1f..4b2dceb375 100644 --- a/src/mainboard/amd/bettong/boardid.c +++ b/src/mainboard/amd/bettong/boardid.c @@ -15,6 +15,7 @@ #include #include +#include #include /** @@ -34,7 +35,7 @@ uint8_t board_id(void) u8 boardrev = 0; char boardid; - gpiommioaddr = (void *)0xfed80000ul + 0x1500; + gpiommioaddr = (void *)AMD_SB_ACPI_MMIO_ADDR + 0x1500; value = read8(gpiommioaddr + (7 << 2) + 2); /* agpio7: board_id2 */ boardrev = value & 1; value = read8(gpiommioaddr + (6 << 2) + 2); /* agpio6: board_id1 */ -- cgit v1.2.3