soc/amd: factor out check_mca to common code

Change-Id: I139d1fe41bad5213da8890c2867f275b6847e3e1
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56281
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index 42c3bfc..88bff50 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -41,6 +41,7 @@
 	select SOC_AMD_COMMON_BLOCK_I2C
 	select SOC_AMD_COMMON_BLOCK_IOMMU
 	select SOC_AMD_COMMON_BLOCK_LPC
+	select SOC_AMD_COMMON_BLOCK_MCAX
 	select SOC_AMD_COMMON_BLOCK_NONCAR
 	select SOC_AMD_COMMON_BLOCK_PCI
 	select SOC_AMD_COMMON_BLOCK_PCIE_GPP_DRIVER
diff --git a/src/soc/amd/picasso/mca.c b/src/soc/amd/picasso/mca.c
index 24a921a..97f5d0b 100644
--- a/src/soc/amd/picasso/mca.c
+++ b/src/soc/amd/picasso/mca.c
@@ -192,7 +192,7 @@
 	printk(BIOS_WARNING, "   MC%u_CTL_MASK = %08x_%08x\n", bank, msr.hi, msr.lo);
 }
 
-static void mca_check_all_banks(void)
+void mca_check_all_banks(void)
 {
 	struct mca_bank_status mci;
 	const unsigned int num_banks = mca_get_bank_count();
@@ -214,12 +214,3 @@
 		}
 	}
 }
-
-/* Check the Machine Check Architecture Extension registers */
-void check_mca(void)
-{
-	mca_check_all_banks();
-	/* mca_clear_status uses the MCA registers and not the MCAX ones. Since they are
-	   aliases, we can use either set of registers. */
-	mca_clear_status();
-}