The common SPI flash code reads the idcode and passes it down to the SPI
flash driver, so there is no need to read it again ourselves.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
CC: Jason McMullan <mcmullan@netapp.com>
CC: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
const struct stmicro_spi_flash_params *params;
struct stmicro_spi_flash *stm;
unsigned int i;
- int ret;
- u8 id[3];
-
- ret = spi_flash_cmd(spi, CMD_READ_ID, id, sizeof(id));
- if (ret)
- return NULL;
for (i = 0; i < ARRAY_SIZE(stmicro_spi_flash_table); i++) {
params = &stmicro_spi_flash_table[i];
}
if (i == ARRAY_SIZE(stmicro_spi_flash_table)) {
- debug("SF: Unsupported STMicro ID %02x\n", id[1]);
+ debug("SF: Unsupported STMicro ID %02x\n", idcode[1]);
return NULL;
}