diff options
Diffstat (limited to 'src/drivers/spi/sst.c')
-rw-r--r-- | src/drivers/spi/sst.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/spi/sst.c b/src/drivers/spi/sst.c index ebeb441d1e..2609591723 100644 --- a/src/drivers/spi/sst.c +++ b/src/drivers/spi/sst.c @@ -130,8 +130,10 @@ sst_byte_write(struct spi_flash *flash, u32 offset, const void *buf) offset, }; +#if CONFIG_DEBUG_SPI_FLASH printk(BIOS_SPEW, "BP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n", spi_w8r8(flash->spi, CMD_SST_RDSR), buf, cmd[0], offset); +#endif ret = sst_enable_writing(flash); if (ret) @@ -177,9 +179,11 @@ sst_write(struct spi_flash *flash, u32 offset, size_t len, const void *buf) cmd[3] = offset; for (; actual < len - 1; actual += 2) { +#if CONFIG_DEBUG_SPI_FLASH printk(BIOS_SPEW, "WP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n", spi_w8r8(flash->spi, CMD_SST_RDSR), buf + actual, cmd[0], offset); +#endif ret = spi_flash_cmd_write(flash->spi, cmd, cmd_len, buf + actual, 2); @@ -204,9 +208,10 @@ sst_write(struct spi_flash *flash, u32 offset, size_t len, const void *buf) ret = sst_byte_write(flash, offset, buf + actual); done: - printk(BIOS_INFO, "SF: SST: program %s %zu bytes @ 0x%lx\n", +#if CONFIG_DEBUG_SPI_FLASH + printk(BIOS_SPEW, "SF: SST: program %s %zu bytes @ 0x%lx\n", ret ? "failure" : "success", len, (unsigned long)offset - actual); - +#endif spi_release_bus(flash->spi); return ret; } |