Home
last modified time | relevance | path

Searched refs:nor (Results 1 – 25 of 937) sorted by relevance

12345678910>>...38

/linux-6.1.9/drivers/mtd/spi-nor/
Dcore.c58 static u8 spi_nor_get_cmd_ext(const struct spi_nor *nor, in spi_nor_get_cmd_ext() argument
61 switch (nor->cmd_ext_type) { in spi_nor_get_cmd_ext()
69 dev_err(nor->dev, "Unknown command extension type\n"); in spi_nor_get_cmd_ext()
81 void spi_nor_spimem_setup_op(const struct spi_nor *nor, in spi_nor_spimem_setup_op() argument
113 ext = spi_nor_get_cmd_ext(nor, op); in spi_nor_spimem_setup_op()
129 static bool spi_nor_spimem_bounce(struct spi_nor *nor, struct spi_mem_op *op) in spi_nor_spimem_bounce() argument
134 if (op->data.nbytes > nor->bouncebuf_size) in spi_nor_spimem_bounce()
135 op->data.nbytes = nor->bouncebuf_size; in spi_nor_spimem_bounce()
136 op->data.buf.in = nor->bouncebuf; in spi_nor_spimem_bounce()
150 static int spi_nor_spimem_exec_op(struct spi_nor *nor, struct spi_mem_op *op) in spi_nor_spimem_exec_op() argument
[all …]
Dotp.c14 #define spi_nor_otp_region_len(nor) ((nor)->params->otp.org->len) argument
15 #define spi_nor_otp_n_regions(nor) ((nor)->params->otp.org->n_regions) argument
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->read_dummy; in spi_nor_otp_read_secr()
46 read_proto = nor->read_proto; in spi_nor_otp_read_secr()
47 rdesc = nor->dirmap.rdesc; in spi_nor_otp_read_secr()
49 nor->read_opcode = SPINOR_OP_RSECR; in spi_nor_otp_read_secr()
50 nor->read_dummy = 8; in spi_nor_otp_read_secr()
[all …]
Dspansion.c47 static int cypress_nor_octal_dtr_en(struct spi_nor *nor) in cypress_nor_octal_dtr_en() argument
50 u8 *buf = nor->bouncebuf; in cypress_nor_octal_dtr_en()
58 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in cypress_nor_octal_dtr_en()
62 nor->read_dummy = 24; in cypress_nor_octal_dtr_en()
69 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in cypress_nor_octal_dtr_en()
74 ret = spi_nor_read_id(nor, 4, 3, buf, SNOR_PROTO_8_8_8_DTR); in cypress_nor_octal_dtr_en()
76 dev_dbg(nor->dev, "error %d reading JEDEC ID after enabling 8D-8D-8D mode\n", ret); in cypress_nor_octal_dtr_en()
80 if (memcmp(buf, nor->info->id, nor->info->id_len)) in cypress_nor_octal_dtr_en()
86 static int cypress_nor_octal_dtr_dis(struct spi_nor *nor) in cypress_nor_octal_dtr_dis() argument
89 u8 *buf = nor->bouncebuf; in cypress_nor_octal_dtr_dis()
[all …]
Dswp.c13 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->info->sector_size << in spi_nor_get_min_prot_length_sr()
47 return nor->info->sector_size; in spi_nor_get_min_prot_length_sr()
[all …]
Dmicron-st.c50 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()
60 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en()
67 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en()
72 ret = spi_nor_read_id(nor, 0, 8, buf, SNOR_PROTO_8_8_8_DTR); in micron_st_nor_octal_dtr_en()
74 dev_dbg(nor->dev, "error %d reading JEDEC ID after enabling 8D-8D-8D mode\n", ret); in micron_st_nor_octal_dtr_en()
78 if (memcmp(buf, nor->info->id, nor->info->id_len)) in micron_st_nor_octal_dtr_en()
84 static int micron_st_nor_octal_dtr_dis(struct spi_nor *nor) in micron_st_nor_octal_dtr_dis() argument
87 u8 *buf = nor->bouncebuf; in micron_st_nor_octal_dtr_dis()
102 ret = spi_nor_write_any_volatile_reg(nor, &op, SNOR_PROTO_8_8_8_DTR); in micron_st_nor_octal_dtr_dis()
[all …]
Dxilinx.c56 static u32 s3an_nor_convert_addr(struct spi_nor *nor, u32 addr) in s3an_nor_convert_addr() argument
58 u32 page_size = nor->params->page_size; in s3an_nor_convert_addr()
76 static int xilinx_nor_read_sr(struct spi_nor *nor, u8 *sr) in xilinx_nor_read_sr() argument
80 if (nor->spimem) { in xilinx_nor_read_sr()
83 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in xilinx_nor_read_sr()
85 ret = spi_mem_exec_op(nor->spimem, &op); in xilinx_nor_read_sr()
87 ret = spi_nor_controller_ops_read_reg(nor, XILINX_OP_RDSR, sr, in xilinx_nor_read_sr()
92 dev_dbg(nor->dev, "error %d reading SR\n", ret); in xilinx_nor_read_sr()
104 static int xilinx_nor_sr_ready(struct spi_nor *nor) in xilinx_nor_sr_ready() argument
108 ret = xilinx_nor_read_sr(nor, nor->bouncebuf); in xilinx_nor_sr_ready()
[all …]
Dsst.c16 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_t ofs, uint64_t len) in sst26vf_nor_is_locked() argument
52 static void sst26vf_nor_late_init(struct spi_nor *nor) in sst26vf_nor_late_init() argument
54 nor->params->locking_ops = &sst26vf_nor_locking_ops; in sst26vf_nor_late_init()
[all …]
Datmel.c19 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 void 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()
69 static int atmel_nor_set_global_protection(struct spi_nor *nor, loff_t ofs, in atmel_nor_set_global_protection() argument
76 if (ofs || len != nor->params->size) in atmel_nor_set_global_protection()
[all …]
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-objs += issi.o
[all …]
Dcore.h286 int (*lock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
287 int (*unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
288 int (*is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
315 int (*read)(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
316 int (*write)(struct spi_nor *nor, loff_t addr, size_t len,
318 int (*lock)(struct spi_nor *nor, unsigned int region);
319 int (*erase)(struct spi_nor *nor, loff_t addr);
320 int (*is_locked)(struct spi_nor *nor, unsigned int region);
392 int (*octal_dtr_enable)(struct spi_nor *nor, bool enable);
393 int (*quad_enable)(struct spi_nor *nor);
[all …]
Dsfdp.c147 static int spi_nor_read_raw(struct spi_nor *nor, u32 addr, size_t len, u8 *buf) in spi_nor_read_raw() argument
152 ret = spi_nor_read_data(nor, addr, len, buf); in spi_nor_read_raw()
178 static int spi_nor_read_sfdp(struct spi_nor *nor, u32 addr, in spi_nor_read_sfdp() argument
184 read_opcode = nor->read_opcode; in spi_nor_read_sfdp()
185 addr_nbytes = nor->addr_nbytes; in spi_nor_read_sfdp()
186 read_dummy = nor->read_dummy; in spi_nor_read_sfdp()
188 nor->read_opcode = SPINOR_OP_RDSFDP; in spi_nor_read_sfdp()
189 nor->addr_nbytes = 3; in spi_nor_read_sfdp()
190 nor->read_dummy = 8; in spi_nor_read_sfdp()
192 ret = spi_nor_read_raw(nor, addr, len, buf); in spi_nor_read_sfdp()
[all …]
Dwinbond.c21 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()
151 static int winbond_nor_write_ear(struct spi_nor *nor, u8 ear) in winbond_nor_write_ear() argument
155 nor->bouncebuf[0] = ear; in winbond_nor_write_ear()
157 if (nor->spimem) { in winbond_nor_write_ear()
158 struct spi_mem_op op = WINBOND_NOR_WREAR_OP(nor->bouncebuf); in winbond_nor_write_ear()
160 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in winbond_nor_write_ear()
162 ret = spi_mem_exec_op(nor->spimem, &op); in winbond_nor_write_ear()
164 ret = spi_nor_controller_ops_write_reg(nor, in winbond_nor_write_ear()
166 nor->bouncebuf, 1); in winbond_nor_write_ear()
[all …]
Ddebugfs.c75 struct spi_nor *nor = s->private; in spi_nor_params_show() local
76 struct spi_nor_flash_parameter *params = nor->params; in spi_nor_params_show()
79 const struct flash_info *info = nor->info; in spi_nor_params_show()
89 seq_printf(s, "address nbytes\t%u\n", nor->addr_nbytes); in spi_nor_params_show()
92 spi_nor_print_flags(s, nor->flags, snor_f_names, sizeof(snor_f_names)); in spi_nor_params_show()
96 seq_printf(s, " read\t\t0x%02x\n", nor->read_opcode); in spi_nor_params_show()
97 seq_printf(s, " dummy cycles\t%u\n", nor->read_dummy); in spi_nor_params_show()
98 seq_printf(s, " erase\t\t0x%02x\n", nor->erase_opcode); in spi_nor_params_show()
99 seq_printf(s, " program\t0x%02x\n", nor->program_opcode); in spi_nor_params_show()
101 switch (nor->cmd_ext_type) { in spi_nor_params_show()
[all …]
Dsysfs.c15 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
39 return sysfs_emit(buf, "%*phN\n", nor->info->id_len, nor->info->id); in jedec_id_show()
56 struct spi_nor *nor = spi_mem_get_drvdata(spimem); in sfdp_read() local
57 struct sfdp *sfdp = nor->sfdp; in sfdp_read()
60 return memory_read_from_buffer(buf, count, &off, nor->sfdp->dwords, in sfdp_read()
75 struct spi_nor *nor = spi_mem_get_drvdata(spimem); in spi_nor_sysfs_is_visible() local
[all …]
Dissi.c12 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 void 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()
91 static void issi_nor_default_init(struct spi_nor *nor) in issi_nor_default_init() argument
93 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; in issi_nor_default_init()
Dmacronix.c12 mx25l25635_post_bfpt_fixups(struct spi_nor *nor, in mx25l25635_post_bfpt_fixups() argument
26 nor->flags |= SNOR_F_4B_OPCODES; in mx25l25635_post_bfpt_fixups()
105 static void macronix_nor_default_init(struct spi_nor *nor) in macronix_nor_default_init() argument
107 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; in macronix_nor_default_init()
108 nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode; in macronix_nor_default_init()
/linux-6.1.9/drivers/mtd/spi-nor/controllers/
Dhisi-sfc.c99 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->priv; in hisi_spi_nor_read_reg()
209 ret = hisi_spi_nor_op_reg(nor, opcode, len, FMC_OP_READ_DATA_EN); in hisi_spi_nor_read_reg()
[all …]
Dnxp-spifi.c59 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->priv; in nxp_spifi_write()
205 SPIFI_CMD_OPCODE(nor->program_opcode) | in nxp_spifi_write()
[all …]
/linux-6.1.9/Documentation/devicetree/bindings/spi/
Dmediatek,spi-mtk-nor.yaml4 $id: http://devicetree.org/schemas/spi/mediatek,spi-mtk-nor.yaml#
27 - mediatek,mt8173-nor
28 - mediatek,mt8186-nor
29 - mediatek,mt8192-nor
32 - mediatek,mt2701-nor
33 - mediatek,mt2712-nor
34 - mediatek,mt7622-nor
35 - mediatek,mt7623-nor
36 - mediatek,mt7629-nor
37 - mediatek,mt8195-nor
[all …]
/linux-6.1.9/Documentation/devicetree/bindings/mtd/
Dhisilicon,fmc-spi-nor.txt4 - 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";
/linux-6.1.9/include/linux/mtd/
Dspi-nor.h306 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_t from, size_t len, u8 *buf);
313 ssize_t (*write)(struct spi_nor *nor, loff_t to, size_t len,
315 int (*erase)(struct spi_nor *nor, loff_t offs);
409 static inline void spi_nor_set_flash_node(struct spi_nor *nor, in spi_nor_set_flash_node() argument
412 mtd_set_of_node(&nor->mtd, np); in spi_nor_set_flash_node()
415 static inline struct device_node *spi_nor_get_flash_node(struct spi_nor *nor) in spi_nor_get_flash_node() argument
[all …]
/linux-6.1.9/arch/powerpc/boot/dts/fsl/
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 …]
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";
/linux-6.1.9/arch/arm64/boot/dts/freescale/
Dfsl-ls1088a-qds.dts27 compatible = "jedec,spi-nor";
35 compatible = "jedec,spi-nor";
45 compatible = "jedec,spi-nor";
116 nor@0,0 {
150 compatible = "jedec,spi-nor";
160 compatible = "jedec,spi-nor";
/linux-6.1.9/Documentation/ABI/testing/
Dsysfs-bus-spi-devices-spi-nor1 What: /sys/bus/spi/devices/.../spi-nor/jedec_id
12 What: /sys/bus/spi/devices/.../spi-nor/manufacturer
19 What: /sys/bus/spi/devices/.../spi-nor/partname
26 What: /sys/bus/spi/devices/.../spi-nor/sfdp

12345678910>>...38