W dniu 17.03.2016 o 18:39, Peter Crosthwaite pisze: > On Mon, Feb 22, 2016 at 12:03 AM, <marcin.krzemin...@nokia.com> wrote: >> From: Marcin Krzeminski <marcin.krzemin...@nokia.com> >> >> Signed-off-by: Marcin Krzeminski <marcin.krzemin...@nokia.com> >> --- >> hw/block/m25p80.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c >> index 2b7d19f..987fe07 100644 >> --- a/hw/block/m25p80.c >> +++ b/hw/block/m25p80.c >> @@ -99,6 +99,12 @@ static const FlashPartInfo known_devices[] = { >> >> { INFO("at45db081d", 0x1f2500, 0, 64 << 10, 16, ER_4K) }, >> >> + /* Atmel EEPROMS - it is assumed, that don't care bit in command >> + * is set to 0. Block protection is not supported. >> + */ >> + { INFO("at25128a-nonjedec", 0x0, 0, 1, 131072, WR_1) }, >> + { INFO("at25256a-nonjedec", 0x0, 0, 1, 262144, WR_1) }, >> + >> /* EON -- en25xxx */ >> { INFO("en25f32", 0x1c3116, 0, 64 << 10, 64, ER_4K) }, >> { INFO("en25p32", 0x1c2016, 0, 64 << 10, 64, 0) }, >> @@ -438,6 +444,11 @@ void flash_write8(Flash *s, uint64_t addr, uint8_t data) >> >> static inline int get_addr_length(Flash *s) >> { >> + /* check if eeprom is in use */ >> + if (s->pi->flags == WR_1) { >> + return 2; >> + } >> + > > Neat! > > But I think this indicates the flag is incorrectly named. Should be > renamed to EEPROM or something like. Yes, EEPROM sound much better. Will be changed in v5.
Thanks, Marcin > > > Otherwise: > > Reviewed-by: Peter Crosthwaite <crosthwaite.pe...@gmail.com> > >> switch (s->cmd_in_progress) { >> case PP4: >> case READ4: >> -- >> 2.5.0 >> > >