2 * This file is part of the flashrom project.
4 * Copyright (C) 2007 Carl-Daniel Hailfinger
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 EN29LV010 has 1C,6E and uses short F0 reset sequence
26 EN29LV040(A) has 1C,4F and uses short F0 reset sequence
28 int probe_en29f512(struct flashchip *flash)
30 volatile uint8_t *bios = flash->virtual_memory;
33 *(volatile uint8_t *)(bios + 0x555) = 0xAA;
34 *(volatile uint8_t *)(bios + 0x2AA) = 0x55;
35 *(volatile uint8_t *)(bios + 0x555) = 0x90;
39 id1 = *(volatile uint8_t *)(bios + 0x100);
40 id2 = *(volatile uint8_t *)(bios + 0x101);
42 /* exit by writing F0 anywhere? or the code below */
43 *(volatile uint8_t *)(bios + 0x555) = 0xAA;
44 *(volatile uint8_t *)(bios + 0x2AA) = 0x55;
45 *(volatile uint8_t *)(bios + 0x555) = 0xF0;
47 printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, id1, id2);
49 if (id1 == flash->manufacture_id && id2 == flash->model_id)
59 int probe_en29f002a(struct flashchip *flash)
61 volatile uint8_t *bios = flash->virtual_memory;
64 *(volatile uint8_t *)(bios + 0x555) = 0xAA;
65 *(volatile uint8_t *)(bios + 0xAAA) = 0x55;
66 *(volatile uint8_t *)(bios + 0x555) = 0x90;
70 id1 = *(volatile uint8_t *)(bios + 0x100);
71 id2 = *(volatile uint8_t *)(bios + 0x101);
73 /* exit by writing F0 anywhere? or the code below */
74 *(volatile uint8_t *)(bios + 0x555) = 0xAA;
75 *(volatile uint8_t *)(bios + 0xAAA) = 0x55;
76 *(volatile uint8_t *)(bios + 0x555) = 0xF0;
78 printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, id1, id2);
80 if (id1 == flash->manufacture_id && id2 == flash->model_id)