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 */
53 #define SPINOR_OP_WREAR 0xc5 /* Write Extended Address Register */
55 /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
73 /* Double Transfer Rate opcodes - defined in JEDEC JESD216B. */
96 #define SPINOR_OP_EN4B 0xb7 /* Enter 4-byte mode */
97 #define SPINOR_OP_EX4B 0xe9 /* Exit 4-byte mode */
100 #define SPINOR_OP_BRWR 0x17 /* Bank register write */
105 #define SPINOR_OP_WD_EVCR 0x61 /* Write EVCR register */
108 #define SR_WIP BIT(0) /* Write in progress */
109 #define SR_WEL BIT(1) /* Write enable latch */
111 #define SR_BP0 BIT(2) /* Block protect 0 */
112 #define SR_BP1 BIT(3) /* Block protect 1 */
113 #define SR_BP2 BIT(4) /* Block protect 2 */
114 #define SR_BP3 BIT(5) /* Block protect 3 */
115 #define SR_TB_BIT5 BIT(5) /* Top/Bottom protect */
116 #define SR_BP3_BIT6 BIT(6) /* Block protect 3 */
117 #define SR_TB_BIT6 BIT(6) /* Top/Bottom protect */
118 #define SR_SRWD BIT(7) /* SR write protect */
216 * struct spi_nor_hwcaps - Structure for describing the hardware capabilies
258 * legacy SPI 1-1-1 protocol.
294 * struct spi_nor_controller_ops - SPI NOR controller driver specific
297 * read/write/erase/lock/unlock operations.
299 * read/write/erase/lock/unlock operations.
301 * @write_reg: write data to the register.
303 * @write: write data to the SPI NOR.
316 ssize_t (*write)(struct spi_nor *nor, loff_t to, size_t len, member
330 * struct spi_nor - Structure for defining the SPI NOR layer
332 * @lock: the lock for the read/write/erase/lock/unlock operations
336 * layer is not DMA-able
346 * @sst_write_second: used by the SST write operation
349 * @write_proto: the SPI protocol for write operations
352 * @params: [FLASH-SPECIFIC] SPI NOR flash parameters and settings.
395 mtd_set_of_node(&nor->mtd, np); in spi_nor_set_flash_node()
400 return mtd_get_of_node(&nor->mtd); in spi_nor_get_flash_node()
404 * spi_nor_scan() - scan the SPI NOR
421 * spi_nor_restore_addr_mode() - restore the status of SPI NOR