cpu,mb,nb,soc: use HPET_BASE_ADDRESS instead of magic number
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I570f7de90007b67d811d158ca33e099d5cc2d5d3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62308 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <arch/hpet.h>
|
||||
#include <cpu/x86/mtrr.h>
|
||||
#include <cpu/amd/msr.h>
|
||||
#include <cpu/amd/mtrr.h>
|
||||
@@ -28,7 +29,7 @@ void amd_initcpuio(void)
|
||||
PciData |= 1 << 7; // set NP (non-posted) bit
|
||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
|
||||
PciData = (0xFED00000 >> 8) | 3; // lowest NP address is HPET at FED00000
|
||||
PciData = (HPET_BASE_ADDRESS >> 8) | 3; // lowest NP address is HPET at FED00000
|
||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||
|
||||
/* Map the remaining PCI hole as posted MMIO */
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <arch/hpet.h>
|
||||
#include <cpu/x86/mtrr.h>
|
||||
#include <cpu/amd/msr.h>
|
||||
#include <cpu/amd/mtrr.h>
|
||||
@@ -28,7 +29,7 @@ void amd_initcpuio(void)
|
||||
PciData |= 1 << 7; /* set NP (non-posted) bit */
|
||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
|
||||
PciData = (0xFED00000 >> 8) | 3; /* lowest NP address is HPET at FED00000 */
|
||||
PciData = (HPET_BASE_ADDRESS >> 8) | 3; /* lowest NP address is HPET at FED00000 */
|
||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||
|
||||
/* Map the remaining PCI hole as posted MMIO */
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <arch/hpet.h>
|
||||
#include <cpu/x86/mtrr.h>
|
||||
#include <cpu/amd/msr.h>
|
||||
#include <cpu/amd/mtrr.h>
|
||||
@@ -28,7 +29,7 @@ void amd_initcpuio(void)
|
||||
PciData |= 1 << 7; /* set NP (non-posted) bit */
|
||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||
PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0x80);
|
||||
PciData = (0xFED00000 >> 8) | 3; /* lowest NP address is HPET at FED00000 */
|
||||
PciData = (HPET_BASE_ADDRESS >> 8) | 3; /* lowest NP address is HPET at FED00000 */
|
||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||
|
||||
/* Map the remaining PCI hole as posted MMIO */
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <arch/hpet.h>
|
||||
#include <cpu/x86/mtrr.h>
|
||||
#include <cpu/amd/msr.h>
|
||||
#include <cpu/amd/mtrr.h>
|
||||
@@ -32,7 +33,7 @@ void amd_initcpuio(void)
|
||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
|
||||
/* lowest NP address is HPET at FED00000 */
|
||||
PciData = (0xFED00000 >> 8) | 3;
|
||||
PciData = (HPET_BASE_ADDRESS >> 8) | 3;
|
||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||
|
||||
/* Map the remaining PCI hole as posted MMIO */
|
||||
|
Reference in New Issue
Block a user