soc/amd/picasso: Use lpc_early_init() from common lpc driver
This change uses lpc_early_init() for enabling and configuring LPC
using the common block LPC driver.
Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: I65784b481ae598bf3a85392ae4fe281aac974097
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41273
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/amd/picasso/southbridge.c b/src/soc/amd/picasso/southbridge.c
index c871ec9..2df193a 100644
--- a/src/soc/amd/picasso/southbridge.c
+++ b/src/soc/amd/picasso/southbridge.c
@@ -165,16 +165,6 @@
} while (!status);
}
-static void sb_enable_lpc(void)
-{
- u8 byte;
-
- /* Enable LPC controller */
- byte = pm_io_read8(PM_LPC_GATING);
- byte |= PM_LPC_ENABLE;
- pm_io_write8(PM_LPC_GATING, byte);
-}
-
static void sb_enable_cf9_io(void)
{
uint32_t reg = pm_read32(PM_DECODE_EN);
@@ -215,11 +205,7 @@
/* Before console init */
void fch_pre_init(void)
{
- /* Turn on LPC in case the PSP didn't use it. However, ensure all
- * decoding is cleared as the PSP may have enabled decode paths. */
- sb_enable_lpc();
- lpc_disable_decodes();
-
+ lpc_early_init();
if (CONFIG(POST_IO) && (CONFIG_POST_IO_PORT == 0x80)
&& CONFIG(PICASSO_LPC_IOMUX))
lpc_enable_port80();