]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/spi/stmicro.c
sf: Add flag status register polling support
[karo-tx-uboot.git] / drivers / mtd / spi / stmicro.c
index ef4b911da512467a96961d5d1c23363db565d7bf..7e41ee13219ba466cdad0f0d5934685cb7b34a29 100644 (file)
@@ -210,5 +210,9 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode)
        flash->sector_size = 256 * params->pages_per_sector;
        flash->size = flash->sector_size * params->nr_sectors;
 
+       /* for >= 512MiB flashes, use flag status instead of read_status */
+       if (flash->size >= 0x4000000)
+               flash->poll_cmd = CMD_FLAG_STATUS;
+
        return flash;
 }