On Wednesday 21 April 2010 02:14:07 Thomas Chou wrote:
> --- a/drivers/mtd/spi/spi_flash.c
> +++ b/drivers/mtd/spi/spi_flash.c
> @@ -120,6 +120,18 @@ struct spi_flash *spi_flash_probe(unsigned int bus,
> unsigned int cs, ret = spi_flash_cmd(spi, CMD_READ_ID, &idcode,
> sizeof(idcode));
> if (ret)
> goto err_read_id;
> +#ifdef CONFIG_SPI_FLASH_STMICRO
> + if (idcode[0] == 0xff) { /* try RES to read electronic id */
> + ret = spi_flash_cmd(spi, 0xab, &idcode, sizeof(idcode));
> + if (ret)
> + goto err_read_id;
> + if ((idcode[3] & 0xf0) == 0x10) {
> + idcode[0] = 0x20;
> + idcode[1] = 0x20;
> + idcode[2] = idcode[3] + 1;
> + }
> + }
> +#endifplease move this logic to stmicro's probe function to keep the common code clear of such cruft. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

