Lines Matching full:nor

14 /* Standard SPI NOR flash operations. */
195 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type
234 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region
238 * the last in the SPI NOR flash memory and to indicate
259 * struct spi_nor_erase_map - Structure to describe the SPI NOR erase map
263 * @uniform_region: a pre-allocated erase region for SPI NOR with a uniform
271 * uniform and non-uniform SPI NOR flash memories if they
283 * struct spi_nor_locking_ops - SPI NOR locking methods
284 * @lock: lock a region of the SPI NOR.
285 * @unlock: unlock a region of the SPI NOR.
286 * @is_locked: check if a region of the SPI NOR is completely locked
289 int (*lock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
290 int (*unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
291 int (*is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
295 * struct spi_nor_otp_organization - Structure to describe the SPI NOR OTP regions
310 * struct spi_nor_otp_ops - SPI NOR OTP methods
311 * @read: read from the SPI NOR OTP area.
312 * @write: write to the SPI NOR OTP area.
315 * @is_locked: check if an OTP region of the SPI NOR is locked.
318 int (*read)(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
319 int (*write)(struct spi_nor *nor, loff_t addr, size_t len,
321 int (*lock)(struct spi_nor *nor, unsigned int region);
322 int (*erase)(struct spi_nor *nor, loff_t addr);
323 int (*is_locked)(struct spi_nor *nor, unsigned int region);
327 * struct spi_nor_otp - SPI NOR OTP grouping structure
337 * struct spi_nor_flash_parameter - SPI NOR flash parameters and settings.
346 * @page_size: the page size of the SPI NOR flash memory.
366 * @otp: SPI NOR OTP info.
367 * @set_octal_dtr: enables or disables SPI NOR octal DTR mode.
368 * @quad_enable: enables SPI NOR quad mode.
369 * @set_4byte_addr_mode: puts the SPI NOR in 4 byte addressing mode.
373 * @setup: (optional) configures the SPI NOR memory. Useful for
374 * SPI NOR flashes that have peculiarities to the SPI NOR
380 * @locking_ops: SPI NOR locking methods.
402 int (*set_octal_dtr)(struct spi_nor *nor, bool enable);
403 int (*quad_enable)(struct spi_nor *nor);
404 int (*set_4byte_addr_mode)(struct spi_nor *nor, bool enable);
405 u32 (*convert_addr)(struct spi_nor *nor, u32 addr);
406 int (*setup)(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps);
407 int (*ready)(struct spi_nor *nor);
414 * struct spi_nor_fixups - SPI NOR fixup hooks
428 * Those hooks can be used to tweak the SPI NOR configuration when the SFDP
432 void (*default_init)(struct spi_nor *nor);
433 int (*post_bfpt)(struct spi_nor *nor,
436 int (*post_sfdp)(struct spi_nor *nor);
437 int (*late_init)(struct spi_nor *nor);
441 * struct flash_info - SPI NOR flash_info entry.
609 * struct spi_nor_manufacturer - SPI NOR manufacturer object
653 void spi_nor_spimem_setup_op(const struct spi_nor *nor,
656 int spi_nor_write_enable(struct spi_nor *nor);
657 int spi_nor_write_disable(struct spi_nor *nor);
658 int spi_nor_set_4byte_addr_mode_en4b_ex4b(struct spi_nor *nor, bool enable);
659 int spi_nor_set_4byte_addr_mode_wren_en4b_ex4b(struct spi_nor *nor,
661 int spi_nor_set_4byte_addr_mode_brwr(struct spi_nor *nor, bool enable);
662 int spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable);
663 int spi_nor_wait_till_ready(struct spi_nor *nor);
664 int spi_nor_global_block_unlock(struct spi_nor *nor);
665 int spi_nor_prep_and_lock(struct spi_nor *nor);
666 void spi_nor_unlock_and_unprep(struct spi_nor *nor);
667 int spi_nor_sr1_bit6_quad_enable(struct spi_nor *nor);
668 int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor);
669 int spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor);
670 int spi_nor_read_id(struct spi_nor *nor, u8 naddr, u8 ndummy, u8 *id,
672 int spi_nor_read_sr(struct spi_nor *nor, u8 *sr);
673 int spi_nor_sr_ready(struct spi_nor *nor);
674 int spi_nor_read_cr(struct spi_nor *nor, u8 *cr);
675 int spi_nor_write_sr(struct spi_nor *nor, const u8 *sr, size_t len);
676 int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 sr1);
677 int spi_nor_write_16bit_cr_and_check(struct spi_nor *nor, u8 cr);
679 ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len,
681 ssize_t spi_nor_write_data(struct spi_nor *nor, loff_t to, size_t len,
683 int spi_nor_read_any_reg(struct spi_nor *nor, struct spi_mem_op *op,
685 int spi_nor_write_any_volatile_reg(struct spi_nor *nor, struct spi_mem_op *op,
687 int spi_nor_erase_sector(struct spi_nor *nor, u32 addr);
689 int spi_nor_otp_read_secr(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
690 int spi_nor_otp_write_secr(struct spi_nor *nor, loff_t addr, size_t len,
692 int spi_nor_otp_erase_secr(struct spi_nor *nor, loff_t addr);
693 int spi_nor_otp_lock_sr2(struct spi_nor *nor, unsigned int region);
694 int spi_nor_otp_is_locked_sr2(struct spi_nor *nor, unsigned int region);
715 int spi_nor_post_bfpt_fixups(struct spi_nor *nor,
719 void spi_nor_init_default_locking_ops(struct spi_nor *nor);
720 void spi_nor_try_unlock_all(struct spi_nor *nor);
721 void spi_nor_set_mtd_locking_ops(struct spi_nor *nor);
722 void spi_nor_set_mtd_otp_ops(struct spi_nor *nor);
724 int spi_nor_controller_ops_read_reg(struct spi_nor *nor, u8 opcode,
726 int spi_nor_controller_ops_write_reg(struct spi_nor *nor, u8 opcode,
729 int spi_nor_check_sfdp_signature(struct spi_nor *nor);
730 int spi_nor_parse_sfdp(struct spi_nor *nor);
738 void spi_nor_debugfs_register(struct spi_nor *nor);
741 static inline void spi_nor_debugfs_register(struct spi_nor *nor) {} in spi_nor_debugfs_register() argument