fix(spi_nand): check correct manufacturer id
On most of SPI NAND, the read id command needs a dummy byte, except GIGADEVICE SPI NAND that needs an address. To be compliant with all memories providers, the first byte returns by the READ_ID command is not relevant (garbage). Change-Id: Ife74ccab333dd1a04799abe230d3f07fa6ea1edb Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
This commit is contained in:
parent
bc453ab1b2
commit
4490b79633
|
@ -305,12 +305,12 @@ int spi_nand_init(unsigned long long *size, unsigned int *erase_size)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = spi_nand_quad_enable(id[0]);
|
||||
ret = spi_nand_quad_enable(id[1]);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
VERBOSE("SPI_NAND Detected ID 0x%x 0x%x\n", id[0], id[1]);
|
||||
VERBOSE("SPI_NAND Detected ID 0x%x\n", id[1]);
|
||||
|
||||
VERBOSE("Page size %i, Block size %i, size %lli\n",
|
||||
spinand_dev.nand_dev->page_size,
|
||||
|
|
Loading…
Reference in New Issue