Home
last modified time | relevance | path

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

12345678910>>...219

/kernel/linux/linux-5.10/drivers/mtd/spi-nor/
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->spimem, op); in spi_nor_spimem_exec_op()
[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 …]
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-objs += issi.o
[all …]
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->program_opcode = SPINOR_OP_AAI_WP; in sst_write()
[all …]
Dcore.h86 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type
125 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region
129 * the last in the SPI NOR flash memory and to indicate
150 * struct spi_nor_erase_map - Structure to describe the SPI NOR erase map
154 * @uniform_region: a pre-allocated erase region for SPI NOR with a uniform
162 * uniform and non-uniform SPI NOR flash memories if they
174 * struct spi_nor_locking_ops - SPI NOR locking methods
175 * @lock: lock a region of the SPI NOR.
176 * @unlock: unlock a region of the SPI NOR.
177 * @is_locked: check if a region of the SPI NOR is completely locked
[all …]
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->read_opcode = SPINOR_OP_RDSFDP; in spi_nor_read_sfdp()
[all …]
/kernel/linux/linux-4.19/drivers/mtd/spi-nor/
Dspi-nor.c25 #include <linux/mtd/spi-nor.h>
93 int (*quad_enable)(struct spi_nor *nor);
105 static int read_sr(struct spi_nor *nor) in read_sr() argument
110 ret = nor->read_reg(nor, SPINOR_OP_RDSR, &val, 1); in read_sr()
124 static int read_fsr(struct spi_nor *nor) in read_fsr() argument
129 ret = nor->read_reg(nor, SPINOR_OP_RDFSR, &val, 1); in read_fsr()
143 static int read_cr(struct spi_nor *nor) in read_cr() argument
148 ret = nor->read_reg(nor, SPINOR_OP_RDCR, &val, 1); in read_cr()
150 dev_err(nor->dev, "error %d reading CR\n", ret); in read_cr()
161 static inline int write_sr(struct spi_nor *nor, u8 val) in write_sr() argument
[all …]
Dhisi-sfc.c2 * HiSilicon SPI Nor Flash Controller Driver
25 #include <linux/mtd/spi-nor.h>
111 struct spi_nor *nor[HIFMC_MAX_CHIP_NUM]; member
159 static int hisi_spi_nor_prep(struct spi_nor *nor, enum spi_nor_ops ops) in hisi_spi_nor_prep() argument
161 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_prep()
182 static void hisi_spi_nor_unprep(struct spi_nor *nor, enum spi_nor_ops ops) in hisi_spi_nor_unprep() argument
184 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_unprep()
191 static int hisi_spi_nor_op_reg(struct spi_nor *nor, in hisi_spi_nor_op_reg() argument
194 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_op_reg()
214 static int hisi_spi_nor_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in hisi_spi_nor_read_reg() argument
[all …]
Dcadence-quadspi.c32 #include <linux/mtd/spi-nor.h>
50 struct spi_nor nor; member
295 static unsigned int cqspi_calc_rdreg(struct spi_nor *nor, const u8 opcode) in cqspi_calc_rdreg() argument
297 struct cqspi_flash_pdata *f_pdata = nor->priv; in cqspi_calc_rdreg()
364 static int cqspi_command_read(struct spi_nor *nor, in cqspi_command_read() argument
368 struct cqspi_flash_pdata *f_pdata = nor->priv; in cqspi_command_read()
377 dev_err(nor->dev, "Invalid input argument, len %d rxbuf 0x%p\n", in cqspi_command_read()
384 rdreg = cqspi_calc_rdreg(nor, txbuf[0]); in cqspi_command_read()
413 static int cqspi_command_write(struct spi_nor *nor, const u8 opcode, in cqspi_command_write() argument
416 struct cqspi_flash_pdata *f_pdata = nor->priv; in cqspi_command_write()
[all …]
Dnxp-spifi.c2 * SPI-NOR driver for NXP SPI Flash Interface (SPIFI)
22 #include <linux/mtd/spi-nor.h>
63 struct spi_nor nor; member
130 static int nxp_spifi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) in nxp_spifi_read_reg() argument
132 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read_reg()
152 static int nxp_spifi_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) in nxp_spifi_write_reg() argument
154 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_write_reg()
175 static ssize_t nxp_spifi_read(struct spi_nor *nor, loff_t from, size_t len, in nxp_spifi_read() argument
178 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read()
190 static ssize_t nxp_spifi_write(struct spi_nor *nor, loff_t to, size_t len, in nxp_spifi_write() argument
[all …]
Daspeed-smc.c19 #include <linux/mtd/spi-nor.h>
104 struct spi_nor nor; member
123 * CE0 and CE1 can only be of type SPI. CE2 can be of type NOR but the
281 static void aspeed_smc_start_user(struct spi_nor *nor) in aspeed_smc_start_user() argument
283 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_start_user()
300 static void aspeed_smc_stop_user(struct spi_nor *nor) in aspeed_smc_stop_user() argument
302 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_stop_user()
312 static int aspeed_smc_prep(struct spi_nor *nor, enum spi_nor_ops ops) in aspeed_smc_prep() argument
314 struct aspeed_smc_chip *chip = nor->priv; in aspeed_smc_prep()
320 static void aspeed_smc_unprep(struct spi_nor *nor, enum spi_nor_ops ops) in aspeed_smc_unprep() argument
[all …]
Dmtk-quadspi.c31 #include <linux/mtd/spi-nor.h>
82 /* commands for mtk nor controller */
106 /* nor controller 4-byte address mode enable bit */
114 struct spi_nor nor; member
116 void __iomem *base; /* nor flash base address */
123 struct spi_nor *nor = &mtk_nor->nor; in mtk_nor_set_read_mode() local
125 switch (nor->read_proto) { in mtk_nor_set_read_mode()
127 writeb(nor->read_opcode, mtk_nor->base + in mtk_nor_set_read_mode()
133 writeb(nor->read_opcode, mtk_nor->base + in mtk_nor_set_read_mode()
139 writeb(nor->read_opcode, mtk_nor->base + in mtk_nor_set_read_mode()
[all …]
Dstm32-quadspi.c29 #include <linux/mtd/spi-nor.h>
134 struct spi_nor nor; member
203 static void stm32_qspi_set_framemode(struct spi_nor *nor, in stm32_qspi_set_framemode() argument
211 switch (nor->read_proto) { in stm32_qspi_set_framemode()
351 static int stm32_qspi_read_reg(struct spi_nor *nor, in stm32_qspi_read_reg() argument
354 struct stm32_qspi_flash *flash = nor->priv; in stm32_qspi_read_reg()
367 stm32_qspi_set_framemode(nor, &cmd, false); in stm32_qspi_read_reg()
372 static int stm32_qspi_write_reg(struct spi_nor *nor, u8 opcode, in stm32_qspi_write_reg() argument
375 struct stm32_qspi_flash *flash = nor->priv; in stm32_qspi_write_reg()
388 stm32_qspi_set_framemode(nor, &cmd, false); in stm32_qspi_write_reg()
[all …]
/kernel/linux/linux-4.19/Documentation/devicetree/bindings/mtd/
Dmtk-quadspi.txt1 * Serial NOR flash controller for MTK MT81xx (and similar)
4 - compatible: For mt8173, compatible should be "mediatek,mt8173-nor",
7 string and "mediatek,mt8173-nor".
9 "mediatek,mt2701-nor", "mediatek,mt8173-nor"
10 "mediatek,mt2712-nor", "mediatek,mt8173-nor"
11 "mediatek,mt7622-nor", "mediatek,mt8173-nor"
12 "mediatek,mt7623-nor", "mediatek,mt8173-nor"
13 "mediatek,mt8173-nor"
15 - clocks: the phandle of the clocks needed by the nor controller
19 hardware needs to enabling nor flash and nor flash controller.
[all …]
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";
/kernel/linux/linux-4.19/drivers/mtd/devices/
Dm25p80.c29 #include <linux/mtd/spi-nor.h>
36 static int m25p80_read_reg(struct spi_nor *nor, u8 code, u8 *val, int len) in m25p80_read_reg() argument
38 struct m25p *flash = nor->priv; in m25p80_read_reg()
63 static int m25p80_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) in m25p80_write_reg() argument
65 struct m25p *flash = nor->priv; in m25p80_write_reg()
84 static ssize_t m25p80_write(struct spi_nor *nor, loff_t to, size_t len, in m25p80_write() argument
87 struct m25p *flash = nor->priv; in m25p80_write()
89 SPI_MEM_OP(SPI_MEM_OP_CMD(nor->program_opcode, 1), in m25p80_write()
90 SPI_MEM_OP_ADDR(nor->addr_width, to, 1), in m25p80_write()
96 op.cmd.buswidth = spi_nor_get_protocol_inst_nbits(nor->write_proto); in m25p80_write()
[all …]
/kernel/liteos_m/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Include/
Dgd32vf103_exmc.h19 3. Neither the name of the copyright holder nor the names of its contributors
47 /* NOR/PSRAM */
48 #define EXMC_SNCTL0 REG32(EXMC + 0x00U) /*!< EXMC SRAM/NOR flash co…
49 #define EXMC_SNTCFG0 REG32(EXMC + 0x04U) /*!< EXMC SRAM/NOR flash ti…
50 #define EXMC_SNWTCFG0 REG32(EXMC + 0x104U) /*!< EXMC SRAM/NOR flash wr…
53 /* NOR/PSRAM */
55 #define EXMC_SNCTL_NRBKEN BIT(0) /*!< NOR bank enable */
56 #define EXMC_SNCTL_NRMUX BIT(1) /*!< NOR bank memory addres…
57 #define EXMC_SNCTL_NRTP BITS(2,3) /*!< NOR bank memory type */
58 #define EXMC_SNCTL_NRW BITS(4,5) /*!< NOR bank memory data b…
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-4.19/include/linux/mtd/
Dspi-nor.h248 * struct spi_nor - Structure for defining a the SPI NOR layer
251 * @dev: point to a spi device, or a spi nor controller device.
252 * @info: spi-nor part JDEC MFR id and other info
253 * @page_size: the page size of the SPI NOR
260 * @flags: flag options for the current SPI-NOR (SNOR_F_*)
271 * @read: [DRIVER-SPECIFIC] read data from the SPI NOR
272 * @write: [DRIVER-SPECIFIC] write data to the SPI NOR
273 * @erase: [DRIVER-SPECIFIC] erase a sector of the SPI NOR
275 * spi-nor will send the erase opcode via write_reg()
276 * @flash_lock: [FLASH-SPECIFIC] lock a region of the SPI NOR
[all …]
/kernel/linux/linux-4.19/Documentation/mtd/
Dspi-nor.txt1 SPI NOR framework
10 arbitrary streams of bytes, but rather are designed specifically for SPI NOR.
12 In particular, Freescale's QuadSPI controller must know the NOR commands to
17 details of the SPI NOR protocol.
23 With this new layer, the SPI NOR controller driver does not depend on the
34 SPI NOR chip
39 SPI NOR framework
45 SPI NOR chip
47 With the SPI NOR controller driver (Freescale QuadSPI), it looks like:
50 SPI NOR framework
[all …]
/kernel/linux/linux-5.10/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
40 SPI NOR framework
46 SPI NOR chip
48 With the SPI NOR controller driver (Freescale QuadSPI), it looks like:
51 SPI NOR framework
[all …]
/kernel/linux/linux-5.10/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";

12345678910>>...219