summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/picasso/psp_verstage
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2020-12-08 00:40:04 +0100
committerFelix Held <felix-coreboot@felixheld.de>2020-12-09 02:10:58 +0000
commit26935d1ecc3e92803de985473b1a124982a9e226 (patch)
tree5a55d760bfb2a44276fae40d7bc2700beb1ecdd0 /src/soc/amd/picasso/psp_verstage
parent240f99c1c3ecbf1af7ebb2c81545ca46317ba419 (diff)
downloadcoreboot-26935d1ecc3e92803de985473b1a124982a9e226.tar.gz
coreboot-26935d1ecc3e92803de985473b1a124982a9e226.tar.bz2
coreboot-26935d1ecc3e92803de985473b1a124982a9e226.zip
soc/amd: factor out legacy I/O and cf9 decode enable functions
Replace sb prefix with fch prefix, since those are all FCHs and no south bridges any more. Verstage on PSP uses the I/O access mechanism instead of the MMIO one, so keep a separate function for that, but also move it to the common mmio_util file to have them all in one place. Change-Id: I47dac9ee3d9e27f7b7a5fddab17cf4fc10de6c3e Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48435 Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/picasso/psp_verstage')
-rw-r--r--src/soc/amd/picasso/psp_verstage/fch.c5
-rw-r--r--src/soc/amd/picasso/psp_verstage/psp_verstage.c3
-rw-r--r--src/soc/amd/picasso/psp_verstage/psp_verstage.h1
3 files changed, 2 insertions, 7 deletions
diff --git a/src/soc/amd/picasso/psp_verstage/fch.c b/src/soc/amd/picasso/psp_verstage/fch.c
index b813770b4ae6..e6c70f62ee5d 100644
--- a/src/soc/amd/picasso/psp_verstage/fch.c
+++ b/src/soc/amd/picasso/psp_verstage/fch.c
@@ -102,11 +102,6 @@ uintptr_t *map_spi_rom(void)
return addr;
}
-void sb_enable_legacy_io(void)
-{
- pm_io_write32(PM_DECODE_EN, pm_io_read32(PM_DECODE_EN) | LEGACY_IO_EN);
-}
-
static uint32_t map_fch_devices(void)
{
void *bar;
diff --git a/src/soc/amd/picasso/psp_verstage/psp_verstage.c b/src/soc/amd/picasso/psp_verstage/psp_verstage.c
index f367dce6fd49..8ef2dcde3409 100644
--- a/src/soc/amd/picasso/psp_verstage/psp_verstage.c
+++ b/src/soc/amd/picasso/psp_verstage/psp_verstage.c
@@ -2,6 +2,7 @@
#include "psp_verstage.h"
+#include <amdblocks/acpimmio.h>
#include <bl_uapp/bl_syscall_public.h>
#include <boot_device.h>
#include <cbfs.h>
@@ -237,7 +238,7 @@ void Main(void)
verstage_mainboard_early_init();
svc_write_postcode(POSTCODE_LATE_INIT);
- sb_enable_legacy_io();
+ fch_io_enable_legacy_io();
verstage_soc_init();
verstage_mainboard_init();
diff --git a/src/soc/amd/picasso/psp_verstage/psp_verstage.h b/src/soc/amd/picasso/psp_verstage/psp_verstage.h
index ef5c452500cb..4f85d7caa11f 100644
--- a/src/soc/amd/picasso/psp_verstage/psp_verstage.h
+++ b/src/soc/amd/picasso/psp_verstage/psp_verstage.h
@@ -55,6 +55,5 @@ uint32_t unmap_fch_devices(void);
uint32_t verstage_soc_early_init(void);
void verstage_soc_init(void);
uintptr_t *map_spi_rom(void);
-void sb_enable_legacy_io(void);
#endif /* PSP_VERSTAGE_H */