From b825acb95884acae5e76fe319baf01e9cd64db33 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Wed, 24 Feb 2021 16:21:00 -0700 Subject: soc/amd/cezanne: Disable legacy DMA IO ports The legacy DMA is not used by linux. This change frees up those IO ports. When FSP-S runs, it re-enables the legacy DMA IO region, so we need to disable it again. BOOTBLOCK: PMx00: 0xe3060bf3 ROMSTAGE - Before FSP: PMx00: 0xe3060bf3 ROMSTAGE - After FSP: PMx00: 0xe3060bf7 BUG=b:180949454 Signed-off-by: Raul E Rangel Change-Id: I7792d1f8ea40eb1c7f6cca67e9907208884ac694 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51076 Reviewed-by: Angel Pons Reviewed-by: Felix Held Reviewed-by: Marshall Dawson Tested-by: build bot (Jenkins) --- src/soc/amd/cezanne/early_fch.c | 1 + src/soc/amd/cezanne/romstage.c | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'src/soc/amd') diff --git a/src/soc/amd/cezanne/early_fch.c b/src/soc/amd/cezanne/early_fch.c index dd096e05e8..cdb1f12aad 100644 --- a/src/soc/amd/cezanne/early_fch.c +++ b/src/soc/amd/cezanne/early_fch.c @@ -17,6 +17,7 @@ void fch_pre_init(void) fch_smbus_init(); fch_enable_cf9_io(); fch_enable_legacy_io(); + fch_disable_legacy_dma_io(); enable_aoac_devices(); /* diff --git a/src/soc/amd/cezanne/romstage.c b/src/soc/amd/cezanne/romstage.c index 2740d8c74c..b35e6a56af 100644 --- a/src/soc/amd/cezanne/romstage.c +++ b/src/soc/amd/cezanne/romstage.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include #include @@ -31,6 +32,9 @@ asmlinkage void car_stage_entry(void) fsp_memory_init(acpi_is_wakeup_s3()); + /* Fixup settings FSP-M should not be changing */ + fch_disable_legacy_dma_io(); + memmap_stash_early_dram_usage(); run_ramstage(); -- cgit v1.2.3