aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/spi-nor.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 1f0a7fc7772f..d0c66a0975cf 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -232,10 +232,17 @@ enum spi_nor_option_flags {
232}; 232};
233 233
234/** 234/**
235 * struct flash_info - Forward declaration of a structure used internally by
236 * spi_nor_scan()
237 */
238struct flash_info;
239
240/**
235 * struct spi_nor - Structure for defining a the SPI NOR layer 241 * struct spi_nor - Structure for defining a the SPI NOR layer
236 * @mtd: point to a mtd_info structure 242 * @mtd: point to a mtd_info structure
237 * @lock: the lock for the read/write/erase/lock/unlock operations 243 * @lock: the lock for the read/write/erase/lock/unlock operations
238 * @dev: point to a spi device, or a spi nor controller device. 244 * @dev: point to a spi device, or a spi nor controller device.
245 * @info: spi-nor part JDEC MFR id and other info
239 * @page_size: the page size of the SPI NOR 246 * @page_size: the page size of the SPI NOR
240 * @addr_width: number of address bytes 247 * @addr_width: number of address bytes
241 * @erase_opcode: the opcode for erasing a sector 248 * @erase_opcode: the opcode for erasing a sector
@@ -262,6 +269,7 @@ enum spi_nor_option_flags {
262 * @flash_lock: [FLASH-SPECIFIC] lock a region of the SPI NOR 269 * @flash_lock: [FLASH-SPECIFIC] lock a region of the SPI NOR
263 * @flash_unlock: [FLASH-SPECIFIC] unlock a region of the SPI NOR 270 * @flash_unlock: [FLASH-SPECIFIC] unlock a region of the SPI NOR
264 * @flash_is_locked: [FLASH-SPECIFIC] check if a region of the SPI NOR is 271 * @flash_is_locked: [FLASH-SPECIFIC] check if a region of the SPI NOR is
272 * @quad_enable: [FLASH-SPECIFIC] enables SPI NOR quad mode
265 * completely locked 273 * completely locked
266 * @priv: the private data 274 * @priv: the private data
267 */ 275 */
@@ -269,6 +277,7 @@ struct spi_nor {
269 struct mtd_info mtd; 277 struct mtd_info mtd;
270 struct mutex lock; 278 struct mutex lock;
271 struct device *dev; 279 struct device *dev;
280 const struct flash_info *info;
272 u32 page_size; 281 u32 page_size;
273 u8 addr_width; 282 u8 addr_width;
274 u8 erase_opcode; 283 u8 erase_opcode;
@@ -296,6 +305,7 @@ struct spi_nor {
296 int (*flash_lock)(struct spi_nor *nor, loff_t ofs, uint64_t len); 305 int (*flash_lock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
297 int (*flash_unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len); 306 int (*flash_unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
298 int (*flash_is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len); 307 int (*flash_is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
308 int (*quad_enable)(struct spi_nor *nor);
299 309
300 void *priv; 310 void *priv;
301}; 311};