1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

Refine PMC Pm25LV series

- Add missing bits and resort chips
 - Refine Pm25LV512(A) and Pm25LV010
   Due to manufacturer ID continuation this one needs a new probing
   function: probe_spi_res3() which should be refactored in the future.
   The datasheet describes a very weird order of ID bytes:
   Vendor byte, model byte, vendor continuation byte. Let's pretend we did
   not read that or the datasheet is bogus (although the datasheet of the
   successor series describes the same but luckily additionally to RDID).
 - Add Pm25LV010A
   This was tested by Chi Zhang:
   http://paste.flashrom.org/view.php?id=1573

Corresponding to flashrom svn r1670.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
Stefan Tauner
2013-04-19 01:58:33 +00:00
parent e33c40eb7d
commit 3f5e35db4b
4 changed files with 112 additions and 55 deletions

20
spi25.c
View File

@ -279,6 +279,26 @@ int probe_spi_res2(struct flashctx *flash)
return 1;
}
int probe_spi_res3(struct flashctx *flash)
{
unsigned char readarr[3];
uint32_t id1, id2;
if (spi_res(flash, readarr, 3)) {
return 0;
}
id1 = (readarr[0] << 8) | readarr[1];
id2 = readarr[2];
msg_cdbg("%s: id1 0x%x, id2 0x%x\n", __func__, id1, id2);
if (id1 != flash->chip->manufacture_id || id2 != flash->chip->model_id)
return 0;
return 1;
}
/* Only used for some Atmel chips. */
int probe_spi_at25f(struct flashctx *flash)
{