@@ -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;
+ }
+
switch (s->cmd_in_progress) {
case PP4:
case READ4: