SPI NOR core changes: - add, update support and fix few flashes - prepare BFPT parsing for JESD216 rev D - kernel doc fixes
Showing the changes to include/linux (1 of 13 files). Show all
Unified · Split
| @@ -20,6 +20,7 @@ · 19 unmodified lines | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | /* Flash opcodes. */ | 22 | /* Flash opcodes. */ |
| 23 | #define SPINOR_OP_WRDI 0x04 /* Write disable */ | ||
| 23 | #define SPINOR_OP_WREN 0x06 /* Write enable */ | 24 | #define SPINOR_OP_WREN 0x06 /* Write enable */ |
| 24 | #define SPINOR_OP_RDSR 0x05 /* Read status register */ | 25 | #define SPINOR_OP_RDSR 0x05 /* Read status register */ |
| 25 | #define SPINOR_OP_WRSR 0x01 /* Write status register 1 byte */ | 26 | #define SPINOR_OP_WRSR 0x01 /* Write status register 1 byte */ |
| @@ -80,7 +81,6 @@ · 54 unmodified lines | |||
| 80 | 81 | ||
| 81 | /* Used for SST flashes only. */ | 82 | /* Used for SST flashes only. */ |
| 82 | #define SPINOR_OP_BP 0x02 /* Byte program */ | 83 | #define SPINOR_OP_BP 0x02 /* Byte program */ |
| 83 | #define SPINOR_OP_WRDI 0x04 /* Write disable */ | ||
| 84 | #define SPINOR_OP_AAI_WP 0xad /* Auto address increment word program */ | 84 | #define SPINOR_OP_AAI_WP 0xad /* Auto address increment word program */ |
| 85 | 85 | ||
| 86 | /* Used for S3AN flashes only */ | 86 | /* Used for S3AN flashes only */ |
| @@ -302,7 +302,7 @@ struct spi_nor; · 215 unmodified lines | |||
| 302 | * @read: read data from the SPI NOR. | 302 | * @read: read data from the SPI NOR. |
| 303 | * @write: write data to the SPI NOR. | 303 | * @write: write data to the SPI NOR. |
| 304 | * @erase: erase a sector of the SPI NOR at the offset @offs; if | 304 | * @erase: erase a sector of the SPI NOR at the offset @offs; if |
| 305 | * not provided by the driver, spi-nor will send the erase | 305 | * not provided by the driver, SPI NOR will send the erase |
| 306 | * opcode via write_reg(). | 306 | * opcode via write_reg(). |
| 307 | */ | 307 | */ |
| 308 | struct spi_nor_controller_ops { | 308 | struct spi_nor_controller_ops { |
| @@ -327,16 +327,16 @@ struct spi_nor_manufacturer; · 18 unmodified lines | |||
| 327 | struct spi_nor_flash_parameter; | 327 | struct spi_nor_flash_parameter; |
| 328 | 328 | ||
| 329 | /** | 329 | /** |
| 330 | * struct spi_nor - Structure for defining a the SPI NOR layer | 330 | * struct spi_nor - Structure for defining the SPI NOR layer |
| 331 | * @mtd: point to a mtd_info structure | 331 | * @mtd: an mtd_info structure |
| 332 | * @lock: the lock for the read/write/erase/lock/unlock operations | 332 | * @lock: the lock for the read/write/erase/lock/unlock operations |
| 333 | * @dev: point to a spi device, or a spi nor controller device. | 333 | * @dev: pointer to an SPI device or an SPI NOR controller device |
| 334 | * @spimem: point to the spi mem device | 334 | * @spimem: pointer to the SPI memory device |
| 335 | * @bouncebuf: bounce buffer used when the buffer passed by the MTD | 335 | * @bouncebuf: bounce buffer used when the buffer passed by the MTD |
| 336 | * layer is not DMA-able | 336 | * layer is not DMA-able |
| 337 | * @bouncebuf_size: size of the bounce buffer | 337 | * @bouncebuf_size: size of the bounce buffer |
| 338 | * @info: spi-nor part JDEC MFR id and other info | 338 | * @info: SPI NOR part JEDEC MFR ID and other info |
| 339 | * @manufacturer: spi-nor manufacturer | 339 | * @manufacturer: SPI NOR manufacturer |
| 340 | * @page_size: the page size of the SPI NOR | 340 | * @page_size: the page size of the SPI NOR |
| 341 | * @addr_width: number of address bytes | 341 | * @addr_width: number of address bytes |
| 342 | * @erase_opcode: the opcode for erasing a sector | 342 | * @erase_opcode: the opcode for erasing a sector |
| @@ -344,17 +344,17 @@ struct spi_nor_flash_parameter; · 1 unmodified line | |||
| 344 | * @read_dummy: the dummy needed by the read operation | 344 | * @read_dummy: the dummy needed by the read operation |
| 345 | * @program_opcode: the program opcode | 345 | * @program_opcode: the program opcode |
| 346 | * @sst_write_second: used by the SST write operation | 346 | * @sst_write_second: used by the SST write operation |
| 347 | * @flags: flag options for the current SPI-NOR (SNOR_F_*) | 347 | * @flags: flag options for the current SPI NOR (SNOR_F_*) |
| 348 | * @read_proto: the SPI protocol for read operations | 348 | * @read_proto: the SPI protocol for read operations |
| 349 | * @write_proto: the SPI protocol for write operations | 349 | * @write_proto: the SPI protocol for write operations |
| 350 | * @reg_proto the SPI protocol for read_reg/write_reg/erase operations | 350 | * @reg_proto: the SPI protocol for read_reg/write_reg/erase operations |
| 351 | * @controller_ops: SPI NOR controller driver specific operations. | 351 | * @controller_ops: SPI NOR controller driver specific operations. |
| 352 | * @params: [FLASH-SPECIFIC] SPI-NOR flash parameters and settings. | 352 | * @params: [FLASH-SPECIFIC] SPI NOR flash parameters and settings. |
| 353 | * The structure includes legacy flash parameters and | 353 | * The structure includes legacy flash parameters and |
| 354 | * settings that can be overwritten by the spi_nor_fixups | 354 | * settings that can be overwritten by the spi_nor_fixups |
| 355 | * hooks, or dynamically when parsing the SFDP tables. | 355 | * hooks, or dynamically when parsing the SFDP tables. |
| 356 | * @dirmap: pointers to struct spi_mem_dirmap_desc for reads/writes. | 356 | * @dirmap: pointers to struct spi_mem_dirmap_desc for reads/writes. |
| 357 | * @priv: the private data | 357 | * @priv: pointer to the private data |
| 358 | */ | 358 | */ |
| 359 | struct spi_nor { | 359 | struct spi_nor { |
| 360 | struct mtd_info mtd; | 360 | struct mtd_info mtd; |