Home
last modified time | relevance | path

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

12345678910>>...34

/Linux-v5.15/drivers/mtd/spi-nor/
Dcore.c57 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()
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()
128 static bool spi_nor_spimem_bounce(struct spi_nor *nor, struct spi_mem_op *op) in spi_nor_spimem_bounce() argument
133 if (op->data.nbytes > nor->bouncebuf_size) in spi_nor_spimem_bounce()
134 op->data.nbytes = nor->bouncebuf_size; in spi_nor_spimem_bounce()
135 op->data.buf.in = nor->bouncebuf; in spi_nor_spimem_bounce()
149 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_width = nor->addr_width; 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 …]
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 …]
Dxilinx.c29 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->program_opcode = SPINOR_OP_XPP; in xilinx_nor_setup()
51 nor->read_opcode = SPINOR_OP_READ; in xilinx_nor_setup()
52 nor->flags |= SNOR_F_NO_OP_CHIP_ERASE; in xilinx_nor_setup()
[all …]
Dsst.c13 static int sst26vf_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) in sst26vf_lock() argument
18 static int sst26vf_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) in sst26vf_unlock() argument
23 if (ofs != 0 || len != nor->params->size) in sst26vf_unlock()
26 ret = spi_nor_read_cr(nor, nor->bouncebuf); in sst26vf_unlock()
30 if (!(nor->bouncebuf[0] & SST26VF_CR_BPNV)) { in sst26vf_unlock()
31 dev_dbg(nor->dev, "Any block has been permanently locked\n"); in sst26vf_unlock()
35 return spi_nor_global_block_unlock(nor); in sst26vf_unlock()
38 static int sst26vf_is_locked(struct spi_nor *nor, loff_t ofs, uint64_t len) in sst26vf_is_locked() argument
49 static void sst26vf_default_init(struct spi_nor *nor) in sst26vf_default_init() argument
51 nor->params->locking_ops = &sst26vf_locking_ops; in sst26vf_default_init()
[all …]
Dspansion.c32 static int spi_nor_cypress_octal_dtr_enable(struct spi_nor *nor, bool enable) in spi_nor_cypress_octal_dtr_enable() argument
35 u8 *buf = nor->bouncebuf; in spi_nor_cypress_octal_dtr_enable()
40 ret = spi_nor_write_enable(nor); in spi_nor_cypress_octal_dtr_enable()
52 ret = spi_mem_exec_op(nor->spimem, &op); in spi_nor_cypress_octal_dtr_enable()
56 ret = spi_nor_wait_till_ready(nor); in spi_nor_cypress_octal_dtr_enable()
60 nor->read_dummy = 24; in spi_nor_cypress_octal_dtr_enable()
64 ret = spi_nor_write_enable(nor); in spi_nor_cypress_octal_dtr_enable()
82 spi_nor_spimem_setup_op(nor, &op, SNOR_PROTO_8_8_8_DTR); in spi_nor_cypress_octal_dtr_enable()
84 ret = spi_mem_exec_op(nor->spimem, &op); in spi_nor_cypress_octal_dtr_enable()
93 SPI_MEM_OP_DATA_IN(round_up(nor->info->id_len, 2), in spi_nor_cypress_octal_dtr_enable()
[all …]
Datmel.c19 static int atmel_at25fs_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_lock() argument
24 static int atmel_at25fs_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_unlock() argument
29 if (ofs || len != nor->params->size) in atmel_at25fs_unlock()
33 ret = spi_nor_write_sr_and_check(nor, 0); in atmel_at25fs_unlock()
35 dev_dbg(nor->dev, "unable to clear BP bits, WP# asserted?\n"); in atmel_at25fs_unlock()
40 static int atmel_at25fs_is_locked(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_is_locked() argument
51 static void atmel_at25fs_default_init(struct spi_nor *nor) in atmel_at25fs_default_init() argument
53 nor->params->locking_ops = &atmel_at25fs_locking_ops; in atmel_at25fs_default_init()
69 static int atmel_set_global_protection(struct spi_nor *nor, loff_t ofs, in atmel_set_global_protection() argument
76 if (ofs || len != nor->params->size) in atmel_set_global_protection()
[all …]
Dcore.h185 int (*lock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
186 int (*unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
187 int (*is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
214 int (*read)(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf);
215 int (*write)(struct spi_nor *nor, loff_t addr, size_t len,
217 int (*lock)(struct spi_nor *nor, unsigned int region);
218 int (*erase)(struct spi_nor *nor, loff_t addr);
219 int (*is_locked)(struct spi_nor *nor, unsigned int region);
281 int (*octal_dtr_enable)(struct spi_nor *nor, bool enable);
282 int (*quad_enable)(struct spi_nor *nor);
[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 …]
Dmicron-st.c19 static int spi_nor_micron_octal_dtr_enable(struct spi_nor *nor, bool enable) in spi_nor_micron_octal_dtr_enable() argument
22 u8 *buf = nor->bouncebuf; in spi_nor_micron_octal_dtr_enable()
27 ret = spi_nor_write_enable(nor); in spi_nor_micron_octal_dtr_enable()
38 ret = spi_mem_exec_op(nor->spimem, &op); in spi_nor_micron_octal_dtr_enable()
42 ret = spi_nor_wait_till_ready(nor); in spi_nor_micron_octal_dtr_enable()
47 ret = spi_nor_write_enable(nor); in spi_nor_micron_octal_dtr_enable()
64 spi_nor_spimem_setup_op(nor, &op, SNOR_PROTO_8_8_8_DTR); in spi_nor_micron_octal_dtr_enable()
66 ret = spi_mem_exec_op(nor->spimem, &op); in spi_nor_micron_octal_dtr_enable()
75 SPI_MEM_OP_DATA_IN(round_up(nor->info->id_len, 2), in spi_nor_micron_octal_dtr_enable()
79 spi_nor_spimem_setup_op(nor, &op, SNOR_PROTO_8_8_8_DTR); in spi_nor_micron_octal_dtr_enable()
[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_width = nor->addr_width; 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_width = 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 …]
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_bin_visible() local
[all …]
Dwinbond.c12 w25q256_post_bfpt_fixups(struct spi_nor *nor, in w25q256_post_bfpt_fixups() argument
26 nor->flags |= SNOR_F_4B_OPCODES; in w25q256_post_bfpt_fixups()
115 static int winbond_set_4byte_addr_mode(struct spi_nor *nor, bool enable) in winbond_set_4byte_addr_mode() argument
119 ret = spi_nor_set_4byte_addr_mode(nor, enable); in winbond_set_4byte_addr_mode()
128 ret = spi_nor_write_enable(nor); in winbond_set_4byte_addr_mode()
132 ret = spi_nor_write_ear(nor, 0); in winbond_set_4byte_addr_mode()
136 return spi_nor_write_disable(nor); in winbond_set_4byte_addr_mode()
147 static void winbond_default_init(struct spi_nor *nor) in winbond_default_init() argument
149 nor->params->set_4byte_addr_mode = winbond_set_4byte_addr_mode; in winbond_default_init()
150 if (nor->params->otp.org->n_regions) in winbond_default_init()
[all …]
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()
92 static void macronix_default_init(struct spi_nor *nor) in macronix_default_init() argument
94 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; in macronix_default_init()
95 nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode; in macronix_default_init()
Dissi.c12 is25lp256_post_bfpt_fixups(struct spi_nor *nor, in is25lp256_post_bfpt_fixups() argument
23 nor->addr_width = 4; in is25lp256_post_bfpt_fixups()
68 static void issi_default_init(struct spi_nor *nor) in issi_default_init() argument
70 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; in issi_default_init()
/Linux-v5.15/drivers/mtd/spi-nor/controllers/
Daspeed-smc.c100 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->priv; in aspeed_smc_unprep()
323 static int aspeed_smc_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in aspeed_smc_read_reg() argument
[all …]
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 …]
Dintel-spi.c146 struct spi_nor nor; member
557 static int intel_spi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in intel_spi_read_reg() argument
560 struct intel_spi *ispi = nor->priv; in intel_spi_read_reg()
578 static int intel_spi_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, in intel_spi_write_reg() argument
581 struct intel_spi *ispi = nor->priv; in intel_spi_write_reg()
636 static ssize_t intel_spi_read(struct spi_nor *nor, loff_t from, size_t len, in intel_spi_read() argument
639 struct intel_spi *ispi = nor->priv; in intel_spi_read()
651 switch (nor->read_opcode) { in intel_spi_read()
707 static ssize_t intel_spi_write(struct spi_nor *nor, loff_t to, size_t len, in intel_spi_write() argument
710 struct intel_spi *ispi = nor->priv; in intel_spi_write()
[all …]
/Linux-v5.15/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";
20 spi-nor@0 {
21 compatible = "jedec,spi-nor";
/Linux-v5.15/include/linux/mtd/
Dspi-nor.h327 int (*prepare)(struct spi_nor *nor);
328 void (*unprepare)(struct spi_nor *nor);
329 int (*read_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, size_t len);
330 int (*write_reg)(struct spi_nor *nor, u8 opcode, const u8 *buf,
333 ssize_t (*read)(struct spi_nor *nor, loff_t from, size_t len, u8 *buf);
334 ssize_t (*write)(struct spi_nor *nor, loff_t to, size_t len,
336 int (*erase)(struct spi_nor *nor, loff_t offs);
430 static inline void spi_nor_set_flash_node(struct spi_nor *nor, in spi_nor_set_flash_node() argument
433 mtd_set_of_node(&nor->mtd, np); in spi_nor_set_flash_node()
436 static inline struct device_node *spi_nor_get_flash_node(struct spi_nor *nor) in spi_nor_get_flash_node() argument
[all …]
/Linux-v5.15/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-v5.15/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-v5.15/Documentation/ABI/testing/
Dsysfs-bus-spi-devices-spi-nor1 What: /sys/bus/spi/devices/.../spi-nor/jedec_id
9 What: /sys/bus/spi/devices/.../spi-nor/manufacturer
16 What: /sys/bus/spi/devices/.../spi-nor/partname
23 What: /sys/bus/spi/devices/.../spi-nor/sfdp

12345678910>>...34