From ed8ceabf3e557bdaa104ebcab1cc98dc56b3536c Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Sat, 9 May 2020 17:35:02 -0700 Subject: 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 Change-Id: I65784b481ae598bf3a85392ae4fe281aac974097 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41273 Reviewed-by: Aaron Durbin Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/soc/amd/picasso/southbridge.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/soc/amd/picasso/southbridge.c b/src/soc/amd/picasso/southbridge.c index c871ec9f58..2df193abbc 100644 --- a/src/soc/amd/picasso/southbridge.c +++ b/src/soc/amd/picasso/southbridge.c @@ -165,16 +165,6 @@ void enable_aoac_devices(void) } 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 @@ static void fch_smbus_init(void) /* 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(); -- cgit v1.2.3