summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/spi/spi_flash.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index a7908ca7e5..ea1b7162d2 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -262,14 +262,15 @@ int spi_flash_cmd_erase(const struct spi_flash *flash, u32 offset, size_t len)
spi_flash_addr(offset, cmd);
offset += erase_size;
-#if CONFIG(DEBUG_SPI_FLASH)
- if (ADDR_MOD)
- printk(BIOS_SPEW, "SF: erase %2x %2x %2x %2x %2x (%x)\n",
- cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], offset);
- else
- printk(BIOS_SPEW, "SF: erase %2x %2x %2x %2x (%x)\n",
- cmd[0], cmd[1], cmd[2], cmd[3], offset);
-#endif
+ if (CONFIG(DEBUG_SPI_FLASH)) {
+ if (ADDR_MOD)
+ printk(BIOS_SPEW, "SF: erase %2x %2x %2x %2x %2x (%x)\n",
+ cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], offset);
+ else
+ printk(BIOS_SPEW, "SF: erase %2x %2x %2x %2x (%x)\n",
+ cmd[0], cmd[1], cmd[2], cmd[3], offset);
+ }
+
ret = spi_flash_cmd(&flash->spi, CMD_WRITE_ENABLE, NULL, 0);
if (ret)
goto out;