Lines Matching full:flash

3  * Common SPI flash Interface
40 * SPI flash chips can lock a region of the flash defined by a
44 * @dev: SPI flash device
59 * spi_flash_read_dm() - Read data from SPI flash
61 * @dev: SPI flash device
70 * spi_flash_write_dm() - Write data to SPI flash
72 * @dev: SPI flash device
82 * spi_flash_erase_dm() - Erase blocks of the SPI flash
84 * Note that @len must be a muiltiple of the flash sector size.
86 * @dev: SPI flash device
96 * SPI flash chips can lock a region of the flash defined by a
100 * @dev: SPI flash device
118 void spi_flash_free(struct spi_flash *flash);
120 static inline int spi_flash_read(struct spi_flash *flash, u32 offset, in spi_flash_read() argument
123 return spi_flash_read_dm(flash->dev, offset, len, buf); in spi_flash_read()
126 static inline int spi_flash_write(struct spi_flash *flash, u32 offset, in spi_flash_write() argument
129 return spi_flash_write_dm(flash->dev, offset, len, buf); in spi_flash_write()
132 static inline int spi_flash_erase(struct spi_flash *flash, u32 offset, in spi_flash_erase() argument
135 return spi_flash_erase_dm(flash->dev, offset, len); in spi_flash_erase()
138 static inline int spi_flash_ctrl_wlock(struct spi_flash *flash, in spi_flash_ctrl_wlock() argument
141 return spi_flash_ctrl_wlock_dm(flash->dev, offset, len); in spi_flash_ctrl_wlock()
144 static inline int spi_flash_ctrl_wunlock(struct spi_flash *flash, in spi_flash_ctrl_wunlock() argument
147 return spi_flash_ctrl_wunlock_dm(flash->dev, offset, len); in spi_flash_ctrl_wunlock()
161 void spi_flash_free(struct spi_flash *flash);
163 static inline int spi_flash_read(struct spi_flash *flash, u32 offset, in spi_flash_read() argument
166 struct mtd_info *mtd = &flash->mtd; in spi_flash_read()
172 static inline int spi_flash_write(struct spi_flash *flash, u32 offset, in spi_flash_write() argument
175 struct mtd_info *mtd = &flash->mtd; in spi_flash_write()
181 static inline int spi_flash_erase(struct spi_flash *flash, u32 offset, in spi_flash_erase() argument
184 struct mtd_info *mtd = &flash->mtd; in spi_flash_erase()
200 static inline int spi_flash_protect(struct spi_flash *flash, u32 ofs, u32 len, in spi_flash_protect() argument
203 if (!flash->flash_lock || !flash->flash_unlock) in spi_flash_protect()
207 return flash->flash_lock(flash, ofs, len); in spi_flash_protect()
209 return flash->flash_unlock(flash, ofs, len); in spi_flash_protect()