Lines Matching +full:write +full:- +full:protect
1 /* SPDX-License-Identifier: GPL-2.0+ */
12 #include <linux/spi/spi-mem.h>
19 * requires a 4-byte (32-bit) address.
23 #define SPINOR_OP_WRDI 0x04 /* Write disable */
24 #define SPINOR_OP_WREN 0x06 /* Write enable */
26 #define SPINOR_OP_WRSR 0x01 /* Write status register 1 byte */
28 #define SPINOR_OP_WRSR2 0x3e /* Write status register 2 */
54 /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
72 /* Double Transfer Rate opcodes - defined in JEDEC JESD216B. */
86 #define SPINOR_OP_EN4B 0xb7 /* Enter 4-byte mode */
87 #define SPINOR_OP_EX4B 0xe9 /* Exit 4-byte mode */
90 #define SPINOR_OP_BRWR 0x17 /* Bank register write */
94 #define SPINOR_OP_WD_EVCR 0x61 /* Write EVCR register */
102 #define SR_WIP BIT(0) /* Write in progress */
103 #define SR_WEL BIT(1) /* Write enable latch */
105 #define SR_BP0 BIT(2) /* Block protect 0 */
106 #define SR_BP1 BIT(3) /* Block protect 1 */
107 #define SR_BP2 BIT(4) /* Block protect 2 */
108 #define SR_BP3 BIT(5) /* Block protect 3 */
109 #define SR_TB_BIT5 BIT(5) /* Top/Bottom protect */
110 #define SR_BP3_BIT6 BIT(6) /* Block protect 3 */
111 #define SR_TB_BIT6 BIT(6) /* Top/Bottom protect */
112 #define SR_SRWD BIT(7) /* SR write protect */
208 * struct spi_nor_hwcaps - Structure for describing the hardware capabilies
251 * legacy SPI 1-1-1 protocol.
292 * struct spi_nor_controller_ops - SPI NOR controller driver specific
295 * read/write/erase/lock/unlock operations.
297 * read/write/erase/lock/unlock operations.
299 * @write_reg: write data to the register.
301 * @write: write data to the SPI NOR.
314 ssize_t (*write)(struct spi_nor *nor, loff_t to, size_t len, member
320 * enum spi_nor_cmd_ext - describes the command opcode extension in DTR mode
326 * combine to form a 16-bit opcode.
344 * struct spi_nor - Structure for defining the SPI NOR layer
346 * @lock: the lock for the read/write/erase/lock/unlock operations
350 * layer is not DMA-able
359 * @sst_write_second: used by the SST write operation
363 * @write_proto: the SPI protocol for write operations
368 * @params: [FLASH-SPECIFIC] SPI NOR flash parameters and settings.
413 mtd_set_of_node(&nor->mtd, np); in spi_nor_set_flash_node()
418 return mtd_get_of_node(&nor->mtd); in spi_nor_get_flash_node()
422 * spi_nor_scan() - scan the SPI NOR
439 * spi_nor_restore_addr_mode() - restore the status of SPI NOR