dm: sf: Save flash flags to struct spi_flash
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>
This commit is contained in:
parent
611c9ba2b8
commit
be7be78e10
@ -132,6 +132,9 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode,
|
|||||||
flash->name = params->name;
|
flash->name = params->name;
|
||||||
flash->memory_map = spi->memory_map;
|
flash->memory_map = spi->memory_map;
|
||||||
flash->dual_flash = flash->spi->option;
|
flash->dual_flash = flash->spi->option;
|
||||||
|
#ifdef CONFIG_DM_SPI_FLASH
|
||||||
|
flash->flags = params->flags;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Assign spi_flash ops */
|
/* Assign spi_flash ops */
|
||||||
#ifndef CONFIG_DM_SPI_FLASH
|
#ifndef CONFIG_DM_SPI_FLASH
|
||||||
|
@ -65,6 +65,7 @@ struct spi_flash {
|
|||||||
struct spi_slave *spi;
|
struct spi_slave *spi;
|
||||||
#ifdef CONFIG_DM_SPI_FLASH
|
#ifdef CONFIG_DM_SPI_FLASH
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
|
u16 flags;
|
||||||
#endif
|
#endif
|
||||||
const char *name;
|
const char *name;
|
||||||
u8 dual_flash;
|
u8 dual_flash;
|
||||||
|
Loading…
Reference in New Issue
Block a user