diff options
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/picasso/include/soc/southbridge.h | 1 | ||||
-rw-r--r-- | src/soc/amd/picasso/southbridge.c | 7 | ||||
-rw-r--r-- | src/soc/amd/picasso/uart.c | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/include/soc/southbridge.h b/src/soc/amd/picasso/include/soc/southbridge.h index 5bae754cf6..63c9876fce 100644 --- a/src/soc/amd/picasso/include/soc/southbridge.h +++ b/src/soc/amd/picasso/include/soc/southbridge.h @@ -280,6 +280,7 @@ void southbridge_init(void *chip_info); void fch_pre_init(void); void fch_early_init(void); void set_uart_config(int idx); +void clear_uart_legacy_config(void); /* Initialize all the i2c buses that are marked with early init. */ void i2c_soc_early_init(void); diff --git a/src/soc/amd/picasso/southbridge.c b/src/soc/amd/picasso/southbridge.c index a18f5a37bd..d2904d894b 100644 --- a/src/soc/amd/picasso/southbridge.c +++ b/src/soc/amd/picasso/southbridge.c @@ -226,6 +226,13 @@ void fch_pre_init(void) sb_enable_legacy_io(); enable_aoac_devices(); sb_reset_i2c_slaves(); + + /* + * On reset Range_0 defaults to enabled. We want to start with a clean + * slate to not have things unexpectedly enabled. + */ + clear_uart_legacy_config(); + if (CONFIG(PICASSO_UART)) set_uart_config(CONFIG_UART_FOR_CONSOLE); } diff --git a/src/soc/amd/picasso/uart.c b/src/soc/amd/picasso/uart.c index 84d6982968..6439efb251 100644 --- a/src/soc/amd/picasso/uart.c +++ b/src/soc/amd/picasso/uart.c @@ -38,6 +38,11 @@ uintptr_t uart_platform_base(int idx) return uart_info[idx].base; } +void clear_uart_legacy_config(void) +{ + write16((void *)FCH_UART_LEGACY_DECODE, 0); +} + void set_uart_config(int idx) { uint32_t uart_ctrl; |