diff options
author | Fred Reitberger <reitbergerfred@gmail.com> | 2022-04-01 16:13:18 -0400 |
---|---|---|
committer | Martin Roth <martin.roth@amd.corp-partner.google.com> | 2022-07-20 22:22:14 +0000 |
commit | 65f558f576ac716b0639d8d18834b776a2a9f90b (patch) | |
tree | 0ff64e25ac0f648565df5df5b1d7efbb1cb136a6 /src/soc | |
parent | 6a0e47019733890307d93329de79fc58f71ced77 (diff) |
soc/amd/common/block/spi/fch_spi_ctrl: Fix restricted command write
The SPI_RESTRICTED_CMD register is not a PCI configuration register. It
is memory mapped from the SPI bar.
Verified against PPR 55570 rev 3.16, PPR 56569 rev 3.03, and PPR 57243
rev 1.50
TEST=Compile tested only
Change-Id: I7c88aaea9ddac200644bb368be3bd4e9be47fd7b
Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63305
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/block/spi/fch_spi_ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/spi/fch_spi_ctrl.c b/src/soc/amd/common/block/spi/fch_spi_ctrl.c index 519503dc6d..b3d7c69a68 100644 --- a/src/soc/amd/common/block/spi/fch_spi_ctrl.c +++ b/src/soc/amd/common/block/spi/fch_spi_ctrl.c @@ -282,7 +282,7 @@ static int fch_spi_flash_protect(const struct spi_flash *flash, const struct reg } /* Final steps to protect region */ - pci_write_config32(SOC_LPC_DEV, SPI_RESTRICTED_CMD1, reg32); + spi_write32(SPI_RESTRICTED_CMD1, reg32); reg32 = spi_read32(SPI_CNTRL0); reg32 &= ~SPI_ACCESS_MAC_ROM_EN; spi_write32(SPI_CNTRL0, reg32); |