Home
last modified time | relevance | path

Searched refs:nor (Results 1 - 25 of 119) sorted by relevance

12345

/kernel/linux/linux-6.6/drivers/mtd/spi-nor/
H A Dcore.c17 #include <linux/mtd/spi-nor.h>
49 * @nor: pointer to a 'struct spi_nor'
57 static u8 spi_nor_get_cmd_ext(const struct spi_nor *nor, in spi_nor_get_cmd_ext() argument
60 switch (nor->cmd_ext_type) { in spi_nor_get_cmd_ext()
68 dev_err(nor->dev, "Unknown command extension type\n"); in spi_nor_get_cmd_ext()
75 * @nor: pointer to a 'struct spi_nor'
80 void spi_nor_spimem_setup_op(const struct spi_nor *nor, in spi_nor_spimem_setup_op() argument
112 ext = spi_nor_get_cmd_ext(nor, op); in spi_nor_spimem_setup_op()
121 * @nor: pointer to 'struct spi_nor'
128 static bool spi_nor_spimem_bounce(struct spi_nor *nor, struc argument
149 spi_nor_spimem_exec_op(struct spi_nor *nor, struct spi_mem_op *op) spi_nor_spimem_exec_op() argument
160 spi_nor_controller_ops_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, size_t len) spi_nor_controller_ops_read_reg() argument
169 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
178 spi_nor_controller_ops_erase(struct spi_nor *nor, loff_t offs) spi_nor_controller_ops_erase() argument
196 spi_nor_spimem_read_data(struct spi_nor *nor, loff_t from, size_t len, u8 *buf) spi_nor_spimem_read_data() argument
242 spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len, u8 *buf) spi_nor_read_data() argument
260 spi_nor_spimem_write_data(struct spi_nor *nor, loff_t to, size_t len, const u8 *buf) spi_nor_spimem_write_data() argument
301 spi_nor_write_data(struct spi_nor *nor, loff_t to, size_t len, const u8 *buf) spi_nor_write_data() argument
319 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
341 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
362 spi_nor_write_enable(struct spi_nor *nor) spi_nor_write_enable() argument
389 spi_nor_write_disable(struct spi_nor *nor) spi_nor_write_disable() argument
423 spi_nor_read_id(struct spi_nor *nor, u8 naddr, u8 ndummy, u8 *id, enum spi_nor_protocol proto) spi_nor_read_id() argument
449 spi_nor_read_sr(struct spi_nor *nor, u8 *sr) spi_nor_read_sr() argument
489 spi_nor_read_cr(struct spi_nor *nor, u8 *cr) spi_nor_read_cr() argument
520 spi_nor_set_4byte_addr_mode_en4b_ex4b(struct spi_nor *nor, bool enable) spi_nor_set_4byte_addr_mode_en4b_ex4b() argument
553 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
582 spi_nor_set_4byte_addr_mode_brwr(struct spi_nor *nor, bool enable) spi_nor_set_4byte_addr_mode_brwr() argument
612 spi_nor_sr_ready(struct spi_nor *nor) spi_nor_sr_ready() argument
629 spi_nor_use_parallel_locking(struct spi_nor *nor) spi_nor_use_parallel_locking() argument
635 spi_nor_rww_start_rdst(struct spi_nor *nor) spi_nor_rww_start_rdst() argument
654 spi_nor_rww_end_rdst(struct spi_nor *nor) spi_nor_rww_end_rdst() argument
666 spi_nor_lock_rdst(struct spi_nor *nor) spi_nor_lock_rdst() argument
674 spi_nor_unlock_rdst(struct spi_nor *nor) spi_nor_unlock_rdst() argument
688 spi_nor_ready(struct spi_nor *nor) spi_nor_ready() argument
715 spi_nor_wait_till_ready_with_timeout(struct spi_nor *nor, unsigned long timeout_jiffies) spi_nor_wait_till_ready_with_timeout() argument
748 spi_nor_wait_till_ready(struct spi_nor *nor) spi_nor_wait_till_ready() argument
760 spi_nor_global_block_unlock(struct spi_nor *nor) spi_nor_global_block_unlock() argument
795 spi_nor_write_sr(struct spi_nor *nor, const u8 *sr, size_t len) spi_nor_write_sr() argument
830 spi_nor_write_sr1_and_check(struct spi_nor *nor, u8 sr1) spi_nor_write_sr1_and_check() argument
862 spi_nor_write_16bit_sr_and_check(struct spi_nor *nor, u8 sr1) spi_nor_write_16bit_sr_and_check() argument
937 spi_nor_write_16bit_cr_and_check(struct spi_nor *nor, u8 cr) spi_nor_write_16bit_cr_and_check() argument
989 spi_nor_write_sr_and_check(struct spi_nor *nor, u8 sr1) spi_nor_write_sr_and_check() argument
1005 spi_nor_write_sr2(struct spi_nor *nor, const u8 *sr2) spi_nor_write_sr2() argument
1041 spi_nor_read_sr2(struct spi_nor *nor, u8 *sr2) spi_nor_read_sr2() argument
1068 spi_nor_erase_chip(struct spi_nor *nor) spi_nor_erase_chip() argument
1151 spi_nor_has_uniform_erase(const struct spi_nor *nor) spi_nor_has_uniform_erase() argument
1156 spi_nor_set_4byte_opcodes(struct spi_nor *nor) spi_nor_set_4byte_opcodes() argument
1175 spi_nor_prep(struct spi_nor *nor) spi_nor_prep() argument
1185 spi_nor_unprep(struct spi_nor *nor) spi_nor_unprep() argument
1200 spi_nor_rww_start_io(struct spi_nor *nor) spi_nor_rww_start_io() argument
1218 spi_nor_rww_end_io(struct spi_nor *nor) spi_nor_rww_end_io() argument
1225 spi_nor_lock_device(struct spi_nor *nor) spi_nor_lock_device() argument
1233 spi_nor_unlock_device(struct spi_nor *nor) spi_nor_unlock_device() argument
1242 spi_nor_rww_start_exclusive(struct spi_nor *nor) spi_nor_rww_start_exclusive() argument
1262 spi_nor_rww_end_exclusive(struct spi_nor *nor) spi_nor_rww_end_exclusive() argument
1273 spi_nor_prep_and_lock(struct spi_nor *nor) spi_nor_prep_and_lock() argument
1290 spi_nor_unlock_and_unprep(struct spi_nor *nor) spi_nor_unlock_and_unprep() argument
1303 spi_nor_rww_start_pe(struct spi_nor *nor, loff_t start, size_t len) spi_nor_rww_start_pe() argument
1333 spi_nor_rww_end_pe(struct spi_nor *nor, loff_t start, size_t len) spi_nor_rww_end_pe() argument
1350 spi_nor_prep_and_lock_pe(struct spi_nor *nor, loff_t start, size_t len) spi_nor_prep_and_lock_pe() argument
1367 spi_nor_unlock_and_unprep_pe(struct spi_nor *nor, loff_t start, size_t len) spi_nor_unlock_and_unprep_pe() argument
1380 spi_nor_rww_start_rd(struct spi_nor *nor, loff_t start, size_t len) spi_nor_rww_start_rd() argument
1411 spi_nor_rww_end_rd(struct spi_nor *nor, loff_t start, size_t len) spi_nor_rww_end_rd() argument
1429 spi_nor_prep_and_lock_rd(struct spi_nor *nor, loff_t start, size_t len) spi_nor_prep_and_lock_rd() argument
1446 spi_nor_unlock_and_unprep_rd(struct spi_nor *nor, loff_t start, size_t len) spi_nor_unlock_and_unprep_rd() argument
1458 spi_nor_convert_addr(struct spi_nor *nor, loff_t addr) spi_nor_convert_addr() argument
1469 spi_nor_erase_sector(struct spi_nor *nor, u32 addr) spi_nor_erase_sector() argument
1679 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
1746 spi_nor_erase_multi_sectors(struct spi_nor *nor, u64 addr, u32 len) spi_nor_erase_multi_sectors() argument
1801 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_erase() local
1909 spi_nor_sr1_bit6_quad_enable(struct spi_nor *nor) spi_nor_sr1_bit6_quad_enable() argument
1934 spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor) spi_nor_sr2_bit1_quad_enable() argument
1965 spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor) spi_nor_sr2_bit7_quad_enable() argument
2031 spi_nor_match_id(struct spi_nor *nor, const u8 *id) spi_nor_match_id() argument
2051 spi_nor_detect(struct spi_nor *nor) spi_nor_detect() argument
2088 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_read() local
2135 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_write() local
2196 spi_nor_check(struct spi_nor *nor) spi_nor_check() argument
2298 spi_nor_spimem_check_op(struct spi_nor *nor, struct spi_mem_op *op) spi_nor_spimem_check_op() argument
2329 spi_nor_spimem_check_readop(struct spi_nor *nor, const struct spi_nor_read_command *read) spi_nor_spimem_check_readop() argument
2353 spi_nor_spimem_check_pp(struct spi_nor *nor, const struct spi_nor_pp_command *pp) spi_nor_spimem_check_pp() argument
2371 spi_nor_spimem_adjust_hwcaps(struct spi_nor *nor, u32 *hwcaps) spi_nor_spimem_adjust_hwcaps() argument
2450 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
2470 spi_nor_select_read(struct spi_nor *nor, u32 shared_hwcaps) spi_nor_select_read() argument
2501 spi_nor_select_pp(struct spi_nor *nor, u32 shared_hwcaps) spi_nor_select_pp() argument
2581 spi_nor_select_erase(struct spi_nor *nor) spi_nor_select_erase() argument
2629 spi_nor_default_setup(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps) spi_nor_default_setup() argument
2690 spi_nor_set_addr_nbytes(struct spi_nor *nor) spi_nor_set_addr_nbytes() argument
2733 spi_nor_setup(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps) spi_nor_setup() argument
2753 spi_nor_manufacturer_init_params(struct spi_nor *nor) spi_nor_manufacturer_init_params() argument
2772 spi_nor_no_sfdp_init_params(struct spi_nor *nor) spi_nor_no_sfdp_init_params() argument
2840 spi_nor_init_flags(struct spi_nor *nor) spi_nor_init_flags() argument
2885 spi_nor_init_fixup_flags(struct spi_nor *nor) spi_nor_init_fixup_flags() argument
2904 spi_nor_late_init_params(struct spi_nor *nor) spi_nor_late_init_params() argument
2950 spi_nor_sfdp_init_params_deprecated(struct spi_nor *nor) spi_nor_sfdp_init_params_deprecated() argument
2971 spi_nor_init_params_deprecated(struct spi_nor *nor) spi_nor_init_params_deprecated() argument
2990 spi_nor_init_default_params(struct spi_nor *nor) spi_nor_init_default_params() argument
3076 spi_nor_init_params(struct spi_nor *nor) spi_nor_init_params() argument
3107 spi_nor_set_octal_dtr(struct spi_nor *nor, bool enable) spi_nor_set_octal_dtr() argument
3139 spi_nor_quad_enable(struct spi_nor *nor) spi_nor_quad_enable() argument
3158 spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable) spi_nor_set_4byte_addr_mode() argument
3178 spi_nor_init(struct spi_nor *nor) spi_nor_init() argument
3244 spi_nor_soft_reset(struct spi_nor *nor) spi_nor_soft_reset() argument
3280 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_suspend() local
3294 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_resume() local
3307 struct spi_nor *nor = mtd_to_spi_nor(master); spi_nor_get_device() local
3324 struct spi_nor *nor = mtd_to_spi_nor(master); spi_nor_put_device() local
3335 spi_nor_restore(struct spi_nor *nor) spi_nor_restore() argument
3356 spi_nor_match_name(struct spi_nor *nor, const char *name) spi_nor_match_name() argument
3373 spi_nor_get_flash_info(struct spi_nor *nor, const char *name) spi_nor_get_flash_info() argument
3411 spi_nor_set_mtd_info(struct spi_nor *nor) spi_nor_set_mtd_info() argument
3444 spi_nor_hw_reset(struct spi_nor *nor) spi_nor_hw_reset() argument
3465 spi_nor_scan(struct spi_nor *nor, const char *name, const struct spi_nor_hwcaps *hwcaps) spi_nor_scan() argument
3559 spi_nor_create_read_dirmap(struct spi_nor *nor) spi_nor_create_read_dirmap() argument
3590 spi_nor_create_write_dirmap(struct spi_nor *nor) spi_nor_create_write_dirmap() argument
3623 struct spi_nor *nor; spi_nor_probe() local
3696 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_remove() local
3706 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_shutdown() local
[all...]
H A Dswp.c9 #include <linux/mtd/spi-nor.h>
13 static u8 spi_nor_get_sr_bp_mask(struct spi_nor *nor) in spi_nor_get_sr_bp_mask() argument
17 if (nor->flags & SNOR_F_HAS_SR_BP3_BIT6) in spi_nor_get_sr_bp_mask()
20 if (nor->flags & SNOR_F_HAS_4BIT_BP) in spi_nor_get_sr_bp_mask()
26 static u8 spi_nor_get_sr_tb_mask(struct spi_nor *nor) in spi_nor_get_sr_tb_mask() argument
28 if (nor->flags & SNOR_F_HAS_SR_TB_BIT6) in spi_nor_get_sr_tb_mask()
34 static u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor) in spi_nor_get_min_prot_length_sr() argument
37 u8 mask = spi_nor_get_sr_bp_mask(nor); in spi_nor_get_min_prot_length_sr()
41 bp_slots_needed = ilog2(nor->info->n_sectors); in spi_nor_get_min_prot_length_sr()
44 return nor in spi_nor_get_min_prot_length_sr()
50 spi_nor_get_locked_range_sr(struct spi_nor *nor, u8 sr, loff_t *ofs, uint64_t *len) spi_nor_get_locked_range_sr() argument
87 spi_nor_check_lock_status_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, u8 sr, bool locked) spi_nor_check_lock_status_sr() argument
109 spi_nor_is_locked_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, u8 sr) spi_nor_is_locked_sr() argument
115 spi_nor_is_unlocked_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, u8 sr) spi_nor_is_unlocked_sr() argument
154 spi_nor_sr_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) spi_nor_sr_lock() argument
244 spi_nor_sr_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) spi_nor_sr_unlock() argument
329 spi_nor_sr_is_locked(struct spi_nor *nor, loff_t ofs, uint64_t len) spi_nor_sr_is_locked() argument
346 spi_nor_init_default_locking_ops(struct spi_nor *nor) spi_nor_init_default_locking_ops() argument
353 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_lock() local
368 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_unlock() local
383 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_is_locked() local
408 spi_nor_try_unlock_all(struct spi_nor *nor) spi_nor_try_unlock_all() argument
422 spi_nor_set_mtd_locking_ops(struct spi_nor *nor) spi_nor_set_mtd_locking_ops() argument
[all...]
H A Dotp.c10 #include <linux/mtd/spi-nor.h>
14 #define spi_nor_otp_region_len(nor) ((nor)->params->otp.org->len)
15 #define spi_nor_otp_n_regions(nor) ((nor)->params->otp.org->n_regions)
19 * @nor: pointer to 'struct spi_nor'
36 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
43 read_opcode = nor->read_opcode; in spi_nor_otp_read_secr()
44 addr_nbytes = nor->addr_nbytes; in spi_nor_otp_read_secr()
45 read_dummy = nor in spi_nor_otp_read_secr()
83 spi_nor_otp_write_secr(struct spi_nor *nor, loff_t addr, size_t len, const u8 *buf) spi_nor_otp_write_secr() argument
137 spi_nor_otp_erase_secr(struct spi_nor *nor, loff_t addr) spi_nor_otp_erase_secr() argument
175 spi_nor_otp_lock_sr2(struct spi_nor *nor, unsigned int region) spi_nor_otp_lock_sr2() argument
207 spi_nor_otp_is_locked_sr2(struct spi_nor *nor, unsigned int region) spi_nor_otp_is_locked_sr2() argument
223 spi_nor_otp_region_start(const struct spi_nor *nor, unsigned int region) spi_nor_otp_region_start() argument
230 spi_nor_otp_size(struct spi_nor *nor) spi_nor_otp_size() argument
236 spi_nor_otp_region_to_offset(struct spi_nor *nor, unsigned int region) spi_nor_otp_region_to_offset() argument
241 spi_nor_otp_offset_to_region(struct spi_nor *nor, loff_t ofs) spi_nor_otp_offset_to_region() argument
249 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_mtd_otp_info() local
284 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
311 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_mtd_otp_read_write() local
397 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_mtd_otp_erase() local
450 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_mtd_otp_lock() local
483 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>
77 * @nor: pointer to 'struct spi_nor'.
79 static void spansion_nor_clear_sr(struct spi_nor *nor) in spansion_nor_clear_sr() argument
81 const struct spansion_nor_params *priv_params = nor->params->priv; in spansion_nor_clear_sr()
84 if (nor->spimem) { in spansion_nor_clear_sr()
87 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in spansion_nor_clear_sr()
89 ret = spi_mem_exec_op(nor->spimem, &op); in spansion_nor_clear_sr()
91 ret = spi_nor_controller_ops_write_reg(nor, SPINOR_OP_CLSR, in spansion_nor_clear_sr()
96 dev_dbg(nor in spansion_nor_clear_sr()
99 cypress_nor_sr_ready_and_clear_reg(struct spi_nor *nor, u64 addr) cypress_nor_sr_ready_and_clear_reg() argument
141 cypress_nor_sr_ready_and_clear(struct spi_nor *nor) cypress_nor_sr_ready_and_clear() argument
160 cypress_nor_set_memlat(struct spi_nor *nor, u64 addr) cypress_nor_set_memlat() argument
190 cypress_nor_set_octal_dtr_bits(struct spi_nor *nor, u64 addr) cypress_nor_set_octal_dtr_bits() argument
204 cypress_nor_octal_dtr_en(struct spi_nor *nor) cypress_nor_octal_dtr_en() argument
237 cypress_nor_set_single_spi_bits(struct spi_nor *nor, u64 addr) cypress_nor_set_single_spi_bits() argument
254 cypress_nor_octal_dtr_dis(struct spi_nor *nor) cypress_nor_octal_dtr_dis() argument
281 cypress_nor_quad_enable_volatile_reg(struct spi_nor *nor, u64 addr) cypress_nor_quad_enable_volatile_reg() argument
340 cypress_nor_quad_enable_volatile(struct spi_nor *nor) cypress_nor_quad_enable_volatile() argument
370 cypress_nor_determine_addr_mode_by_sr1(struct spi_nor *nor, u8 *addr_mode) cypress_nor_determine_addr_mode_by_sr1() argument
419 cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor) cypress_nor_set_addr_mode_nbytes() argument
478 cypress_nor_get_page_size(struct spi_nor *nor) cypress_nor_get_page_size() argument
508 cypress_nor_ecc_init(struct spi_nor *nor) cypress_nor_ecc_init() argument
520 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
547 s25fs256t_post_sfdp_fixup(struct spi_nor *nor) s25fs256t_post_sfdp_fixup() argument
572 s25fs256t_late_init(struct spi_nor *nor) s25fs256t_late_init() argument
586 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
602 s25hx_t_post_sfdp_fixup(struct spi_nor *nor) s25hx_t_post_sfdp_fixup() argument
638 s25hx_t_late_init(struct spi_nor *nor) s25hx_t_late_init() argument
666 cypress_nor_set_octal_dtr(struct spi_nor *nor, bool enable) cypress_nor_set_octal_dtr() argument
672 s28hx_t_post_sfdp_fixup(struct spi_nor *nor) s28hx_t_post_sfdp_fixup() argument
714 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
721 s28hx_t_late_init(struct spi_nor *nor) s28hx_t_late_init() argument
739 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
917 spansion_nor_sr_ready_and_clear(struct spi_nor *nor) spansion_nor_sr_ready_and_clear() argument
949 spansion_nor_late_init(struct spi_nor *nor) spansion_nor_late_init() argument
[all...]
H A Dxilinx.c7 #include <linux/mtd/spi-nor.h>
57 static u32 s3an_nor_convert_addr(struct spi_nor *nor, u32 addr) in s3an_nor_convert_addr() argument
59 u32 page_size = nor->params->page_size; in s3an_nor_convert_addr()
71 * @nor: pointer to 'struct spi_nor'.
77 static int xilinx_nor_read_sr(struct spi_nor *nor, u8 *sr) in xilinx_nor_read_sr() argument
81 if (nor->spimem) { in xilinx_nor_read_sr()
84 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in xilinx_nor_read_sr()
86 ret = spi_mem_exec_op(nor->spimem, &op); in xilinx_nor_read_sr()
88 ret = spi_nor_controller_ops_read_reg(nor, XILINX_OP_RDS in xilinx_nor_read_sr()
105 xilinx_nor_sr_ready(struct spi_nor *nor) xilinx_nor_sr_ready() argument
116 xilinx_nor_setup(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps) xilinx_nor_setup() argument
158 xilinx_nor_late_init(struct spi_nor *nor) xilinx_nor_late_init() argument
[all...]
H A Dmicron-st.c7 #include <linux/mtd/spi-nor.h>
50 static int micron_st_nor_octal_dtr_en(struct spi_nor *nor) in micron_st_nor_octal_dtr_en() argument
53 u8 *buf = nor->bouncebuf; in micron_st_nor_octal_dtr_en()
55 u8 addr_mode_nbytes = nor->params->addr_mode_nbytes; in micron_st_nor_octal_dtr_en()
62 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en()
70 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en()
75 ret = spi_nor_read_id(nor, 0, 8, buf, SNOR_PROTO_8_8_8_DTR); in micron_st_nor_octal_dtr_en()
77 dev_dbg(nor in micron_st_nor_octal_dtr_en()
87 micron_st_nor_octal_dtr_dis(struct spi_nor *nor) micron_st_nor_octal_dtr_dis() argument
123 micron_st_nor_set_octal_dtr(struct spi_nor *nor, bool enable) micron_st_nor_set_octal_dtr() argument
129 mt35xu512aba_default_init(struct spi_nor *nor) mt35xu512aba_default_init() argument
134 mt35xu512aba_post_sfdp_fixup(struct spi_nor *nor) mt35xu512aba_post_sfdp_fixup() argument
315 micron_st_nor_read_fsr(struct spi_nor *nor, u8 *fsr) micron_st_nor_read_fsr() argument
350 micron_st_nor_clear_fsr(struct spi_nor *nor) micron_st_nor_clear_fsr() argument
377 micron_st_nor_ready(struct spi_nor *nor) micron_st_nor_ready() argument
425 micron_st_nor_default_init(struct spi_nor *nor) micron_st_nor_default_init() argument
432 micron_st_nor_late_init(struct spi_nor *nor) micron_st_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, uint64_t len) in at25fs_nor_lock() argument
24 static int at25fs_nor_unlock(struct spi_nor *nor, loff_t ofs, uint64_t 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, uint64_t 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, uint64_t len, bool is_protect) atmel_nor_set_global_protection() argument
121 atmel_nor_global_protect(struct spi_nor *nor, loff_t ofs, uint64_t len) atmel_nor_global_protect() argument
127 atmel_nor_global_unprotect(struct spi_nor *nor, loff_t ofs, uint64_t len) atmel_nor_global_unprotect() argument
133 atmel_nor_is_global_protected(struct spi_nor *nor, loff_t ofs, uint64_t len) atmel_nor_is_global_protected() argument
154 atmel_nor_global_protection_late_init(struct spi_nor *nor) atmel_nor_global_protection_late_init() argument
[all...]
H A DMakefile3 spi-nor-objs := core.o sfdp.o swp.o otp.o sysfs.o
4 spi-nor-objs += atmel.o
5 spi-nor-objs += catalyst.o
6 spi-nor-objs += eon.o
7 spi-nor-objs += esmt.o
8 spi-nor-objs += everspin.o
9 spi-nor-objs += fujitsu.o
10 spi-nor-objs += gigadevice.o
11 spi-nor-objs += intel.o
12 spi-nor
[all...]
H A Dsst.c7 #include <linux/mtd/spi-nor.h>
16 static int sst26vf_nor_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) in sst26vf_nor_lock() argument
21 static int sst26vf_nor_unlock(struct spi_nor *nor, loff_t ofs, uint64_t 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
129 struct spi_nor *nor = mtd_to_spi_nor(mtd); sst_nor_write() local
212 sst_nor_late_init(struct spi_nor *nor) sst_nor_late_init() argument
[all...]
H A Dcore.h289 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);
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);
402 int (*set_octal_dtr)(struct spi_nor *nor, bool enable);
403 int (*quad_enable)(struct spi_nor *nor);
741 spi_nor_debugfs_register(struct spi_nor *nor) spi_nor_debugfs_register() 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_len ? nor->info->id : 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
92 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_sysfs_is_bin_visible() local
[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
436 spi_nor_parse_bfpt(struct spi_nor *nor, const struct sfdp_parameter_header *bfpt_header) spi_nor_parse_bfpt() argument
662 spi_nor_smpt_addr_nbytes(const struct spi_nor *nor, const u32 settings) spi_nor_smpt_addr_nbytes() argument
685 spi_nor_smpt_read_dummy(const struct spi_nor *nor, const u32 settings) spi_nor_smpt_read_dummy() argument
702 spi_nor_get_map_in_use(struct spi_nor *nor, const u32 *smpt, u8 smpt_len) spi_nor_get_map_in_use() argument
822 spi_nor_init_non_uniform_erase_map(struct spi_nor *nor, const u32 *smpt) spi_nor_init_non_uniform_erase_map() argument
910 spi_nor_parse_smpt(struct spi_nor *nor, const struct sfdp_parameter_header *smpt_header) spi_nor_parse_smpt() argument
958 spi_nor_parse_4bait(struct spi_nor *nor, const struct sfdp_parameter_header *param_header) spi_nor_parse_4bait() argument
1143 spi_nor_parse_profile1(struct spi_nor *nor, const struct sfdp_parameter_header *profile1_header) spi_nor_parse_profile1() argument
1231 spi_nor_parse_sccr(struct spi_nor *nor, const struct sfdp_parameter_header *sccr_header) spi_nor_parse_sccr() argument
1282 spi_nor_parse_sccr_mc(struct spi_nor *nor, const struct sfdp_parameter_header *sccr_mc_header) spi_nor_parse_sccr_mc() argument
1338 spi_nor_post_sfdp_fixups(struct spi_nor *nor) spi_nor_post_sfdp_fixups() argument
1364 spi_nor_check_sfdp_signature(struct spi_nor *nor) spi_nor_check_sfdp_signature() argument
1394 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()
186 struct spi_nor *nor = s->private; spi_nor_capabilities_show() local
226 struct spi_nor *nor = data; spi_nor_debugfs_unregister() local
234 spi_nor_debugfs_register(struct spi_nor *nor) spi_nor_debugfs_register() argument
[all...]
H A Dwinbond.c7 #include <linux/mtd/spi-nor.h>
21 w25q256_post_bfpt_fixups(struct spi_nor *nor, in w25q256_post_bfpt_fixups() argument
35 nor->flags |= SNOR_F_4B_OPCODES; in w25q256_post_bfpt_fixups()
150 * @nor: pointer to 'struct spi_nor'.
155 static int winbond_nor_write_ear(struct spi_nor *nor, u8 ear) in winbond_nor_write_ear() argument
159 nor->bouncebuf[0] = ear; in winbond_nor_write_ear()
161 if (nor->spimem) { in winbond_nor_write_ear()
162 struct spi_mem_op op = WINBOND_NOR_WREAR_OP(nor->bouncebuf); in winbond_nor_write_ear()
164 spi_nor_spimem_setup_op(nor, &op, nor in winbond_nor_write_ear()
188 winbond_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable) winbond_nor_set_4byte_addr_mode() argument
220 winbond_nor_late_init(struct spi_nor *nor) winbond_nor_late_init() argument
[all...]
/kernel/linux/linux-5.10/drivers/mtd/spi-nor/
H A Dcore.c23 #include <linux/mtd/spi-nor.h>
46 * @nor: pointer to 'struct spi_nor'
53 static bool spi_nor_spimem_bounce(struct spi_nor *nor, struct spi_mem_op *op) in spi_nor_spimem_bounce() argument
58 if (op->data.nbytes > nor->bouncebuf_size) in spi_nor_spimem_bounce()
59 op->data.nbytes = nor->bouncebuf_size; in spi_nor_spimem_bounce()
60 op->data.buf.in = nor->bouncebuf; in spi_nor_spimem_bounce()
69 * @nor: pointer to 'struct spi_nor'
74 static int spi_nor_spimem_exec_op(struct spi_nor *nor, struct spi_mem_op *op) in spi_nor_spimem_exec_op() argument
78 error = spi_mem_adjust_op_size(nor->spimem, op); in spi_nor_spimem_exec_op()
82 return spi_mem_exec_op(nor in spi_nor_spimem_exec_op()
95 spi_nor_spimem_read_data(struct spi_nor *nor, loff_t from, size_t len, u8 *buf) spi_nor_spimem_read_data() argument
143 spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len, u8 *buf) spi_nor_read_data() argument
161 spi_nor_spimem_write_data(struct spi_nor *nor, loff_t to, size_t len, const u8 *buf) spi_nor_spimem_write_data() argument
204 spi_nor_write_data(struct spi_nor *nor, loff_t to, size_t len, const u8 *buf) spi_nor_write_data() argument
219 spi_nor_write_enable(struct spi_nor *nor) spi_nor_write_enable() argument
248 spi_nor_write_disable(struct spi_nor *nor) spi_nor_write_disable() argument
279 spi_nor_read_sr(struct spi_nor *nor, u8 *sr) spi_nor_read_sr() argument
310 spi_nor_read_fsr(struct spi_nor *nor, u8 *fsr) spi_nor_read_fsr() argument
342 spi_nor_read_cr(struct spi_nor *nor, u8 *cr) spi_nor_read_cr() argument
372 spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable) spi_nor_set_4byte_addr_mode() argument
409 spansion_set_4byte_addr_mode(struct spi_nor *nor, bool enable) spansion_set_4byte_addr_mode() argument
441 spi_nor_write_ear(struct spi_nor *nor, u8 ear) spi_nor_write_ear() argument
474 spi_nor_xread_sr(struct spi_nor *nor, u8 *sr) spi_nor_xread_sr() argument
504 spi_nor_xsr_ready(struct spi_nor *nor) spi_nor_xsr_ready() argument
519 spi_nor_clear_sr(struct spi_nor *nor) spi_nor_clear_sr() argument
547 spi_nor_sr_ready(struct spi_nor *nor) spi_nor_sr_ready() argument
583 spi_nor_clear_fsr(struct spi_nor *nor) spi_nor_clear_fsr() argument
611 spi_nor_fsr_ready(struct spi_nor *nor) spi_nor_fsr_ready() argument
652 spi_nor_ready(struct spi_nor *nor) spi_nor_ready() argument
676 spi_nor_wait_till_ready_with_timeout(struct spi_nor *nor, unsigned long timeout_jiffies) spi_nor_wait_till_ready_with_timeout() argument
709 spi_nor_wait_till_ready(struct spi_nor *nor) spi_nor_wait_till_ready() argument
723 spi_nor_write_sr(struct spi_nor *nor, const u8 *sr, size_t len) spi_nor_write_sr() argument
760 spi_nor_write_sr1_and_check(struct spi_nor *nor, u8 sr1) spi_nor_write_sr1_and_check() argument
792 spi_nor_write_16bit_sr_and_check(struct spi_nor *nor, u8 sr1) spi_nor_write_16bit_sr_and_check() argument
867 spi_nor_write_16bit_cr_and_check(struct spi_nor *nor, u8 cr) spi_nor_write_16bit_cr_and_check() argument
919 spi_nor_write_sr_and_check(struct spi_nor *nor, u8 sr1) spi_nor_write_sr_and_check() argument
935 spi_nor_write_sr2(struct spi_nor *nor, const u8 *sr2) spi_nor_write_sr2() argument
973 spi_nor_read_sr2(struct spi_nor *nor, u8 *sr2) spi_nor_read_sr2() argument
1002 spi_nor_erase_chip(struct spi_nor *nor) spi_nor_erase_chip() argument
1086 spi_nor_has_uniform_erase(const struct spi_nor *nor) spi_nor_has_uniform_erase() argument
1091 spi_nor_set_4byte_opcodes(struct spi_nor *nor) spi_nor_set_4byte_opcodes() argument
1110 spi_nor_lock_and_prep(struct spi_nor *nor) spi_nor_lock_and_prep() argument
1126 spi_nor_unlock_and_unprep(struct spi_nor *nor) spi_nor_unlock_and_unprep() argument
1133 spi_nor_convert_addr(struct spi_nor *nor, loff_t addr) spi_nor_convert_addr() argument
1144 spi_nor_erase_sector(struct spi_nor *nor, u32 addr) spi_nor_erase_sector() argument
1356 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
1423 spi_nor_erase_multi_sectors(struct spi_nor *nor, u64 addr, u32 len) spi_nor_erase_multi_sectors() argument
1468 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_erase() local
1553 spi_nor_get_sr_bp_mask(struct spi_nor *nor) spi_nor_get_sr_bp_mask() argument
1566 spi_nor_get_sr_tb_mask(struct spi_nor *nor) spi_nor_get_sr_tb_mask() argument
1574 spi_nor_get_min_prot_length_sr(struct spi_nor *nor) spi_nor_get_min_prot_length_sr() argument
1590 spi_nor_get_locked_range_sr(struct spi_nor *nor, u8 sr, loff_t *ofs, uint64_t *len) spi_nor_get_locked_range_sr() argument
1627 spi_nor_check_lock_status_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, u8 sr, bool locked) spi_nor_check_lock_status_sr() argument
1646 spi_nor_is_locked_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, u8 sr) spi_nor_is_locked_sr() argument
1652 spi_nor_is_unlocked_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, u8 sr) spi_nor_is_unlocked_sr() argument
1691 spi_nor_sr_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) spi_nor_sr_lock() argument
1776 spi_nor_sr_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) spi_nor_sr_unlock() argument
1861 spi_nor_sr_is_locked(struct spi_nor *nor, loff_t ofs, uint64_t len) spi_nor_sr_is_locked() argument
1880 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_lock() local
1895 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_unlock() local
1910 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_is_locked() local
1932 spi_nor_sr1_bit6_quad_enable(struct spi_nor *nor) spi_nor_sr1_bit6_quad_enable() argument
1957 spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor) spi_nor_sr2_bit1_quad_enable() argument
1988 spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor) spi_nor_sr2_bit7_quad_enable() argument
2058 spi_nor_read_id(struct spi_nor *nor) spi_nor_read_id() argument
2100 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_read() local
2144 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_write() local
2200 spi_nor_check(struct spi_nor *nor) spi_nor_check() argument
2300 spi_nor_spimem_check_op(struct spi_nor *nor, struct spi_mem_op *op) spi_nor_spimem_check_op() argument
2331 spi_nor_spimem_check_readop(struct spi_nor *nor, const struct spi_nor_read_command *read) spi_nor_spimem_check_readop() argument
2357 spi_nor_spimem_check_pp(struct spi_nor *nor, const struct spi_nor_pp_command *pp) spi_nor_spimem_check_pp() argument
2380 spi_nor_spimem_adjust_hwcaps(struct spi_nor *nor, u32 *hwcaps) spi_nor_spimem_adjust_hwcaps() argument
2455 spi_nor_post_bfpt_fixups(struct spi_nor *nor, const struct sfdp_parameter_header *bfpt_header, const struct sfdp_bfpt *bfpt, struct spi_nor_flash_parameter *params) spi_nor_post_bfpt_fixups() argument
2477 spi_nor_select_read(struct spi_nor *nor, u32 shared_hwcaps) spi_nor_select_read() argument
2508 spi_nor_select_pp(struct spi_nor *nor, u32 shared_hwcaps) spi_nor_select_pp() argument
2580 spi_nor_select_erase(struct spi_nor *nor) spi_nor_select_erase() argument
2628 spi_nor_default_setup(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps) spi_nor_default_setup() argument
2689 spi_nor_setup(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps) spi_nor_setup() argument
2703 spi_nor_manufacturer_init_params(struct spi_nor *nor) spi_nor_manufacturer_init_params() argument
2721 spi_nor_sfdp_init_params(struct spi_nor *nor) spi_nor_sfdp_init_params() argument
2739 spi_nor_info_init_params(struct spi_nor *nor) spi_nor_info_init_params() argument
2837 spi_nor_post_sfdp_fixups(struct spi_nor *nor) spi_nor_post_sfdp_fixups() argument
2854 spi_nor_late_init_params(struct spi_nor *nor) spi_nor_late_init_params() argument
2901 spi_nor_init_params(struct spi_nor *nor) spi_nor_init_params() argument
2928 spi_nor_quad_enable(struct spi_nor *nor) spi_nor_quad_enable() argument
2952 spi_nor_try_unlock_all(struct spi_nor *nor) spi_nor_try_unlock_all() argument
2964 spi_nor_init(struct spi_nor *nor) spi_nor_init() argument
2995 struct spi_nor *nor = mtd_to_spi_nor(mtd); spi_nor_resume() local
3008 struct spi_nor *nor = mtd_to_spi_nor(master); spi_nor_get_device() local
3025 struct spi_nor *nor = mtd_to_spi_nor(master); spi_nor_put_device() local
3036 spi_nor_restore(struct spi_nor *nor) spi_nor_restore() argument
3045 spi_nor_match_id(struct spi_nor *nor, const char *name) spi_nor_match_id() argument
3062 spi_nor_set_addr_width(struct spi_nor *nor) spi_nor_set_addr_width() argument
3091 spi_nor_debugfs_init(struct spi_nor *nor, const struct flash_info *info) spi_nor_debugfs_init() argument
3101 spi_nor_get_flash_info(struct spi_nor *nor, const char *name) spi_nor_get_flash_info() argument
3141 spi_nor_scan(struct spi_nor *nor, const char *name, const struct spi_nor_hwcaps *hwcaps) spi_nor_scan() argument
3295 spi_nor_create_read_dirmap(struct spi_nor *nor) spi_nor_create_read_dirmap() argument
3321 spi_nor_create_write_dirmap(struct spi_nor *nor) spi_nor_create_write_dirmap() argument
3351 struct spi_nor *nor; spi_nor_probe() local
3422 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_remove() local
3432 struct spi_nor *nor = spi_mem_get_drvdata(spimem); spi_nor_shutdown() local
[all...]
H A Dxilinx.c7 #include <linux/mtd/spi-nor.h>
29 static u32 s3an_convert_addr(struct spi_nor *nor, u32 addr) in s3an_convert_addr() argument
33 offset = addr % nor->page_size; in s3an_convert_addr()
34 page = addr / nor->page_size; in s3an_convert_addr()
35 page <<= (nor->page_size > 512) ? 10 : 9; in s3an_convert_addr()
40 static int xilinx_nor_setup(struct spi_nor *nor, in xilinx_nor_setup() argument
45 ret = spi_nor_xread_sr(nor, nor->bouncebuf); in xilinx_nor_setup()
49 nor->erase_opcode = SPINOR_OP_XSE; in xilinx_nor_setup()
50 nor in xilinx_nor_setup()
80 xilinx_post_sfdp_fixups(struct spi_nor *nor) xilinx_post_sfdp_fixups() argument
[all...]
H A Dsst.c7 #include <linux/mtd/spi-nor.h>
48 struct spi_nor *nor = mtd_to_spi_nor(mtd); in sst_write() local
52 dev_dbg(nor->dev, "to 0x%08x, len %zd\n", (u32)to, len); in sst_write()
54 ret = spi_nor_lock_and_prep(nor); in sst_write()
58 ret = spi_nor_write_enable(nor); in sst_write()
62 nor->sst_write_second = false; in sst_write()
66 nor->program_opcode = SPINOR_OP_BP; in sst_write()
69 ret = spi_nor_write_data(nor, to, 1, buf); in sst_write()
73 ret = spi_nor_wait_till_ready(nor); in sst_write()
83 nor in sst_write()
131 sst_default_init(struct spi_nor *nor) sst_default_init() argument
136 sst_post_sfdp_fixups(struct spi_nor *nor) sst_post_sfdp_fixups() argument
[all...]
H A DMakefile3 spi-nor-objs := core.o sfdp.o
4 spi-nor-objs += atmel.o
5 spi-nor-objs += catalyst.o
6 spi-nor-objs += eon.o
7 spi-nor-objs += esmt.o
8 spi-nor-objs += everspin.o
9 spi-nor-objs += fujitsu.o
10 spi-nor-objs += gigadevice.o
11 spi-nor-objs += intel.o
12 spi-nor
[all...]
H A Dsfdp.c9 #include <linux/mtd/spi-nor.h>
133 * @nor: pointer to a 'struct spi_nor'
140 static int spi_nor_read_raw(struct spi_nor *nor, u32 addr, size_t len, u8 *buf) in spi_nor_read_raw() argument
145 ret = spi_nor_read_data(nor, addr, len, buf); in spi_nor_read_raw()
160 * @nor: pointer to a 'struct spi_nor'
171 static int spi_nor_read_sfdp(struct spi_nor *nor, u32 addr, in spi_nor_read_sfdp() argument
177 read_opcode = nor->read_opcode; in spi_nor_read_sfdp()
178 addr_width = nor->addr_width; in spi_nor_read_sfdp()
179 read_dummy = nor->read_dummy; in spi_nor_read_sfdp()
181 nor in spi_nor_read_sfdp()
207 spi_nor_read_sfdp_dma_unsafe(struct spi_nor *nor, u32 addr, size_t len, void *buf) spi_nor_read_sfdp_dma_unsafe() argument
427 spi_nor_parse_bfpt(struct spi_nor *nor, const struct sfdp_parameter_header *bfpt_header, struct spi_nor_flash_parameter *params) spi_nor_parse_bfpt() argument
619 spi_nor_smpt_addr_width(const struct spi_nor *nor, const u32 settings) spi_nor_smpt_addr_width() argument
642 spi_nor_smpt_read_dummy(const struct spi_nor *nor, const u32 settings) spi_nor_smpt_read_dummy() argument
659 spi_nor_get_map_in_use(struct spi_nor *nor, const u32 *smpt, u8 smpt_len) spi_nor_get_map_in_use() argument
782 spi_nor_init_non_uniform_erase_map(struct spi_nor *nor, struct spi_nor_flash_parameter *params, const u32 *smpt) spi_nor_init_non_uniform_erase_map() argument
873 spi_nor_parse_smpt(struct spi_nor *nor, const struct sfdp_parameter_header *smpt_header, struct spi_nor_flash_parameter *params) spi_nor_parse_smpt() argument
923 spi_nor_parse_4bait(struct spi_nor *nor, const struct sfdp_parameter_header *param_header, struct spi_nor_flash_parameter *params) spi_nor_parse_4bait() argument
1099 spi_nor_parse_sfdp(struct spi_nor *nor, struct spi_nor_flash_parameter *params) spi_nor_parse_sfdp() argument
[all...]
H A Dcore.h180 int (*lock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
181 int (*unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
182 int (*is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
222 int (*quad_enable)(struct spi_nor *nor);
223 int (*set_4byte_addr_mode)(struct spi_nor *nor, bool enable);
224 u32 (*convert_addr)(struct spi_nor *nor, u32 addr);
225 int (*setup)(struct spi_nor *nor, const struct spi_nor_hwcaps *hwcaps);
246 void (*default_init)(struct spi_nor *nor);
247 int (*post_bfpt)(struct spi_nor *nor,
251 void (*post_sfdp)(struct spi_nor *nor);
[all...]
/kernel/linux/linux-5.10/drivers/mtd/spi-nor/controllers/
H A Dhisi-sfc.c13 #include <linux/mtd/spi-nor.h>
99 struct spi_nor *nor[HIFMC_MAX_CHIP_NUM]; member
147 static int hisi_spi_nor_prep(struct spi_nor *nor) in hisi_spi_nor_prep() argument
149 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_prep()
170 static void hisi_spi_nor_unprep(struct spi_nor *nor) in hisi_spi_nor_unprep() argument
172 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_unprep()
179 static int hisi_spi_nor_op_reg(struct spi_nor *nor, in hisi_spi_nor_op_reg() argument
182 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_op_reg()
202 static int hisi_spi_nor_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in hisi_spi_nor_read_reg() argument
205 struct hifmc_priv *priv = nor in hisi_spi_nor_read_reg()
217 hisi_spi_nor_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, size_t len) hisi_spi_nor_write_reg() argument
229 hisi_spi_nor_dma_transfer(struct spi_nor *nor, loff_t start_off, dma_addr_t dma_buf, size_t len, u8 op_type) hisi_spi_nor_dma_transfer() argument
268 hisi_spi_nor_read(struct spi_nor *nor, loff_t from, size_t len, u_char *read_buf) hisi_spi_nor_read() argument
291 hisi_spi_nor_write(struct spi_nor *nor, loff_t to, size_t len, const u_char *write_buf) hisi_spi_nor_write() argument
337 struct spi_nor *nor; hisi_spi_nor_register() local
[all...]
H A Daspeed-smc.c15 #include <linux/mtd/spi-nor.h>
100 struct spi_nor nor; member
277 static void aspeed_smc_start_user(struct spi_nor *nor) in aspeed_smc_start_user() argument
279 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_start_user()
296 static void aspeed_smc_stop_user(struct spi_nor *nor) in aspeed_smc_stop_user() argument
298 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_stop_user()
308 static int aspeed_smc_prep(struct spi_nor *nor) in aspeed_smc_prep() argument
310 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_prep()
316 static void aspeed_smc_unprep(struct spi_nor *nor) in aspeed_smc_unprep() argument
318 struct aspeed_smc_chip *chip = nor in aspeed_smc_unprep()
323 aspeed_smc_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, size_t len) aspeed_smc_read_reg() argument
335 aspeed_smc_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, size_t len) aspeed_smc_write_reg() argument
347 aspeed_smc_send_cmd_addr(struct spi_nor *nor, u8 cmd, u32 addr) aspeed_smc_send_cmd_addr() argument
373 aspeed_smc_read_user(struct spi_nor *nor, loff_t from, size_t len, u_char *read_buf) aspeed_smc_read_user() argument
390 aspeed_smc_write_user(struct spi_nor *nor, loff_t to, size_t len, const u_char *write_buf) aspeed_smc_write_user() argument
775 struct spi_nor *nor; aspeed_smc_setup_flash() local
[all...]
H A Dnxp-spifi.c18 #include <linux/mtd/spi-nor.h>
59 struct spi_nor nor; member
126 static int nxp_spifi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in nxp_spifi_read_reg() argument
129 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read_reg()
149 static int nxp_spifi_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, in nxp_spifi_write_reg() argument
152 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_write_reg()
173 static ssize_t nxp_spifi_read(struct spi_nor *nor, loff_t from, size_t len, in nxp_spifi_read() argument
176 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read()
188 static ssize_t nxp_spifi_write(struct spi_nor *nor, loff_t to, size_t len, in nxp_spifi_write() argument
191 struct nxp_spifi *spifi = nor in nxp_spifi_write()
219 nxp_spifi_erase(struct spi_nor *nor, loff_t offs) nxp_spifi_erase() argument
265 nxp_spifi_dummy_id_read(struct spi_nor *nor) nxp_spifi_dummy_id_read() argument
[all...]
/kernel/linux/linux-6.6/drivers/mtd/spi-nor/controllers/
H A Dhisi-sfc.c13 #include <linux/mtd/spi-nor.h>
99 struct spi_nor *nor[HIFMC_MAX_CHIP_NUM]; member
147 static int hisi_spi_nor_prep(struct spi_nor *nor) in hisi_spi_nor_prep() argument
149 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_prep()
170 static void hisi_spi_nor_unprep(struct spi_nor *nor) in hisi_spi_nor_unprep() argument
172 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_unprep()
179 static int hisi_spi_nor_op_reg(struct spi_nor *nor, in hisi_spi_nor_op_reg() argument
182 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_op_reg()
202 static int hisi_spi_nor_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in hisi_spi_nor_read_reg() argument
205 struct hifmc_priv *priv = nor in hisi_spi_nor_read_reg()
217 hisi_spi_nor_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, size_t len) hisi_spi_nor_write_reg() argument
229 hisi_spi_nor_dma_transfer(struct spi_nor *nor, loff_t start_off, dma_addr_t dma_buf, size_t len, u8 op_type) hisi_spi_nor_dma_transfer() argument
268 hisi_spi_nor_read(struct spi_nor *nor, loff_t from, size_t len, u_char *read_buf) hisi_spi_nor_read() argument
291 hisi_spi_nor_write(struct spi_nor *nor, loff_t to, size_t len, const u_char *write_buf) hisi_spi_nor_write() argument
337 struct spi_nor *nor; hisi_spi_nor_register() local
[all...]
H A Dnxp-spifi.c18 #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_t to, size_t len, in nxp_spifi_write() argument
190 struct nxp_spifi *spifi = nor in nxp_spifi_write()
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...]

Completed in 17 milliseconds

12345