/kernel/linux/linux-5.10/drivers/mtd/spi-nor/ |
D | core.c | 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() 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() 95 static ssize_t spi_nor_spimem_read_data(struct spi_nor *nor, loff_t from, in spi_nor_spimem_read_data() argument 99 SPI_MEM_OP(SPI_MEM_OP_CMD(nor->read_opcode, 1), in spi_nor_spimem_read_data() 100 SPI_MEM_OP_ADDR(nor->addr_width, from, 1), in spi_nor_spimem_read_data() [all …]
|
D | xilinx.c | 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() 52 nor->flags |= SNOR_F_NO_OP_CHIP_ERASE; in xilinx_nor_setup() [all …]
|
D | sst.c | 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() 86 ret = spi_nor_write_data(nor, to, 2, buf + actual); in sst_write() [all …]
|
D | Makefile | 3 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 …]
|
D | sfdp.c | 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() 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() 182 nor->addr_width = 3; in spi_nor_read_sfdp() 183 nor->read_dummy = 8; in spi_nor_read_sfdp() 185 ret = spi_nor_read_raw(nor, addr, len, buf); in spi_nor_read_sfdp() [all …]
|
D | core.h | 180 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 …]
|
D | atmel.c | 17 static int atmel_at25fs_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_lock() argument 22 static int atmel_at25fs_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_unlock() argument 27 if (ofs || len != nor->params->size) in atmel_at25fs_unlock() 31 ret = spi_nor_write_sr_and_check(nor, 0); in atmel_at25fs_unlock() 33 dev_dbg(nor->dev, "unable to clear BP bits, WP# asserted?\n"); in atmel_at25fs_unlock() 38 static int atmel_at25fs_is_locked(struct spi_nor *nor, loff_t ofs, uint64_t len) in atmel_at25fs_is_locked() argument 49 static void atmel_at25fs_default_init(struct spi_nor *nor) in atmel_at25fs_default_init() argument 51 nor->params->locking_ops = &atmel_at25fs_locking_ops; in atmel_at25fs_default_init()
|
D | winbond.c | 12 w25q256_post_bfpt_fixups(struct spi_nor *nor, in w25q256_post_bfpt_fixups() argument 27 nor->flags |= SNOR_F_4B_OPCODES; in w25q256_post_bfpt_fixups() 110 static int winbond_set_4byte_addr_mode(struct spi_nor *nor, bool enable) in winbond_set_4byte_addr_mode() argument 114 ret = spi_nor_set_4byte_addr_mode(nor, enable); in winbond_set_4byte_addr_mode() 123 ret = spi_nor_write_enable(nor); in winbond_set_4byte_addr_mode() 127 ret = spi_nor_write_ear(nor, 0); in winbond_set_4byte_addr_mode() 131 return spi_nor_write_disable(nor); in winbond_set_4byte_addr_mode() 134 static void winbond_default_init(struct spi_nor *nor) in winbond_default_init() argument 136 nor->params->set_4byte_addr_mode = winbond_set_4byte_addr_mode; in winbond_default_init()
|
D | micron-st.c | 122 static int st_micron_set_4byte_addr_mode(struct spi_nor *nor, bool enable) in st_micron_set_4byte_addr_mode() argument 126 ret = spi_nor_write_enable(nor); in st_micron_set_4byte_addr_mode() 130 ret = spi_nor_set_4byte_addr_mode(nor, enable); in st_micron_set_4byte_addr_mode() 134 return spi_nor_write_disable(nor); in st_micron_set_4byte_addr_mode() 137 static void micron_st_default_init(struct spi_nor *nor) in micron_st_default_init() argument 139 nor->flags |= SNOR_F_HAS_LOCK; in micron_st_default_init() 140 nor->flags &= ~SNOR_F_HAS_16BIT_SR; in micron_st_default_init() 141 nor->params->quad_enable = NULL; in micron_st_default_init() 142 nor->params->set_4byte_addr_mode = st_micron_set_4byte_addr_mode; in micron_st_default_init()
|
D | spansion.c | 12 s25fs_s_post_bfpt_fixups(struct spi_nor *nor, in s25fs_s_post_bfpt_fixups() argument 109 static void spansion_post_sfdp_fixups(struct spi_nor *nor) in spansion_post_sfdp_fixups() argument 111 if (nor->params->size <= SZ_16M) in spansion_post_sfdp_fixups() 114 nor->flags |= SNOR_F_4B_OPCODES; in spansion_post_sfdp_fixups() 116 nor->erase_opcode = SPINOR_OP_SE; in spansion_post_sfdp_fixups() 117 nor->mtd.erasesize = nor->info->sector_size; in spansion_post_sfdp_fixups()
|
D | macronix.c | 12 mx25l25635_post_bfpt_fixups(struct spi_nor *nor, in mx25l25635_post_bfpt_fixups() argument 27 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()
|
D | issi.c | 12 is25lp256_post_bfpt_fixups(struct spi_nor *nor, in is25lp256_post_bfpt_fixups() argument 24 nor->addr_width = 4; in is25lp256_post_bfpt_fixups() 69 static void issi_default_init(struct spi_nor *nor) in issi_default_init() argument 71 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; in issi_default_init()
|
/kernel/linux/linux-5.10/drivers/mtd/spi-nor/controllers/ |
D | aspeed-smc.c | 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->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 …]
|
D | hisi-sfc.c | 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->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 …]
|
D | nxp-spifi.c | 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->priv; in nxp_spifi_write() 205 SPIFI_CMD_OPCODE(nor->program_opcode) | in nxp_spifi_write() [all …]
|
D | intel-spi.c | 147 struct spi_nor nor; member 558 static int intel_spi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, in intel_spi_read_reg() argument 561 struct intel_spi *ispi = nor->priv; in intel_spi_read_reg() 579 static int intel_spi_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf, in intel_spi_write_reg() argument 582 struct intel_spi *ispi = nor->priv; in intel_spi_write_reg() 637 static ssize_t intel_spi_read(struct spi_nor *nor, loff_t from, size_t len, in intel_spi_read() argument 640 struct intel_spi *ispi = nor->priv; in intel_spi_read() 652 switch (nor->read_opcode) { in intel_spi_read() 708 static ssize_t intel_spi_write(struct spi_nor *nor, loff_t to, size_t len, in intel_spi_write() argument 711 struct intel_spi *ispi = nor->priv; in intel_spi_write() [all …]
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/mtd/ |
D | hisilicon,fmc-spi-nor.txt | 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";
|
D | gpmc-nor.txt | 4 child nodes of the GPMC controller with a name of "nor". 51 nor@0,0 { 82 label = "bootloader-nor"; 86 label = "params-nor"; 90 label = "kernel-nor"; 94 label = "filesystem-nor";
|
/kernel/linux/linux-5.10/include/linux/mtd/ |
D | spi-nor.h | 309 int (*prepare)(struct spi_nor *nor); 310 void (*unprepare)(struct spi_nor *nor); 311 int (*read_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, size_t len); 312 int (*write_reg)(struct spi_nor *nor, u8 opcode, const u8 *buf, 315 ssize_t (*read)(struct spi_nor *nor, loff_t from, size_t len, u8 *buf); 316 ssize_t (*write)(struct spi_nor *nor, loff_t to, size_t len, 318 int (*erase)(struct spi_nor *nor, loff_t offs); 392 static inline void spi_nor_set_flash_node(struct spi_nor *nor, in spi_nor_set_flash_node() argument 395 mtd_set_of_node(&nor->mtd, np); in spi_nor_set_flash_node() 398 static inline struct device_node *spi_nor_get_flash_node(struct spi_nor *nor) in spi_nor_get_flash_node() argument [all …]
|
/kernel/linux/linux-5.10/arch/powerpc/boot/dts/fsl/ |
D | mpc8536ds.dtsi | 13 * * 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 …]
|
D | p1022ds.dtsi | 13 * * 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";
|
D | mpc8544ds.dtsi | 13 * * Neither the name of Freescale Semiconductor nor the 36 nor@0,0 { 46 label = "dtb-nor"; 51 label = "diagnostic-nor"; 57 label = "dink-nor"; 63 label = "kernel-nor"; 68 label = "u-boot-nor";
|
/kernel/linux/linux-5.10/arch/arm64/boot/dts/freescale/ |
D | fsl-ls1088a-qds.dts | 27 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";
|
D | fsl-ls1028a-qds.dts | 117 compatible = "jedec,spi-nor"; 127 compatible = "jedec,spi-nor"; 137 compatible = "jedec,spi-nor"; 152 compatible = "jedec,spi-nor"; 162 compatible = "jedec,spi-nor"; 172 compatible = "jedec,spi-nor"; 187 compatible = "jedec,spi-nor"; 215 compatible = "jedec,spi-nor";
|
D | fsl-lx2160a-qds.dts | 44 compatible = "jedec,spi-nor"; 56 compatible = "jedec,spi-nor"; 68 compatible = "jedec,spi-nor"; 88 compatible = "jedec,spi-nor";
|