Lines Matching full:nor
14 /* Standard SPI NOR flash operations. */
192 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type
231 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region
235 * the last in the SPI NOR flash memory and to indicate
256 * struct spi_nor_erase_map - Structure to describe the SPI NOR erase map
260 * @uniform_region: a pre-allocated erase region for SPI NOR with a uniform
268 * uniform and non-uniform SPI NOR flash memories if they
280 * struct spi_nor_locking_ops - SPI NOR locking methods
281 * @lock: lock a region of the SPI NOR.
282 * @unlock: unlock a region of the SPI NOR.
283 * @is_locked: check if a region of the SPI NOR is completely locked
286 int (*lock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
287 int (*unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
288 int (*is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
292 * struct spi_nor_otp_organization - Structure to describe the SPI NOR OTP regions
307 * struct spi_nor_otp_ops - SPI NOR OTP methods
308 * @read: read from the SPI NOR OTP area.
309 * @write: write to the SPI NOR OTP area.
312 * @is_locked: check if an OTP region of the SPI NOR is locked.
315 int (*read)(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
316 int (*write)(struct spi_nor *nor, loff_t addr, size_t len,
318 int (*lock)(struct spi_nor *nor, unsigned int region);
319 int (*erase)(struct spi_nor *nor, loff_t addr);
320 int (*is_locked)(struct spi_nor *nor, unsigned int region);
324 * struct spi_nor_otp - SPI NOR OTP grouping structure
334 * struct spi_nor_flash_parameter - SPI NOR flash parameters and settings.
342 * @page_size: the page size of the SPI NOR flash memory.
360 * @otp: SPI NOR OTP info.
361 * @octal_dtr_enable: enables SPI NOR octal DTR mode.
362 * @quad_enable: enables SPI NOR quad mode.
363 * @set_4byte_addr_mode: puts the SPI NOR in 4 byte addressing mode.
367 * @setup: (optional) configures the SPI NOR memory. Useful for
368 * SPI NOR flashes that have peculiarities to the SPI NOR
374 * @locking_ops: SPI NOR locking methods.
392 int (*octal_dtr_enable)(struct spi_nor *nor, bool enable);
393 int (*quad_enable)(struct spi_nor *nor);
394 int (*set_4byte_addr_mode)(struct spi_nor *nor, bool enable);
395 u32 (*convert_addr)(struct spi_nor *nor, u32 addr);
396 int (*setup)(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps);
397 int (*ready)(struct spi_nor *nor);
403 * struct spi_nor_fixups - SPI NOR fixup hooks
417 * Those hooks can be used to tweak the SPI NOR configuration when the SFDP
421 void (*default_init)(struct spi_nor *nor);
422 int (*post_bfpt)(struct spi_nor *nor,
425 void (*post_sfdp)(struct spi_nor *nor);
426 void (*late_init)(struct spi_nor *nor);
430 * struct flash_info - SPI NOR flash_info entry.
589 * struct spi_nor_manufacturer - SPI NOR manufacturer object
633 void spi_nor_spimem_setup_op(const struct spi_nor *nor,
636 int spi_nor_write_enable(struct spi_nor *nor);
637 int spi_nor_write_disable(struct spi_nor *nor);
638 int spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable);
639 int spi_nor_wait_till_ready(struct spi_nor *nor);
640 int spi_nor_global_block_unlock(struct spi_nor *nor);
641 int spi_nor_lock_and_prep(struct spi_nor *nor);
642 void spi_nor_unlock_and_unprep(struct spi_nor *nor);
643 int spi_nor_sr1_bit6_quad_enable(struct spi_nor *nor);
644 int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor);
645 int spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor);
646 int spi_nor_read_id(struct spi_nor *nor, u8 naddr, u8 ndummy, u8 *id,
648 int spi_nor_read_sr(struct spi_nor *nor, u8 *sr);
649 int spi_nor_sr_ready(struct spi_nor *nor);
650 int spi_nor_read_cr(struct spi_nor *nor, u8 *cr);
651 int spi_nor_write_sr(struct spi_nor *nor, const u8 *sr, size_t len);
652 int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 sr1);
653 int spi_nor_write_16bit_cr_and_check(struct spi_nor *nor, u8 cr);
655 ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len,
657 ssize_t spi_nor_write_data(struct spi_nor *nor, loff_t to, size_t len,
659 int spi_nor_read_any_reg(struct spi_nor *nor, struct spi_mem_op *op,
661 int spi_nor_write_any_volatile_reg(struct spi_nor *nor, struct spi_mem_op *op,
663 int spi_nor_erase_sector(struct spi_nor *nor, u32 addr);
665 int spi_nor_otp_read_secr(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
666 int spi_nor_otp_write_secr(struct spi_nor *nor, loff_t addr, size_t len,
668 int spi_nor_otp_erase_secr(struct spi_nor *nor, loff_t addr);
669 int spi_nor_otp_lock_sr2(struct spi_nor *nor, unsigned int region);
670 int spi_nor_otp_is_locked_sr2(struct spi_nor *nor, unsigned int region);
690 int spi_nor_post_bfpt_fixups(struct spi_nor *nor,
694 void spi_nor_init_default_locking_ops(struct spi_nor *nor);
695 void spi_nor_try_unlock_all(struct spi_nor *nor);
696 void spi_nor_set_mtd_locking_ops(struct spi_nor *nor);
697 void spi_nor_set_mtd_otp_ops(struct spi_nor *nor);
699 int spi_nor_controller_ops_read_reg(struct spi_nor *nor, u8 opcode,
701 int spi_nor_controller_ops_write_reg(struct spi_nor *nor, u8 opcode,
710 void spi_nor_debugfs_register(struct spi_nor *nor);
712 static inline void spi_nor_debugfs_register(struct spi_nor *nor) {} in spi_nor_debugfs_register() argument