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>
This commit is contained in:
Furquan Shaikh 2020-05-09 17:35:02 -07:00 committed by Patrick Georgi
parent 70063ff565
commit ed8ceabf3e
1 changed files with 1 additions and 15 deletions

View File

@ -165,16 +165,6 @@ void enable_aoac_devices(void)
} while (!status); } 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) static void sb_enable_cf9_io(void)
{ {
uint32_t reg = pm_read32(PM_DECODE_EN); uint32_t reg = pm_read32(PM_DECODE_EN);
@ -215,11 +205,7 @@ static void fch_smbus_init(void)
/* Before console init */ /* Before console init */
void fch_pre_init(void) void fch_pre_init(void)
{ {
/* Turn on LPC in case the PSP didn't use it. However, ensure all lpc_early_init();
* decoding is cleared as the PSP may have enabled decode paths. */
sb_enable_lpc();
lpc_disable_decodes();
if (CONFIG(POST_IO) && (CONFIG_POST_IO_PORT == 0x80) if (CONFIG(POST_IO) && (CONFIG_POST_IO_PORT == 0x80)
&& CONFIG(PICASSO_LPC_IOMUX)) && CONFIG(PICASSO_LPC_IOMUX))
lpc_enable_port80(); lpc_enable_port80();