pflash: Reduce writebuf len for 8-bit flashes. Flashes connected through an 8 bit bus cannot handle write buffers larger than 256 bytes. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index 8f3e567..b0c7b4c 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c
@@ -599,7 +599,11 @@ pfl->cfi_table[0x28] = 0x02; pfl->cfi_table[0x29] = 0x00; /* Max number of bytes in multi-bytes write */ - pfl->cfi_table[0x2A] = 0x0B; + if (width == 1) { + pfl->cfi_table[0x2A] = 0x08; + } else { + pfl->cfi_table[0x2A] = 0x0B; + } pfl->cfi_table[0x2B] = 0x00; /* Number of erase block regions (uniform) */ pfl->cfi_table[0x2C] = 0x01;