summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi/spi_flash.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-03-28 06:41:09 -0400
committerMike Frysinger <vapier@gentoo.org>2009-04-02 06:50:21 -0400
commit0dcdbb172c2fdf60c5c578980308b312fd56496f (patch)
tree6f1680e9e84ef057e8d4e308f04d127f95994fb4 /drivers/mtd/spi/spi_flash.c
parent9726ba4abaa16cd6c385ad350d403f98a8eacf52 (diff)
downloadtalos-obmc-uboot-0dcdbb172c2fdf60c5c578980308b312fd56496f.tar.gz
talos-obmc-uboot-0dcdbb172c2fdf60c5c578980308b312fd56496f.zip
sf: always read 5 bytes for the idcode
Some SPI flash drivers like to have extended id information available (like the spansion flash), so rather than making it re-issue the ID cmd to get at the last 2 bytes, have the common code read 5 bytes rather than just 3. This also matches the Linux behavior where it always reads 5 id bytes from all flashes. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> CC: Mingkai Hu <Mingkai.hu@freescale.com>
Diffstat (limited to 'drivers/mtd/spi/spi_flash.c')
-rw-r--r--drivers/mtd/spi/spi_flash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 21ba5f9009..274895ad8e 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -101,7 +101,7 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
struct spi_slave *spi;
struct spi_flash *flash;
int ret;
- u8 idcode[3];
+ u8 idcode[5];
spi = spi_setup_slave(bus, cs, max_hz, spi_mode);
if (!spi) {
@@ -120,8 +120,8 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
if (ret)
goto err_read_id;
- debug("SF: Got idcode %02x %02x %02x\n", idcode[0],
- idcode[1], idcode[2]);
+ debug("SF: Got idcode %02x %02x %02x %02x %02x\n", idcode[0],
+ idcode[1], idcode[2], idcode[3], idcode[4]);
switch (idcode[0]) {
#ifdef CONFIG_SPI_FLASH_SPANSION
OpenPOWER on IntegriCloud