Lines Matching +full:write +full:- +full:protect

1 /* SPDX-License-Identifier: GPL-2.0+ */
11 #include <linux/spi/spi-mem.h>
18 * requires a 4-byte (32-bit) address.
22 #define SPINOR_OP_WRDI 0x04 /* Write disable */
23 #define SPINOR_OP_WREN 0x06 /* Write enable */
25 #define SPINOR_OP_WRSR 0x01 /* Write status register 1 byte */
27 #define SPINOR_OP_WRSR2 0x3e /* Write status register 2 */
53 /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
71 /* Double Transfer Rate opcodes - defined in JEDEC JESD216B. */
85 #define SPINOR_OP_EN4B 0xb7 /* Enter 4-byte mode */
86 #define SPINOR_OP_EX4B 0xe9 /* Exit 4-byte mode */
89 #define SPINOR_OP_BRWR 0x17 /* Bank register write */
93 #define SPINOR_OP_WD_EVCR 0x61 /* Write EVCR register */
101 #define SR_WIP BIT(0) /* Write in progress */
102 #define SR_WEL BIT(1) /* Write enable latch */
104 #define SR_BP0 BIT(2) /* Block protect 0 */
105 #define SR_BP1 BIT(3) /* Block protect 1 */
106 #define SR_BP2 BIT(4) /* Block protect 2 */
107 #define SR_BP3 BIT(5) /* Block protect 3 */
108 #define SR_TB_BIT5 BIT(5) /* Top/Bottom protect */
109 #define SR_BP3_BIT6 BIT(6) /* Block protect 3 */
110 #define SR_TB_BIT6 BIT(6) /* Top/Bottom protect */
111 #define SR_SRWD BIT(7) /* SR write protect */
207 * struct spi_nor_hwcaps - Structure for describing the hardware capabilies
250 * legacy SPI 1-1-1 protocol.
291 * struct spi_nor_controller_ops - SPI NOR controller driver specific
294 * read/write/erase/lock/unlock operations.
296 * read/write/erase/lock/unlock operations.
298 * @write_reg: write data to the register.
300 * @write: write data to the SPI NOR.
313 ssize_t (*write)(struct spi_nor *nor, loff_t to, size_t len, member
319 * enum spi_nor_cmd_ext - describes the command opcode extension in DTR mode
325 * combine to form a 16-bit opcode.
343 * struct spi_nor - Structure for defining the SPI NOR layer
345 * @lock: the lock for the read/write/erase/lock/unlock operations
346 * @rww: Read-While-Write (RWW) sync lock
355 * layer is not DMA-able
366 * @sst_write_second: used by the SST write operation
370 * @write_proto: the SPI protocol for write operations
375 * @params: [FLASH-SPECIFIC] SPI NOR flash parameters and settings.
428 mtd_set_of_node(&nor->mtd, np); in spi_nor_set_flash_node()
433 return mtd_get_of_node(&nor->mtd); in spi_nor_get_flash_node()
437 * spi_nor_scan() - scan the SPI NOR