summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-03-27 16:34:21 -0400
committerMike Frysinger <vapier@gentoo.org>2009-04-02 06:50:17 -0400
commit9726ba4abaa16cd6c385ad350d403f98a8eacf52 (patch)
treee75294d85742e03304814e9e9e78aecd595ed21f /drivers/mtd/spi
parent1c5874374e091b4bb62917c519861f7682fe066e (diff)
downloadu-boot-imx-9726ba4abaa16cd6c385ad350d403f98a8eacf52.zip
u-boot-imx-9726ba4abaa16cd6c385ad350d403f98a8eacf52.tar.gz
u-boot-imx-9726ba4abaa16cd6c385ad350d403f98a8eacf52.tar.bz2
sf: stmicro: drop redundant id read
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>
Diffstat (limited to 'drivers/mtd/spi')
-rw-r--r--drivers/mtd/spi/stmicro.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
index e7dda91..e401cd0 100644
--- a/drivers/mtd/spi/stmicro.c
+++ b/drivers/mtd/spi/stmicro.c
@@ -315,12 +315,6 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode)
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];
@@ -330,7 +324,7 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode)
}
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;
}