Handle JEDEC JEP106W continuation codes in SPI RDID. Some vendors like

Programmable Micro Corp (PMC) need this.
Both the serial and parallel flash JEDEC detection routines would
benefit from a parity/sanity check of the vendor ID. Will do this later.

Add support for the PMC Pm25LV family of SPI flash chips.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Chris Lingard  <chris@stockwith.co.uk>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3091 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Carl-Daniel Hailfinger
2008-02-06 22:07:58 +00:00
parent a7c92a6dc4
commit c23b3a5732
3 changed files with 40 additions and 7 deletions

View File

@@ -278,11 +278,17 @@ void generic_spi_write_disable()
int probe_spi(struct flashchip *flash)
{
unsigned char readarr[3];
uint8_t manuf_id;
uint16_t model_id;
uint32_t manuf_id;
uint32_t model_id;
if (!generic_spi_rdid(readarr)) {
manuf_id = readarr[0];
model_id = (readarr[1] << 8) | readarr[2];
/* Check if this is a continuation vendor ID */
if (readarr[0] == 0x7f) {
manuf_id = (readarr[0] << 8) | readarr[1];
model_id = readarr[2];
} else {
manuf_id = readarr[0];
model_id = (readarr[1] << 8) | readarr[2];
}
printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, manuf_id, model_id);
if (manuf_id == flash->manufacture_id &&
model_id == flash->model_id) {