[flashrom] [PATCH 6/6] debug
Stefan Tauner
stefan.tauner at student.tuwien.ac.at
Sat Aug 10 03:45:57 CEST 2013
Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
---
sb600spi.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/sb600spi.c b/sb600spi.c
index df6ce14..13adad8 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -313,7 +313,7 @@ static int spi100_spi_send_command(struct flashctx *flash, unsigned int writecnt
msg_pspew("Filling buffer: ");
int count;
for (count = 0; count < writecnt; count++) {
- msg_pspew("[%02x]", writearr[count]);
+ msg_pspew("[%i %02x]", count, writearr[count]);
mmio_writeb(writearr[count], sb600_spibar + 0x80 + count);
}
msg_pspew("\n");
@@ -323,7 +323,11 @@ static int spi100_spi_send_command(struct flashctx *flash, unsigned int writecnt
msg_pspew("Reading buffer: ");
for (count = 0; count < readcnt; count++) {
readarr[count] = mmio_readb(sb600_spibar + 0x80 + (writecnt + count) % FIFO_SIZE_YANGTZE);
- msg_pspew("[%02x]", readarr[count]);
+ msg_pspew("[%i %02x]", (writecnt + count) % FIFO_SIZE_YANGTZE, readarr[count]);
+ }
+ msg_pspew(" ");
+ for (; count < FIFO_SIZE_YANGTZE; count++) {
+ msg_pspew("[%i %02x]", (writecnt + count) % FIFO_SIZE_YANGTZE, mmio_readb(sb600_spibar + 0x80 + (writecnt + count) % FIFO_SIZE_YANGTZE));
}
msg_pspew("\n");
--
Kind regards, Stefan Tauner
More information about the flashrom
mailing list