Lines Matching full:nor
91 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type
130 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region
134 * the last in the SPI NOR flash memory and to indicate
155 * struct spi_nor_erase_map - Structure to describe the SPI NOR erase map
159 * @uniform_region: a pre-allocated erase region for SPI NOR with a uniform
167 * uniform and non-uniform SPI NOR flash memories if they
179 * struct spi_nor_locking_ops - SPI NOR locking methods
180 * @lock: lock a region of the SPI NOR.
181 * @unlock: unlock a region of the SPI NOR.
182 * @is_locked: check if a region of the SPI NOR is completely locked
185 int (*lock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
186 int (*unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
187 int (*is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
191 * struct spi_nor_otp_organization - Structure to describe the SPI NOR OTP regions
206 * struct spi_nor_otp_ops - SPI NOR OTP methods
207 * @read: read from the SPI NOR OTP area.
208 * @write: write to the SPI NOR OTP area.
211 * @is_locked: check if an OTP region of the SPI NOR is locked.
214 int (*read)(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
215 int (*write)(struct spi_nor *nor, loff_t addr, size_t len,
217 int (*lock)(struct spi_nor *nor, unsigned int region);
218 int (*erase)(struct spi_nor *nor, loff_t addr);
219 int (*is_locked)(struct spi_nor *nor, unsigned int region);
223 * struct spi_nor_otp - SPI NOR OTP grouping structure
233 * struct spi_nor_flash_parameter - SPI NOR flash parameters and settings.
241 * @page_size: the page size of the SPI NOR flash memory.
254 * @octal_dtr_enable: enables SPI NOR octal DTR mode.
255 * @quad_enable: enables SPI NOR quad mode.
256 * @set_4byte_addr_mode: puts the SPI NOR in 4 byte addressing mode.
260 * @setup: configures the SPI NOR memory. Useful for SPI NOR
261 * flashes that have peculiarities to the SPI NOR standard
264 * @locking_ops: SPI NOR locking methods.
265 * @otp: SPI NOR OTP methods.
281 int (*octal_dtr_enable)(struct spi_nor *nor, bool enable);
282 int (*quad_enable)(struct spi_nor *nor);
283 int (*set_4byte_addr_mode)(struct spi_nor *nor, bool enable);
284 u32 (*convert_addr)(struct spi_nor *nor, u32 addr);
285 int (*setup)(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps);
291 * struct spi_nor_fixups - SPI NOR fixup hooks
302 * Those hooks can be used to tweak the SPI NOR configuration when the SFDP
306 void (*default_init)(struct spi_nor *nor);
307 int (*post_bfpt)(struct spi_nor *nor,
310 void (*post_sfdp)(struct spi_nor *nor);
451 * struct spi_nor_manufacturer - SPI NOR manufacturer object
495 void spi_nor_spimem_setup_op(const struct spi_nor *nor,
498 int spi_nor_write_enable(struct spi_nor *nor);
499 int spi_nor_write_disable(struct spi_nor *nor);
500 int spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable);
501 int spi_nor_write_ear(struct spi_nor *nor, u8 ear);
502 int spi_nor_wait_till_ready(struct spi_nor *nor);
503 int spi_nor_global_block_unlock(struct spi_nor *nor);
504 int spi_nor_lock_and_prep(struct spi_nor *nor);
505 void spi_nor_unlock_and_unprep(struct spi_nor *nor);
506 int spi_nor_sr1_bit6_quad_enable(struct spi_nor *nor);
507 int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor);
508 int spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor);
509 int spi_nor_read_sr(struct spi_nor *nor, u8 *sr);
510 int spi_nor_read_cr(struct spi_nor *nor, u8 *cr);
511 int spi_nor_write_sr(struct spi_nor *nor, const u8 *sr, size_t len);
512 int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 sr1);
513 int spi_nor_write_16bit_cr_and_check(struct spi_nor *nor, u8 cr);
515 int spi_nor_xread_sr(struct spi_nor *nor, u8 *sr);
516 ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len,
518 ssize_t spi_nor_write_data(struct spi_nor *nor, loff_t to, size_t len,
520 int spi_nor_erase_sector(struct spi_nor *nor, u32 addr);
522 int spi_nor_otp_read_secr(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
523 int spi_nor_otp_write_secr(struct spi_nor *nor, loff_t addr, size_t len,
525 int spi_nor_otp_erase_secr(struct spi_nor *nor, loff_t addr);
526 int spi_nor_otp_lock_sr2(struct spi_nor *nor, unsigned int region);
527 int spi_nor_otp_is_locked_sr2(struct spi_nor *nor, unsigned int region);
546 int spi_nor_post_bfpt_fixups(struct spi_nor *nor,
550 void spi_nor_init_default_locking_ops(struct spi_nor *nor);
551 void spi_nor_try_unlock_all(struct spi_nor *nor);
552 void spi_nor_register_locking_ops(struct spi_nor *nor);
553 void spi_nor_otp_init(struct spi_nor *nor);