]> git.sur5r.net Git - u-boot/commitdiff
dm: sf: Save flash flags to struct spi_flash
authorBin Meng <bmeng.cn@gmail.com>
Tue, 28 Apr 2015 07:59:54 +0000 (13:29 +0530)
committerJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Tue, 28 Apr 2015 07:59:54 +0000 (13:29 +0530)
Add a new member 'flags' in struct spi_flash to store the flash flags
during spi_flash_validate_params().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
drivers/mtd/spi/sf_probe.c
include/spi_flash.h

index de8d0b7f7cbdf786f50c1ca37189a9b0edc78be1..d8ab6a1eccd64ee698b7eee5a3193d226ab0bdbb 100644 (file)
@@ -132,6 +132,9 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode,
        flash->name = params->name;
        flash->memory_map = spi->memory_map;
        flash->dual_flash = flash->spi->option;
+#ifdef CONFIG_DM_SPI_FLASH
+       flash->flags = params->flags;
+#endif
 
        /* Assign spi_flash ops */
 #ifndef CONFIG_DM_SPI_FLASH
index 4791b94281c1227a20380835f06a91cdad6dbeac..f2814ef41a0b3c27b2e82352190de831559422c9 100644 (file)
@@ -65,6 +65,7 @@ struct spi_flash {
        struct spi_slave *spi;
 #ifdef CONFIG_DM_SPI_FLASH
        struct udevice *dev;
+       u16 flags;
 #endif
        const char *name;
        u8 dual_flash;