summaryrefslogtreecommitdiff
path: root/src/drivers/spi
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi')
-rw-r--r--src/drivers/spi/boot_device_rw_nommap.c2
-rw-r--r--src/drivers/spi/spi_flash.c3
-rw-r--r--src/drivers/spi/winbond.c4
3 files changed, 3 insertions, 6 deletions
diff --git a/src/drivers/spi/boot_device_rw_nommap.c b/src/drivers/spi/boot_device_rw_nommap.c
index a383f268db..ba11d05d99 100644
--- a/src/drivers/spi/boot_device_rw_nommap.c
+++ b/src/drivers/spi/boot_device_rw_nommap.c
@@ -97,7 +97,7 @@ int boot_device_wp_region(const struct region_device *rd,
if (spi_flash_is_write_protected(boot_dev,
region_device_region(rd)) != 1) {
return spi_flash_set_write_protected(boot_dev,
- region_device_region(rd), true,
+ region_device_region(rd),
SPI_WRITE_PROTECTION_REBOOT);
}
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index da2e8685df..372575e2d9 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -555,7 +555,6 @@ int spi_flash_is_write_protected(const struct spi_flash *flash,
int spi_flash_set_write_protected(const struct spi_flash *flash,
const struct region *region,
- const bool non_volatile,
const enum spi_flash_status_reg_lockdown mode)
{
struct region flash_region = { 0 };
@@ -575,7 +574,7 @@ int spi_flash_set_write_protected(const struct spi_flash *flash,
return -1;
}
- ret = flash->prot_ops->set_write(flash, region, non_volatile, mode);
+ ret = flash->prot_ops->set_write(flash, region, mode);
if (ret == 0 && mode != SPI_WRITE_PROTECTION_PRESERVE) {
printk(BIOS_INFO, "SPI: SREG lock-down was set to ");
diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c
index d8d3cdc855..0c8059dced 100644
--- a/src/drivers/spi/winbond.c
+++ b/src/drivers/spi/winbond.c
@@ -422,7 +422,6 @@ static int winbond_flash_cmd_status(const struct spi_flash *flash,
*
* @param flash: The flash to operate on
* @param region: The region to write protect
- * @param non_volatile: Make setting permanent
* @param mode: Optional status register lock-down mode
*
* @return 0 on success
@@ -430,7 +429,6 @@ static int winbond_flash_cmd_status(const struct spi_flash *flash,
static int
winbond_set_write_protection(const struct spi_flash *flash,
const struct region *region,
- const bool non_volatile,
const enum spi_flash_status_reg_lockdown mode)
{
const struct spi_flash_part_id *params;
@@ -527,7 +525,7 @@ winbond_set_write_protection(const struct spi_flash *flash,
mask.reg2.srp1 = 1;
}
- ret = winbond_flash_cmd_status(flash, mask.u, val.u, non_volatile);
+ ret = winbond_flash_cmd_status(flash, mask.u, val.u, true);
if (ret)
return ret;