Home
last modified time | relevance | path

Searched full:nor (Results 1 – 25 of 2170) sorted by relevance

12345678910>>...87

/linux/drivers/mtd/spi-nor/
H A Dcore.c18 #include <linux/mtd/spi-nor.h>
51 * @nor: pointer to a 'struct spi_nor'
59 static u8 spi_nor_get_cmd_ext(const struct spi_nor *nor, in spi_nor_get_cmd_ext() argument
62 switch (nor->cmd_ext_type) { in spi_nor_get_cmd_ext()
70 dev_err(nor->dev, "Unknown command extension type\n"); in spi_nor_get_cmd_ext()
77 * @nor: pointer to a 'struct spi_nor'
82 void spi_nor_spimem_setup_op(const struct spi_nor *nor, in spi_nor_spimem_setup_op() argument
103 * something like 4S-4D-4D, but SPI NOR can't. So, set all 4 in spi_nor_spimem_setup_op()
114 ext = spi_nor_get_cmd_ext(nor, op); in spi_nor_spimem_setup_op()
119 if (proto == SNOR_PROTO_8_8_8_DTR && nor in spi_nor_spimem_setup_op()
133 spi_nor_spimem_bounce(struct spi_nor * nor,struct spi_mem_op * op) spi_nor_spimem_bounce() argument
154 spi_nor_spimem_exec_op(struct spi_nor * nor,struct spi_mem_op * op) spi_nor_spimem_exec_op() argument
165 spi_nor_controller_ops_read_reg(struct spi_nor * nor,u8 opcode,u8 * buf,size_t len) spi_nor_controller_ops_read_reg() argument
174 spi_nor_controller_ops_write_reg(struct spi_nor * nor,u8 opcode,const u8 * buf,size_t len) spi_nor_controller_ops_write_reg() argument
183 spi_nor_controller_ops_erase(struct spi_nor * nor,loff_t offs) spi_nor_controller_ops_erase() argument
201 spi_nor_spimem_read_data(struct spi_nor * nor,loff_t from,size_t len,u8 * buf) spi_nor_spimem_read_data() argument
247 spi_nor_read_data(struct spi_nor * nor,loff_t from,size_t len,u8 * buf) spi_nor_read_data() argument
265 spi_nor_spimem_write_data(struct spi_nor * nor,loff_t to,size_t len,const u8 * buf) spi_nor_spimem_write_data() argument
306 spi_nor_write_data(struct spi_nor * nor,loff_t to,size_t len,const u8 * buf) spi_nor_write_data() argument
324 spi_nor_read_any_reg(struct spi_nor * nor,struct spi_mem_op * op,enum spi_nor_protocol proto) spi_nor_read_any_reg() argument
346 spi_nor_write_any_volatile_reg(struct spi_nor * nor,struct spi_mem_op * op,enum spi_nor_protocol proto) spi_nor_write_any_volatile_reg() argument
367 spi_nor_write_enable(struct spi_nor * nor) spi_nor_write_enable() argument
394 spi_nor_write_disable(struct spi_nor * nor) spi_nor_write_disable() argument
428 spi_nor_read_id(struct spi_nor * nor,u8 naddr,u8 ndummy,u8 * id,enum spi_nor_protocol proto) spi_nor_read_id() argument
454 spi_nor_read_sr(struct spi_nor * nor,u8 * sr) spi_nor_read_sr() argument
494 spi_nor_read_cr(struct spi_nor * nor,u8 * cr) spi_nor_read_cr() argument
525 spi_nor_set_4byte_addr_mode_en4b_ex4b(struct spi_nor * nor,bool enable) spi_nor_set_4byte_addr_mode_en4b_ex4b() argument
558 spi_nor_set_4byte_addr_mode_wren_en4b_ex4b(struct spi_nor * nor,bool enable) spi_nor_set_4byte_addr_mode_wren_en4b_ex4b() argument
587 spi_nor_set_4byte_addr_mode_brwr(struct spi_nor * nor,bool enable) spi_nor_set_4byte_addr_mode_brwr() argument
617 spi_nor_sr_ready(struct spi_nor * nor) spi_nor_sr_ready() argument
634 spi_nor_use_parallel_locking(struct spi_nor * nor) spi_nor_use_parallel_locking() argument
640 spi_nor_rww_start_rdst(struct spi_nor * nor) spi_nor_rww_start_rdst() argument
655 spi_nor_rww_end_rdst(struct spi_nor * nor) spi_nor_rww_end_rdst() argument
665 spi_nor_lock_rdst(struct spi_nor * nor) spi_nor_lock_rdst() argument
673 spi_nor_unlock_rdst(struct spi_nor * nor) spi_nor_unlock_rdst() argument
687 spi_nor_ready(struct spi_nor * nor) spi_nor_ready() argument
714 spi_nor_wait_till_ready_with_timeout(struct spi_nor * nor,unsigned long timeout_jiffies) spi_nor_wait_till_ready_with_timeout() argument
747 spi_nor_wait_till_ready(struct spi_nor * nor) spi_nor_wait_till_ready() argument
759 spi_nor_global_block_unlock(struct spi_nor * nor) spi_nor_global_block_unlock() argument
794 spi_nor_write_sr(struct spi_nor * nor,const u8 * sr,size_t len) spi_nor_write_sr() argument
829 spi_nor_write_sr1_and_check(struct spi_nor * nor,u8 sr1) spi_nor_write_sr1_and_check() argument
861 spi_nor_write_16bit_sr_and_check(struct spi_nor * nor,u8 sr1) spi_nor_write_16bit_sr_and_check() argument
936 spi_nor_write_16bit_cr_and_check(struct spi_nor * nor,u8 cr) spi_nor_write_16bit_cr_and_check() argument
988 spi_nor_write_sr_and_check(struct spi_nor * nor,u8 sr1) spi_nor_write_sr_and_check() argument
1004 spi_nor_write_sr2(struct spi_nor * nor,const u8 * sr2) spi_nor_write_sr2() argument
1040 spi_nor_read_sr2(struct spi_nor * nor,u8 * sr2) spi_nor_read_sr2() argument
1069 spi_nor_erase_die(struct spi_nor * nor,loff_t addr,size_t die_size) spi_nor_erase_die() argument
1158 spi_nor_has_uniform_erase(const struct spi_nor * nor) spi_nor_has_uniform_erase() argument
1163 spi_nor_set_4byte_opcodes(struct spi_nor * nor) spi_nor_set_4byte_opcodes() argument
1182 spi_nor_prep(struct spi_nor * nor) spi_nor_prep() argument
1192 spi_nor_unprep(struct spi_nor * nor) spi_nor_unprep() argument
1207 spi_nor_rww_start_io(struct spi_nor * nor) spi_nor_rww_start_io() argument
1221 spi_nor_rww_end_io(struct spi_nor * nor) spi_nor_rww_end_io() argument
1227 spi_nor_lock_device(struct spi_nor * nor) spi_nor_lock_device() argument
1235 spi_nor_unlock_device(struct spi_nor * nor) spi_nor_unlock_device() argument
1244 spi_nor_rww_start_exclusive(struct spi_nor * nor) spi_nor_rww_start_exclusive() argument
1260 spi_nor_rww_end_exclusive(struct spi_nor * nor) spi_nor_rww_end_exclusive() argument
1270 spi_nor_prep_and_lock(struct spi_nor * nor) spi_nor_prep_and_lock() argument
1287 spi_nor_unlock_and_unprep(struct spi_nor * nor) spi_nor_unlock_and_unprep() argument
1300 spi_nor_rww_start_pe(struct spi_nor * nor,loff_t start,size_t len) spi_nor_rww_start_pe() argument
1326 spi_nor_rww_end_pe(struct spi_nor * nor,loff_t start,size_t len) spi_nor_rww_end_pe() argument
1341 spi_nor_prep_and_lock_pe(struct spi_nor * nor,loff_t start,size_t len) spi_nor_prep_and_lock_pe() argument
1358 spi_nor_unlock_and_unprep_pe(struct spi_nor * nor,loff_t start,size_t len) spi_nor_unlock_and_unprep_pe() argument
1371 spi_nor_rww_start_rd(struct spi_nor * nor,loff_t start,size_t len) spi_nor_rww_start_rd() argument
1398 spi_nor_rww_end_rd(struct spi_nor * nor,loff_t start,size_t len) spi_nor_rww_end_rd() argument
1414 spi_nor_prep_and_lock_rd(struct spi_nor * nor,loff_t start,size_t len) spi_nor_prep_and_lock_rd() argument
1431 spi_nor_unlock_and_unprep_rd(struct spi_nor * nor,loff_t start,size_t len) spi_nor_unlock_and_unprep_rd() argument
1446 spi_nor_erase_sector(struct spi_nor * nor,u32 addr) spi_nor_erase_sector() argument
1599 spi_nor_init_erase_cmd_list(struct spi_nor * nor,struct list_head * erase_list,u64 addr,u32 len) spi_nor_init_erase_cmd_list() argument
1658 spi_nor_erase_multi_sectors(struct spi_nor * nor,u64 addr,u32 len) spi_nor_erase_multi_sectors() argument
1707 spi_nor_erase_dice(struct spi_nor * nor,loff_t addr,size_t len,size_t die_size) spi_nor_erase_dice() argument
1758 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_erase() local
1851 spi_nor_sr1_bit6_quad_enable(struct spi_nor * nor) spi_nor_sr1_bit6_quad_enable() argument
1876 spi_nor_sr2_bit1_quad_enable(struct spi_nor * nor) spi_nor_sr2_bit1_quad_enable() argument
1907 spi_nor_sr2_bit7_quad_enable(struct spi_nor * nor) spi_nor_sr2_bit7_quad_enable() argument
1963 spi_nor_match_id(struct spi_nor * nor,const u8 * id) spi_nor_match_id() argument
1983 spi_nor_detect(struct spi_nor * nor) spi_nor_detect() argument
2020 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_read() local
2065 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_write() local
2112 spi_nor_check(struct spi_nor * nor) spi_nor_check() argument
2214 spi_nor_spimem_check_op(struct spi_nor * nor,struct spi_mem_op * op) spi_nor_spimem_check_op() argument
2245 spi_nor_spimem_check_readop(struct spi_nor * nor,const struct spi_nor_read_command * read) spi_nor_spimem_check_readop() argument
2269 spi_nor_spimem_check_pp(struct spi_nor * nor,const struct spi_nor_pp_command * pp) spi_nor_spimem_check_pp() argument
2287 spi_nor_spimem_adjust_hwcaps(struct spi_nor * nor,u32 * hwcaps) spi_nor_spimem_adjust_hwcaps() argument
2365 spi_nor_post_bfpt_fixups(struct spi_nor * nor,const struct sfdp_parameter_header * bfpt_header,const struct sfdp_bfpt * bfpt) spi_nor_post_bfpt_fixups() argument
2385 spi_nor_select_read(struct spi_nor * nor,u32 shared_hwcaps) spi_nor_select_read() argument
2416 spi_nor_select_pp(struct spi_nor * nor,u32 shared_hwcaps) spi_nor_select_pp() argument
2492 spi_nor_select_erase(struct spi_nor * nor) spi_nor_select_erase() argument
2534 spi_nor_set_addr_nbytes(struct spi_nor * nor) spi_nor_set_addr_nbytes() argument
2577 spi_nor_setup(struct spi_nor * nor,const struct spi_nor_hwcaps * hwcaps) spi_nor_setup() argument
2643 spi_nor_manufacturer_init_params(struct spi_nor * nor) spi_nor_manufacturer_init_params() argument
2662 spi_nor_no_sfdp_init_params(struct spi_nor * nor) spi_nor_no_sfdp_init_params() argument
2732 spi_nor_init_flags(struct spi_nor * nor) spi_nor_init_flags() argument
2774 spi_nor_init_fixup_flags(struct spi_nor * nor) spi_nor_init_fixup_flags() argument
2793 spi_nor_late_init_params(struct spi_nor * nor) spi_nor_late_init_params() argument
2844 spi_nor_sfdp_init_params_deprecated(struct spi_nor * nor) spi_nor_sfdp_init_params_deprecated() argument
2865 spi_nor_init_params_deprecated(struct spi_nor * nor) spi_nor_init_params_deprecated() argument
2884 spi_nor_init_default_params(struct spi_nor * nor) spi_nor_init_default_params() argument
2966 spi_nor_init_params(struct spi_nor * nor) spi_nor_init_params() argument
3004 spi_nor_set_octal_dtr(struct spi_nor * nor,bool enable) spi_nor_set_octal_dtr() argument
3036 spi_nor_quad_enable(struct spi_nor * nor) spi_nor_quad_enable() argument
3055 spi_nor_set_4byte_addr_mode(struct spi_nor * nor,bool enable) spi_nor_set_4byte_addr_mode() argument
3087 spi_nor_init(struct spi_nor * nor) spi_nor_init() argument
3141 spi_nor_soft_reset(struct spi_nor * nor) spi_nor_soft_reset() argument
3178 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_suspend() local
3192 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_resume() local
3205 struct spi_nor *nor = mtd_to_spi_nor(master); spi_nor_get_device() local
3222 struct spi_nor *nor = mtd_to_spi_nor(master); spi_nor_put_device() local
3233 spi_nor_restore(struct spi_nor * nor) spi_nor_restore() argument
3254 spi_nor_match_name(struct spi_nor * nor,const char * name) spi_nor_match_name() argument
3272 spi_nor_get_flash_info(struct spi_nor * nor,const char * name) spi_nor_get_flash_info() argument
3323 spi_nor_set_mtd_eraseregions(struct spi_nor * nor) spi_nor_set_mtd_eraseregions() argument
3353 spi_nor_set_mtd_info(struct spi_nor * nor) spi_nor_set_mtd_info() argument
3391 spi_nor_hw_reset(struct spi_nor * nor) spi_nor_hw_reset() argument
3412 spi_nor_scan(struct spi_nor * nor,const char * name,const struct spi_nor_hwcaps * hwcaps) spi_nor_scan() argument
3490 spi_nor_create_read_dirmap(struct spi_nor * nor) spi_nor_create_read_dirmap() argument
3521 spi_nor_create_write_dirmap(struct spi_nor * nor) spi_nor_create_write_dirmap() argument
3555 struct spi_nor *nor; spi_nor_probe() local
3631 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_remove() local
3641 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_shutdown() local
[all...]
H A Dotp.c3 * OTP support for SPI NOR flashes
11 #include <linux/mtd/spi-nor.h>
15 #define spi_nor_otp_region_len(nor) ((nor)->params->otp.org->len) argument
16 #define spi_nor_otp_n_regions(nor) ((nor)->params->otp.org->n_regions) argument
20 * @nor: pointer to 'struct spi_nor'
37 int spi_nor_otp_read_secr(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf) in spi_nor_otp_read_secr() argument
44 read_opcode = nor->read_opcode; in spi_nor_otp_read_secr()
45 addr_nbytes = nor in spi_nor_otp_read_secr()
84 spi_nor_otp_write_secr(struct spi_nor * nor,loff_t addr,size_t len,const u8 * buf) spi_nor_otp_write_secr() argument
138 spi_nor_otp_erase_secr(struct spi_nor * nor,loff_t addr) spi_nor_otp_erase_secr() argument
176 spi_nor_otp_lock_sr2(struct spi_nor * nor,unsigned int region) spi_nor_otp_lock_sr2() argument
208 spi_nor_otp_is_locked_sr2(struct spi_nor * nor,unsigned int region) spi_nor_otp_is_locked_sr2() argument
224 spi_nor_otp_region_start(const struct spi_nor * nor,unsigned int region) spi_nor_otp_region_start() argument
231 spi_nor_otp_size(struct spi_nor * nor) spi_nor_otp_size() argument
237 spi_nor_otp_region_to_offset(struct spi_nor * nor,unsigned int region) spi_nor_otp_region_to_offset() argument
242 spi_nor_otp_offset_to_region(struct spi_nor * nor,loff_t ofs) spi_nor_otp_offset_to_region() argument
250 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_mtd_otp_info() local
285 spi_nor_mtd_otp_range_is_locked(struct spi_nor * nor,loff_t ofs,size_t len) spi_nor_mtd_otp_range_is_locked() argument
312 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_mtd_otp_read_write() local
398 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_mtd_otp_erase() local
451 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_mtd_otp_lock() local
484 spi_nor_set_mtd_otp_ops(struct spi_nor * nor) spi_nor_set_mtd_otp_ops() argument
[all...]
H A Dspansion.c10 #include <linux/mtd/spi-nor.h>
49 /* Cypress SPI NOR flash operations. */
86 * @nor: pointer to 'struct spi_nor'.
88 static void spansion_nor_clear_sr(struct spi_nor *nor) in spansion_nor_clear_sr() argument
90 const struct spansion_nor_params *priv_params = nor->params->priv; in spansion_nor_clear_sr()
93 if (nor->spimem) { in spansion_nor_clear_sr()
96 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in spansion_nor_clear_sr()
98 ret = spi_mem_exec_op(nor->spimem, &op); in spansion_nor_clear_sr()
100 ret = spi_nor_controller_ops_write_reg(nor, SPINOR_OP_CLS in spansion_nor_clear_sr()
108 cypress_nor_sr_ready_and_clear_reg(struct spi_nor * nor,u64 addr) cypress_nor_sr_ready_and_clear_reg() argument
151 cypress_nor_sr_ready_and_clear(struct spi_nor * nor) cypress_nor_sr_ready_and_clear() argument
170 cypress_nor_set_memlat(struct spi_nor * nor,u64 addr) cypress_nor_set_memlat() argument
200 cypress_nor_set_octal_dtr_bits(struct spi_nor * nor,u64 addr) cypress_nor_set_octal_dtr_bits() argument
214 cypress_nor_octal_dtr_en(struct spi_nor * nor) cypress_nor_octal_dtr_en() argument
247 cypress_nor_set_single_spi_bits(struct spi_nor * nor,u64 addr) cypress_nor_set_single_spi_bits() argument
264 cypress_nor_octal_dtr_dis(struct spi_nor * nor) cypress_nor_octal_dtr_dis() argument
291 cypress_nor_quad_enable_volatile_reg(struct spi_nor * nor,u64 addr) cypress_nor_quad_enable_volatile_reg() argument
350 cypress_nor_quad_enable_volatile(struct spi_nor * nor) cypress_nor_quad_enable_volatile() argument
367 cypress_nor_set_4byte_addr_mode(struct spi_nor * nor,bool enable) cypress_nor_set_4byte_addr_mode() argument
394 cypress_nor_determine_addr_mode_by_sr1(struct spi_nor * nor,u8 * addr_mode) cypress_nor_determine_addr_mode_by_sr1() argument
443 cypress_nor_set_addr_mode_nbytes(struct spi_nor * nor) cypress_nor_set_addr_mode_nbytes() argument
502 cypress_nor_get_page_size(struct spi_nor * nor) cypress_nor_get_page_size() argument
532 cypress_nor_ecc_init(struct spi_nor * nor) cypress_nor_ecc_init() argument
544 s25fs256t_post_bfpt_fixup(struct spi_nor * nor,const struct sfdp_parameter_header * bfpt_header,const struct sfdp_bfpt * bfpt) s25fs256t_post_bfpt_fixup() argument
574 s25fs256t_post_sfdp_fixup(struct spi_nor * nor) s25fs256t_post_sfdp_fixup() argument
599 s25fs256t_late_init(struct spi_nor * nor) s25fs256t_late_init() argument
613 s25hx_t_post_bfpt_fixup(struct spi_nor * nor,const struct sfdp_parameter_header * bfpt_header,const struct sfdp_bfpt * bfpt) s25hx_t_post_bfpt_fixup() argument
632 s25hx_t_post_sfdp_fixup(struct spi_nor * nor) s25hx_t_post_sfdp_fixup() argument
668 s25hx_t_late_init(struct spi_nor * nor) s25hx_t_late_init() argument
697 cypress_nor_set_octal_dtr(struct spi_nor * nor,bool enable) cypress_nor_set_octal_dtr() argument
703 s28hx_t_post_sfdp_fixup(struct spi_nor * nor) s28hx_t_post_sfdp_fixup() argument
745 s28hx_t_post_bfpt_fixup(struct spi_nor * nor,const struct sfdp_parameter_header * bfpt_header,const struct sfdp_bfpt * bfpt) s28hx_t_post_bfpt_fixup() argument
755 s28hx_t_late_init(struct spi_nor * nor) s28hx_t_late_init() argument
773 s25fs_s_nor_post_bfpt_fixups(struct spi_nor * nor,const struct sfdp_parameter_header * bfpt_header,const struct sfdp_bfpt * bfpt) s25fs_s_nor_post_bfpt_fixups() argument
1060 spansion_nor_sr_ready_and_clear(struct spi_nor * nor) spansion_nor_sr_ready_and_clear() argument
1092 spansion_nor_late_init(struct spi_nor * nor) spansion_nor_late_init() argument
[all...]
H A Dswp.c3 * SPI NOR Software Write Protection logic.
10 #include <linux/mtd/spi-nor.h>
14 static u8 spi_nor_get_sr_bp_mask(struct spi_nor *nor) in spi_nor_get_sr_bp_mask() argument
18 if (nor->flags & SNOR_F_HAS_SR_BP3_BIT6) in spi_nor_get_sr_bp_mask()
21 if (nor->flags & SNOR_F_HAS_4BIT_BP) in spi_nor_get_sr_bp_mask()
27 static u8 spi_nor_get_sr_tb_mask(struct spi_nor *nor) in spi_nor_get_sr_tb_mask() argument
29 if (nor->flags & SNOR_F_HAS_SR_TB_BIT6) in spi_nor_get_sr_tb_mask()
35 static u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor) in spi_nor_get_min_prot_length_sr() argument
42 unsigned int sector_size = nor->info->sector_size ?: SPI_NOR_DEFAULT_SECTOR_SIZE; in spi_nor_get_min_prot_length_sr()
43 u64 n_sectors = div_u64(nor in spi_nor_get_min_prot_length_sr()
56 spi_nor_get_locked_range_sr(struct spi_nor * nor,u8 sr,loff_t * ofs,u64 * len) spi_nor_get_locked_range_sr() argument
92 spi_nor_check_lock_status_sr(struct spi_nor * nor,loff_t ofs,u64 len,u8 sr,bool locked) spi_nor_check_lock_status_sr() argument
114 spi_nor_is_locked_sr(struct spi_nor * nor,loff_t ofs,u64 len,u8 sr) spi_nor_is_locked_sr() argument
119 spi_nor_is_unlocked_sr(struct spi_nor * nor,loff_t ofs,u64 len,u8 sr) spi_nor_is_unlocked_sr() argument
158 spi_nor_sr_lock(struct spi_nor * nor,loff_t ofs,u64 len) spi_nor_sr_lock() argument
247 spi_nor_sr_unlock(struct spi_nor * nor,loff_t ofs,u64 len) spi_nor_sr_unlock() argument
331 spi_nor_sr_is_locked(struct spi_nor * nor,loff_t ofs,u64 len) spi_nor_sr_is_locked() argument
348 spi_nor_init_default_locking_ops(struct spi_nor * nor) spi_nor_init_default_locking_ops() argument
355 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_lock() local
370 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_unlock() local
385 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_is_locked() local
410 spi_nor_try_unlock_all(struct spi_nor * nor) spi_nor_try_unlock_all() argument
424 spi_nor_set_mtd_locking_ops(struct spi_nor * nor) spi_nor_set_mtd_locking_ops() argument
[all...]
H A Dcore.h21 /* 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_
691 spi_nor_needs_sfdp(const struct spi_nor * nor) spi_nor_needs_sfdp() argument
706 spi_nor_debugfs_register(struct spi_nor * nor) spi_nor_debugfs_register() argument
[all...]
H A Dmicron-st.c7 #include <linux/mtd/spi-nor.h>
32 /* Micron ST SPI NOR flash operations. */
51 static int micron_st_nor_octal_dtr_en(struct spi_nor *nor) in micron_st_nor_octal_dtr_en() argument
54 u8 *buf = nor->bouncebuf; in micron_st_nor_octal_dtr_en()
56 u8 addr_mode_nbytes = nor->params->addr_mode_nbytes; in micron_st_nor_octal_dtr_en()
63 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en()
71 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en()
76 ret = spi_nor_read_id(nor, in micron_st_nor_octal_dtr_en()
88 micron_st_nor_octal_dtr_dis(struct spi_nor * nor) micron_st_nor_octal_dtr_dis() argument
124 micron_st_nor_set_octal_dtr(struct spi_nor * nor,bool enable) micron_st_nor_set_octal_dtr() argument
130 mt35xu512aba_default_init(struct spi_nor * nor) mt35xu512aba_default_init() argument
135 mt35xu512aba_post_sfdp_fixup(struct spi_nor * nor) mt35xu512aba_post_sfdp_fixup() argument
184 mt25qu512a_post_bfpt_fixup(struct spi_nor * nor,const struct sfdp_parameter_header * bfpt_header,const struct sfdp_bfpt * bfpt) mt25qu512a_post_bfpt_fixup() argument
196 st_nor_four_die_late_init(struct spi_nor * nor) st_nor_four_die_late_init() argument
212 st_nor_two_die_late_init(struct spi_nor * nor) st_nor_two_die_late_init() argument
511 micron_st_nor_read_fsr(struct spi_nor * nor,u8 * fsr) micron_st_nor_read_fsr() argument
546 micron_st_nor_clear_fsr(struct spi_nor * nor) micron_st_nor_clear_fsr() argument
573 micron_st_nor_ready(struct spi_nor * nor) micron_st_nor_ready() argument
621 micron_st_nor_default_init(struct spi_nor * nor) micron_st_nor_default_init() argument
628 micron_st_nor_late_init(struct spi_nor * nor) micron_st_nor_late_init() argument
[all...]
H A Dsst.c7 #include <linux/mtd/spi-nor.h>
16 static int sst26vf_nor_lock(struct spi_nor *nor, loff_t ofs, u64 len) in sst26vf_nor_lock() argument
21 static int sst26vf_nor_unlock(struct spi_nor *nor, loff_t ofs, u64 len) in sst26vf_nor_unlock() argument
26 if (ofs != 0 || len != nor->params->size) in sst26vf_nor_unlock()
29 ret = spi_nor_read_cr(nor, nor->bouncebuf); in sst26vf_nor_unlock()
33 if (!(nor->bouncebuf[0] & SST26VF_CR_BPNV)) { in sst26vf_nor_unlock()
34 dev_dbg(nor->dev, "Any block has been permanently locked\n"); in sst26vf_nor_unlock()
38 return spi_nor_global_block_unlock(nor); in sst26vf_nor_unlock()
41 static int sst26vf_nor_is_locked(struct spi_nor *nor, loff_ argument
52 sst26vf_nor_late_init(struct spi_nor * nor) sst26vf_nor_late_init() argument
170 sst_nor_write_data(struct spi_nor * nor,loff_t to,size_t len,const u_char * buf) sst_nor_write_data() argument
188 struct spi_nor *nor = mtd_to_spi_nor(mtd); sst_nor_write() local
255 sst_nor_late_init(struct spi_nor * nor) sst_nor_late_init() argument
[all...]
H A Datmel.c7 #include <linux/mtd/spi-nor.h>
19 static int at25fs_nor_lock(struct spi_nor *nor, loff_t ofs, u64 len) in at25fs_nor_lock() argument
24 static int at25fs_nor_unlock(struct spi_nor *nor, loff_t ofs, u64 len) in at25fs_nor_unlock() argument
29 if (ofs || len != nor->params->size) in at25fs_nor_unlock()
33 ret = spi_nor_write_sr_and_check(nor, 0); in at25fs_nor_unlock()
35 dev_dbg(nor->dev, "unable to clear BP bits, WP# asserted?\n"); in at25fs_nor_unlock()
40 static int at25fs_nor_is_locked(struct spi_nor *nor, loff_t ofs, u64 len) in at25fs_nor_is_locked() argument
51 static int at25fs_nor_late_init(struct spi_nor *nor) in at25fs_nor_late_init() argument
53 nor->params->locking_ops = &at25fs_nor_locking_ops; in at25fs_nor_late_init()
64 * @nor
71 atmel_nor_set_global_protection(struct spi_nor * nor,loff_t ofs,u64 len,bool is_protect) atmel_nor_set_global_protection() argument
121 atmel_nor_global_protect(struct spi_nor * nor,loff_t ofs,u64 len) atmel_nor_global_protect() argument
126 atmel_nor_global_unprotect(struct spi_nor * nor,loff_t ofs,u64 len) atmel_nor_global_unprotect() argument
131 atmel_nor_is_global_protected(struct spi_nor * nor,loff_t ofs,u64 len) atmel_nor_is_global_protected() argument
152 atmel_nor_global_protection_late_init(struct spi_nor * nor) atmel_nor_global_protection_late_init() argument
[all...]
H A Dsysfs.c3 #include <linux/mtd/spi-nor.h>
15 struct spi_nor *nor = spi_mem_get_drvdata(spimem); in manufacturer_show() local
17 return sysfs_emit(buf, "%s\n", nor->manufacturer->name); in manufacturer_show()
26 struct spi_nor *nor = spi_mem_get_drvdata(spimem); in partname_show() local
28 return sysfs_emit(buf, "%s\n", nor->info->name); in partname_show()
37 struct spi_nor *nor = spi_mem_get_drvdata(spimem); in jedec_id_show() local
38 const u8 *id = nor->info->id ? nor->info->id->bytes : nor->id; in jedec_id_show()
39 u8 id_len = nor in jedec_id_show()
58 struct spi_nor *nor = spi_mem_get_drvdata(spimem); sfdp_read() local
77 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_sysfs_is_visible() local
94 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_sysfs_is_bin_visible() local
[all...]
H A Dwinbond.c7 #include <linux/mtd/spi-nor.h>
28 w25q128_post_bfpt_fixups(struct spi_nor *nor, in w25q128_post_bfpt_fixups() argument
39 nor->params->size == SZ_2M && in w25q128_post_bfpt_fixups()
40 nor->params->erase_map.regions[0].size == SZ_2M) { in w25q128_post_bfpt_fixups()
41 nor->params->size = SZ_16M; in w25q128_post_bfpt_fixups()
42 nor->params->erase_map.regions[0].size = SZ_16M; in w25q128_post_bfpt_fixups()
53 w25q256_post_bfpt_fixups(struct spi_nor *nor, in w25q256_post_bfpt_fixups() argument
67 nor->flags |= SNOR_F_4B_OPCODES; in w25q256_post_bfpt_fixups()
78 * @nor: pointer to 'struct spi_nor'.
89 static int winbond_nor_select_die(struct spi_nor *nor, u argument
113 winbond_nor_multi_die_ready(struct spi_nor * nor) winbond_nor_multi_die_ready() argument
131 winbond_nor_multi_die_post_sfdp_fixups(struct spi_nor * nor) winbond_nor_multi_die_post_sfdp_fixups() argument
356 winbond_nor_write_ear(struct spi_nor * nor,u8 ear) winbond_nor_write_ear() argument
389 winbond_nor_set_4byte_addr_mode(struct spi_nor * nor,bool enable) winbond_nor_set_4byte_addr_mode() argument
421 winbond_nor_late_init(struct spi_nor * nor) winbond_nor_late_init() argument
[all...]
H A Dsfdp.c8 #include <linux/mtd/spi-nor.h>
144 * @nor: pointer to a 'struct spi_nor'
151 static int spi_nor_read_raw(struct spi_nor *nor, u32 addr, size_t len, u8 *buf) in spi_nor_read_raw() argument
156 ret = spi_nor_read_data(nor, addr, len, buf); in spi_nor_read_raw()
171 * @nor: pointer to a 'struct spi_nor'
182 static int spi_nor_read_sfdp(struct spi_nor *nor, u32 addr, in spi_nor_read_sfdp() argument
188 read_opcode = nor->read_opcode; in spi_nor_read_sfdp()
189 addr_nbytes = nor->addr_nbytes; in spi_nor_read_sfdp()
190 read_dummy = nor->read_dummy; in spi_nor_read_sfdp()
192 nor in spi_nor_read_sfdp()
218 spi_nor_read_sfdp_dma_unsafe(struct spi_nor * nor,u32 addr,size_t len,void * buf) spi_nor_read_sfdp_dma_unsafe() argument
432 spi_nor_parse_bfpt(struct spi_nor * nor,const struct sfdp_parameter_header * bfpt_header) spi_nor_parse_bfpt() argument
687 spi_nor_smpt_addr_nbytes(const struct spi_nor * nor,const u32 settings) spi_nor_smpt_addr_nbytes() argument
710 spi_nor_smpt_read_dummy(const struct spi_nor * nor,const u32 settings) spi_nor_smpt_read_dummy() argument
727 spi_nor_get_map_in_use(struct spi_nor * nor,const u32 * smpt,u8 smpt_len) spi_nor_get_map_in_use() argument
837 spi_nor_init_non_uniform_erase_map(struct spi_nor * nor,const u32 * smpt) spi_nor_init_non_uniform_erase_map() argument
926 spi_nor_parse_smpt(struct spi_nor * nor,const struct sfdp_parameter_header * smpt_header) spi_nor_parse_smpt() argument
974 spi_nor_parse_4bait(struct spi_nor * nor,const struct sfdp_parameter_header * param_header) spi_nor_parse_4bait() argument
1161 spi_nor_parse_profile1(struct spi_nor * nor,const struct sfdp_parameter_header * profile1_header) spi_nor_parse_profile1() argument
1249 spi_nor_parse_sccr(struct spi_nor * nor,const struct sfdp_parameter_header * sccr_header) spi_nor_parse_sccr() argument
1300 spi_nor_parse_sccr_mc(struct spi_nor * nor,const struct sfdp_parameter_header * sccr_mc_header) spi_nor_parse_sccr_mc() argument
1356 spi_nor_post_sfdp_fixups(struct spi_nor * nor) spi_nor_post_sfdp_fixups() argument
1382 spi_nor_check_sfdp_signature(struct spi_nor * nor) spi_nor_check_sfdp_signature() argument
1412 spi_nor_parse_sfdp(struct spi_nor * nor) spi_nor_parse_sfdp() argument
[all...]
H A Ddebugfs.c4 #include <linux/mtd/spi-nor.h>
10 #define SPI_NOR_DEBUGFS_ROOT "spi-nor"
78 struct spi_nor *nor = s->private; in spi_nor_params_show() local
79 struct spi_nor_flash_parameter *params = nor->params; in spi_nor_params_show()
82 const struct flash_info *info = nor->info; in spi_nor_params_show()
87 seq_printf(s, "id\t\t%*ph\n", SPI_NOR_MAX_ID_LEN, nor->id); in spi_nor_params_show()
92 seq_printf(s, "address nbytes\t%u\n", nor->addr_nbytes); in spi_nor_params_show()
95 spi_nor_print_flags(s, nor->flags, snor_f_names, sizeof(snor_f_names)); in spi_nor_params_show()
99 seq_printf(s, " read\t\t0x%02x\n", nor->read_opcode); in spi_nor_params_show()
100 seq_printf(s, " dummy cycles\t%u\n", nor in spi_nor_params_show()
184 struct spi_nor *nor = s->private; spi_nor_capabilities_show() local
224 struct spi_nor *nor = data; spi_nor_debugfs_unregister() local
232 spi_nor_debugfs_register(struct spi_nor * nor) spi_nor_debugfs_register() argument
[all...]
H A Dissi.c7 #include <linux/mtd/spi-nor.h>
12 is25lp256_post_bfpt_fixups(struct spi_nor *nor, in is25lp256_post_bfpt_fixups() argument
23 nor->params->addr_nbytes = 4; in is25lp256_post_bfpt_fixups()
32 static int pm25lv_nor_late_init(struct spi_nor *nor) in pm25lv_nor_late_init() argument
34 struct spi_nor_erase_map *map = &nor->params->erase_map; in pm25lv_nor_late_init()
132 static void issi_nor_default_init(struct spi_nor *nor) in issi_nor_default_init() argument
134 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; in issi_nor_default_init()
/linux/Documentation/devicetree/bindings/spi/
H A Dmediatek,spi-mtk-nor.yaml4 $id: http://devicetree.org/schemas/spi/mediatek,spi-mtk-nor.yaml#
7 title: Serial NOR flash controller for MediaTek ARM SoCs
15 SPI NOR flash. There should be only one spi slave device following
17 for devices other than SPI NOR flash due to limited transfer
27 - mediatek,mt8173-nor
28 - mediatek,mt8186-nor
29 - mediatek,mt8192-nor
32 - mediatek,mt2701-nor
33 - mediatek,mt2712-nor
34 - mediatek,mt7622-nor
[all...]
H A Dspi-sg2044-nor.yaml4 $id: http://devicetree.org/schemas/spi/spi-sg2044-nor.yaml#
7 title: SG2044 SPI NOR controller
18 - sophgo,sg2042-spifmc-nor
19 - sophgo,sg2044-spifmc-nor
47 compatible = "sophgo,sg2044-spifmc-nor";
H A Dcdns,qspi-nor.yaml4 $id: http://devicetree.org/schemas/spi/cdns,qspi-nor.yaml#
79 # The compatible is qspi-nor for historical reasons but such
81 # ie. also NAND flashes, not only NOR flashes.
82 - const: cdns,qspi-nor
83 - const: cdns,qspi-nor
152 $ref: cdns,qspi-nor-peripheral-props.yaml
176 compatible = "intel,socfpga-qspi", "cdns,qspi-nor";
190 compatible = "jedec,spi-nor";
/linux/drivers/mtd/spi-nor/controllers/
H A Dnxp-spifi.c3 * SPI NOR driver for NXP SPI Flash Interface (SPIFI)
18 #include <linux/mtd/spi-nor.h>
58 struct spi_nor nor; member
125 static int nxp_spifi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in nxp_spifi_read_reg() argument
128 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read_reg()
148 static int nxp_spifi_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, in nxp_spifi_write_reg() argument
151 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_write_reg()
172 static ssize_t nxp_spifi_read(struct spi_nor *nor, loff_t from, size_t len, in nxp_spifi_read() argument
175 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read()
187 static ssize_t nxp_spifi_write(struct spi_nor *nor, loff_ argument
218 nxp_spifi_erase(struct spi_nor * nor,loff_t offs) nxp_spifi_erase() argument
264 nxp_spifi_dummy_id_read(struct spi_nor * nor) nxp_spifi_dummy_id_read() argument
[all...]
/linux/Documentation/devicetree/bindings/mtd/
H A Dhisilicon,fmc-spi-nor.txt1 HiSilicon SPI-NOR Flash Controller
4 - compatible : Should be "hisilicon,fmc-spi-nor" and one of the following strings:
5 "hisilicon,hi3519-spi-nor"
10 - clocks : handle to spi-nor flash controller clock.
13 spi-nor-controller@10000000 {
14 compatible = "hisilicon,hi3519-spi-nor", "hisilicon,fmc-spi-nor";
21 compatible = "jedec,spi-nor";
H A Djedec,spi-nor.yaml4 $id: http://devicetree.org/schemas/mtd/jedec,spi-nor.yaml#
7 title: SPI NOR flash ST M25Pxx (and similar) serial flash chips
33 - const: jedec,spi-nor
43 - const: jedec,spi-nor
44 - const: jedec,spi-nor
46 SPI NOR flashes compatible with the JEDEC SFDP standard or which may be
49 "jedec,spi-nor" compatible.
101 Supply for the SPI NOR power.
120 compatible = "spansion,m25p80", "jedec,spi-nor";
/linux/Documentation/ABI/testing/
H A Dsysfs-bus-spi-devices-spi-nor1 What: /sys/bus/spi/devices/.../spi-nor/jedec_id
5 Description: (RO) The JEDEC ID of the SPI NOR flash as reported by the
12 What: /sys/bus/spi/devices/.../spi-nor/manufacturer
16 Description: (RO) Manufacturer of the SPI NOR flash.
22 What: /sys/bus/spi/devices/.../spi-nor/partname
26 Description: (RO) Part name of the SPI NOR flash.
32 What: /sys/bus/spi/devices/.../spi-nor/sfdp
36 Description: (RO) This attribute is only present if the SPI NOR flash
/linux/include/linux/mtd/
H A Dspi-nor.h291 * struct spi_nor_controller_ops - SPI NOR controller driver specific
299 * @read: read data from the SPI NOR.
300 * @write: write data to the SPI NOR.
301 * @erase: erase a sector of the SPI NOR at the offset @offs; if
302 * not provided by the driver, SPI NOR will send the erase
306 int (*prepare)(struct spi_nor *nor);
307 void (*unprepare)(struct spi_nor *nor);
308 int (*read_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, size_t len);
309 int (*write_reg)(struct spi_nor *nor, u8 opcode, const u8 *buf,
312 ssize_t (*read)(struct spi_nor *nor, loff_
425 spi_nor_set_flash_node(struct spi_nor * nor,struct device_node * np) spi_nor_set_flash_node() argument
431 spi_nor_get_flash_node(struct spi_nor * nor) spi_nor_get_flash_node() argument
[all...]
/linux/arch/powerpc/boot/dts/fsl/
H A Dmpc8536ds.dtsi13 * * Neither the name of Freescale Semiconductor nor the
36 nor@0,0 {
46 label = "ramdisk-nor";
51 label = "diagnostic-nor";
57 label = "dink-nor";
63 label = "kernel-nor";
68 label = "fs-nor";
73 label = "dtb-nor";
78 label = "u-boot-nor";
145 compatible = "spansion,s25sl12801", "jedec,spi-nor";
[all...]
H A Dp1022ds.dtsi13 * * Neither the name of Freescale Semiconductor nor the
36 nor@0,0 {
46 label = "ramdisk-nor";
52 label = "diagnostic-nor";
58 label = "dink-nor";
64 label = "kernel-nor";
70 label = "jffs2-nor";
75 label = "dtb-nor";
81 label = "u-boot-nor";
163 compatible = "spansion,s25sl12801", "jedec,spi-nor";
[all...]
H A Dp1020mbg-pc.dtsi13 * * Neither the name of Freescale Semiconductor nor the
36 nor@0,0 {
47 label = "NOR DTB Image";
53 label = "NOR Linux Kernel Image";
59 label = "NOR Root File System";
66 label = "NOR Vitesse-7385 Firmware";
75 label = "NOR U-Boot Image";
/linux/Documentation/driver-api/mtd/
H A Dspi-nor.rst2 SPI NOR framework
8 Most SPI NOR flashes comply with the JEDEC JESD216
13 The SPI NOR driver queries the SFDP tables in order to determine the
17 on its SFDP data. All one has to do is to specify the "jedec,spi-nor"
41 root@1:~# cat /sys/bus/spi/devices/spi0.0/spi-nor/partname
43 root@1:~# cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id
45 root@1:~# cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer
47 root@1:~# xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
69 root@1:~# sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
70 428f34d0461876f189ac97f93e68a05fa6428c6650b3b7baf736a921e5898ed1 /sys/bus/spi/devices/spi0.0/spi-nor/sfd
[all...]

12345678910>>...87