aboutsummaryrefslogtreecommitdiffstats
path: root/hw/pflash_cfi01.c
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-01-24 18:39:51 +0100
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-01-24 18:39:51 +0100
commit4737fa266e54564f48bd8f1d72d50a637e093f8a (patch)
treea1b9731155f1865807bc70b9c9e18ca18864169f /hw/pflash_cfi01.c
parenta66e360f87ce5786b8ff159f49ab5cc77b10760b (diff)
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>
Diffstat (limited to 'hw/pflash_cfi01.c')
-rw-r--r--hw/pflash_cfi01.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c
index 8f3e56750..b0c7b4ca3 100644
--- a/hw/pflash_cfi01.c
+++ b/hw/pflash_cfi01.c
@@ -599,7 +599,11 @@ pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off,
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;