Lines Matching full:nor

21 /* Standard SPI NOR flash operations. */
203 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type
242 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region
261 * struct spi_nor_erase_map - Structure to describe the SPI NOR erase map
265 * @uniform_region: a pre-allocated erase region for SPI NOR with a uniform
281 * struct spi_nor_locking_ops - SPI NOR locking methods
282 * @lock: lock a region of the SPI NOR.
283 * @unlock: unlock a region of the SPI NOR.
284 * @is_locked: check if a region of the SPI NOR is completely locked
287 int (*lock)(struct spi_nor *nor, loff_t ofs, u64 len);
288 int (*unlock)(struct spi_nor *nor, loff_t ofs, u64 len);
289 int (*is_locked)(struct spi_nor *nor, loff_t ofs, u64 len);
293 * struct spi_nor_otp_organization - Structure to describe the SPI NOR OTP regions
308 * struct spi_nor_otp_ops - SPI NOR OTP methods
309 * @read: read from the SPI NOR OTP area.
310 * @write: write to the SPI NOR OTP area.
313 * @is_locked: check if an OTP region of the SPI NOR is locked.
316 int (*read)(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
317 int (*write)(struct spi_nor *nor, loff_t addr, size_t len,
319 int (*lock)(struct spi_nor *nor, unsigned int region);
320 int (*erase)(struct spi_nor *nor, loff_t addr);
321 int (*is_locked)(struct spi_nor *nor, unsigned int region);
325 * struct spi_nor_otp - SPI NOR OTP grouping structure
335 * struct spi_nor_flash_parameter - SPI NOR flash parameters and settings.
344 * @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 * @locking_ops: SPI NOR locking methods.
397 int (*set_octal_dtr)(struct spi_nor *nor, bool enable);
398 int (*quad_enable)(struct spi_nor *nor);
399 int (*set_4byte_addr_mode)(struct spi_nor *nor, bool enable);
400 int (*ready)(struct spi_nor *nor);
407 * struct spi_nor_fixups - SPI NOR fixup hooks
421 * Those hooks can be used to tweak the SPI NOR configuration when the SFDP
425 void (*default_init)(struct spi_nor *nor);
426 int (*post_bfpt)(struct spi_nor *nor,
429 int (*post_sfdp)(struct spi_nor *nor);
430 int (*late_init)(struct spi_nor *nor);
434 * struct spi_nor_id - SPI NOR flash ID.
447 * struct flash_info - SPI NOR flash_info entry.
563 * struct spi_nor_manufacturer - SPI NOR manufacturer object
604 void spi_nor_spimem_setup_op(const struct spi_nor *nor,
607 int spi_nor_write_enable(struct spi_nor *nor);
608 int spi_nor_write_disable(struct spi_nor *nor);
609 int spi_nor_set_4byte_addr_mode_en4b_ex4b(struct spi_nor *nor, bool enable);
610 int spi_nor_set_4byte_addr_mode_wren_en4b_ex4b(struct spi_nor *nor,
612 int spi_nor_set_4byte_addr_mode_brwr(struct spi_nor *nor, bool enable);
613 int spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable);
614 int spi_nor_wait_till_ready(struct spi_nor *nor);
615 int spi_nor_global_block_unlock(struct spi_nor *nor);
616 int spi_nor_prep_and_lock(struct spi_nor *nor);
617 void spi_nor_unlock_and_unprep(struct spi_nor *nor);
618 int spi_nor_sr1_bit6_quad_enable(struct spi_nor *nor);
619 int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor);
620 int spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor);
621 int spi_nor_read_id(struct spi_nor *nor, u8 naddr, u8 ndummy, u8 *id,
623 int spi_nor_read_sr(struct spi_nor *nor, u8 *sr);
624 int spi_nor_sr_ready(struct spi_nor *nor);
625 int spi_nor_read_cr(struct spi_nor *nor, u8 *cr);
626 int spi_nor_write_sr(struct spi_nor *nor, const u8 *sr, size_t len);
627 int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 sr1);
628 int spi_nor_write_16bit_cr_and_check(struct spi_nor *nor, u8 cr);
630 ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len,
632 ssize_t spi_nor_write_data(struct spi_nor *nor, loff_t to, size_t len,
634 int spi_nor_read_any_reg(struct spi_nor *nor, struct spi_mem_op *op,
636 int spi_nor_write_any_volatile_reg(struct spi_nor *nor, struct spi_mem_op *op,
638 int spi_nor_erase_sector(struct spi_nor *nor, u32 addr);
640 int spi_nor_otp_read_secr(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
641 int spi_nor_otp_write_secr(struct spi_nor *nor, loff_t addr, size_t len,
643 int spi_nor_otp_erase_secr(struct spi_nor *nor, loff_t addr);
644 int spi_nor_otp_lock_sr2(struct spi_nor *nor, unsigned int region);
645 int spi_nor_otp_is_locked_sr2(struct spi_nor *nor, unsigned int region);
664 int spi_nor_post_bfpt_fixups(struct spi_nor *nor,
668 void spi_nor_init_default_locking_ops(struct spi_nor *nor);
669 void spi_nor_try_unlock_all(struct spi_nor *nor);
670 void spi_nor_set_mtd_locking_ops(struct spi_nor *nor);
671 void spi_nor_set_mtd_otp_ops(struct spi_nor *nor);
673 int spi_nor_controller_ops_read_reg(struct spi_nor *nor, u8 opcode,
675 int spi_nor_controller_ops_write_reg(struct spi_nor *nor, u8 opcode,
678 int spi_nor_check_sfdp_signature(struct spi_nor *nor);
679 int spi_nor_parse_sfdp(struct spi_nor *nor);
691 static inline bool spi_nor_needs_sfdp(const struct spi_nor *nor) in spi_nor_needs_sfdp() argument
699 return !nor->info->size; in spi_nor_needs_sfdp()
703 void spi_nor_debugfs_register(struct spi_nor *nor);
706 static inline void spi_nor_debugfs_register(struct spi_nor *nor) {} in spi_nor_debugfs_register() argument