diff options
Diffstat (limited to 'src/soc/amd/picasso/southbridge.c')
-rw-r--r-- | src/soc/amd/picasso/southbridge.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/soc/amd/picasso/southbridge.c b/src/soc/amd/picasso/southbridge.c index 4f25802141..d37f143313 100644 --- a/src/soc/amd/picasso/southbridge.c +++ b/src/soc/amd/picasso/southbridge.c @@ -236,7 +236,7 @@ void sb_read_mode(u32 mode) write32((void *)(base + SPI_CNTRL0), val | SPI_READ_MODE(mode)); } -static void sb_spi_config_modes(void) +static void sb_spi_config_mb_modes(void) { const struct soc_amd_picasso_config *cfg = config_of_soc(); @@ -245,6 +245,20 @@ static void sb_spi_config_modes(void) cfg->spi_tpm_speed); } +static void sb_spi_config_em100_modes(void) +{ + sb_read_mode(SPI_READ_MODE_NORMAL33M); + sb_set_spi100(SPI_SPEED_16M, SPI_SPEED_16M, SPI_SPEED_16M, SPI_SPEED_16M); +} + +static void sb_spi_config_modes(void) +{ + if (CONFIG(EM100)) + sb_spi_config_em100_modes(); + else + sb_spi_config_mb_modes(); +} + static void sb_spi_init(void) { lpc_enable_spi_prefetch(); |