Home
last modified time | relevance | path

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

12345678910>>...80

/Linux-v5.15/drivers/mtd/spi-nor/
Dcore.c23 #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
101 * something like 4S-4D-4D, but SPI NOR can't. So, set all 4 in spi_nor_spimem_setup_op()
112 ext = spi_nor_get_cmd_ext(nor, op); in spi_nor_spimem_setup_op()
121 * @nor: pointer to 'struct spi_nor'
[all …]
Dotp.c3 * OTP support for SPI NOR flashes
10 #include <linux/mtd/spi-nor.h>
14 #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
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_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()
[all …]
Dswp.c3 * SPI NOR Software Write Protection logic.
9 #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()
[all …]
Dsst.c7 #include <linux/mtd/spi-nor.h>
13 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
[all …]
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->program_opcode = SPINOR_OP_XPP; in xilinx_nor_setup()
51 nor->read_opcode = SPINOR_OP_READ; in xilinx_nor_setup()
[all …]
Dcore.h91 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type
130 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region
134 * the last in the SPI NOR flash memory and to indicate
155 * struct spi_nor_erase_map - Structure to describe the SPI NOR erase map
159 * @uniform_region: a pre-allocated erase region for SPI NOR with a uniform
167 * uniform and non-uniform SPI NOR flash memories if they
179 * struct spi_nor_locking_ops - SPI NOR locking methods
180 * @lock: lock a region of the SPI NOR.
181 * @unlock: unlock a region of the SPI NOR.
182 * @is_locked: check if a region of the SPI NOR is completely locked
[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 …]
Datmel.c7 #include <linux/mtd/spi-nor.h>
19 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()
62 * @nor: pointer to 'struct spi_nor'
[all …]
Dspansion.c7 #include <linux/mtd/spi-nor.h>
24 * @nor: pointer to a 'struct spi_nor'
32 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()
[all …]
Dsfdp.c10 #include <linux/mtd/spi-nor.h>
140 * @nor: pointer to a 'struct spi_nor'
147 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()
167 * @nor: pointer to a 'struct spi_nor'
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()
[all …]
Dmicron-st.c7 #include <linux/mtd/spi-nor.h>
19 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()
[all …]
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
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()
[all …]
Dwinbond.c7 #include <linux/mtd/spi-nor.h>
12 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()
109 * @nor: pointer to 'struct spi_nor'.
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
[all …]
/Linux-v5.15/drivers/mtd/spi-nor/controllers/
Dhisi-sfc.c3 * HiSilicon FMC SPI NOR flash controller driver
13 #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
[all …]
Daspeed-smc.c15 #include <linux/mtd/spi-nor.h>
100 struct spi_nor nor; member
119 * CE0 and CE1 can only be of type SPI. CE2 can be of type NOR but the
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
[all …]
Dnxp-spifi.c3 * SPI NOR driver for NXP SPI Flash Interface (SPIFI)
18 #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
[all …]
/Linux-v5.15/Documentation/devicetree/bindings/spi/
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
28 - mediatek,mt2701-nor
29 - mediatek,mt2712-nor
30 - mediatek,mt7622-nor
31 - mediatek,mt7623-nor
32 - mediatek,mt7629-nor
33 - mediatek,mt8192-nor
[all …]
/Linux-v5.15/Documentation/driver-api/mtd/
Dspi-nor.rst2 SPI NOR framework
11 arbitrary streams of bytes, but rather are designed specifically for SPI NOR.
13 In particular, Freescale's QuadSPI controller must know the NOR commands to
18 details of the SPI NOR protocol.
24 With this new layer, the SPI NOR controller driver does not depend on the
35 SPI NOR chip
41 SPI NOR framework
47 SPI NOR chip
49 With the SPI NOR controller driver (Freescale QuadSPI), it looks like::
53 SPI NOR framework
[all …]
/Linux-v5.15/Documentation/devicetree/bindings/mtd/
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";
20 spi-nor@0 {
21 compatible = "jedec,spi-nor";
Dgpmc-nor.txt1 Device tree bindings for NOR flash connect to TI GPMC
3 NOR flash connected to the TI GPMC (found on OMAP boards) are represented as
4 child nodes of the GPMC controller with a name of "nor".
11 - bank-width: Width of NOR flash in bytes. GPMC supports 8-bit and
26 and size of NOR flash. Note that base address will be
51 nor@0,0 {
82 label = "bootloader-nor";
86 label = "params-nor";
90 label = "kernel-nor";
94 label = "filesystem-nor";
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
32 - const: jedec,spi-nor
42 - const: jedec,spi-nor
43 - const: jedec,spi-nor
45 Must also include "jedec,spi-nor" for any SPI NOR flash that can be
102 compatible = "spansion,m25p80", "jedec,spi-nor";
/Linux-v5.15/include/linux/mtd/
Dspi-nor.h312 * struct spi_nor_controller_ops - SPI NOR controller driver specific
320 * @read: read data from the SPI NOR.
321 * @write: write data to the SPI NOR.
322 * @erase: erase a sector of the SPI NOR at the offset @offs; if
323 * not provided by the driver, SPI NOR will send the erase
327 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);
[all …]
/Linux-v5.15/Documentation/ABI/testing/
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
9 What: /sys/bus/spi/devices/.../spi-nor/manufacturer
13 Description: (RO) Manufacturer of the SPI NOR flash.
16 What: /sys/bus/spi/devices/.../spi-nor/partname
20 Description: (RO) Part name of the SPI NOR flash.
23 What: /sys/bus/spi/devices/.../spi-nor/sfdp
27 Description: (RO) This attribute is only present if the SPI NOR flash
/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";

12345678910>>...80