diff options
Diffstat (limited to 'src/cpu/amd/pi')
-rw-r--r-- | src/cpu/amd/pi/spi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cpu/amd/pi/spi.c b/src/cpu/amd/pi/spi.c index f5718057d1..71b5d95444 100644 --- a/src/cpu/amd/pi/spi.c +++ b/src/cpu/amd/pi/spi.c @@ -31,15 +31,13 @@ void spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len) return; } - flash->spi->rw = SPI_WRITE_FLAG; - spi_claim_bus(flash->spi); + spi_flash_volatile_group_begin(flash); - flash->erase(flash, pos, size); - flash->write(flash, pos, sizeof(len), &len); - flash->write(flash, pos + sizeof(len), len, buf); + spi_flash_erase(flash, pos, size); + spi_flash_write(flash, pos, sizeof(len), &len); + spi_flash_write(flash, pos + sizeof(len), len, buf); - flash->spi->rw = SPI_WRITE_FLAG; - spi_release_bus(flash->spi); + spi_flash_volatile_group_end(flash); return; } |