| /linux/drivers/mtd/spi-nor/ |
| A D | core.c | 183 return nor->controller_ops->erase(nor, offs); in spi_nor_controller_ops_erase() 698 ret = nor->params->ready(nor); in spi_nor_ready() 1188 ret = nor->controller_ops->prepare(nor); in spi_nor_prep() 1196 nor->controller_ops->unprepare(nor); in spi_nor_unprep() 1495 nor->bouncebuf, nor->addr_nbytes); in spi_nor_erase_sector() 2673 nor->info->fixups->default_init(nor); in spi_nor_manufacturer_init_params() 2993 nor->params = devm_kzalloc(nor->dev, sizeof(*nor->params), GFP_KERNEL); in spi_nor_init_params() 3068 return nor->params->quad_enable(nor); in spi_nor_quad_enable() 3539 nor->dirmap.rdesc = devm_spi_mem_dirmap_create(nor->dev, nor->spimem, in spi_nor_create_read_dirmap() 3568 nor->dirmap.wdesc = devm_spi_mem_dirmap_create(nor->dev, nor->spimem, in spi_nor_create_write_dirmap() [all …]
|
| A D | otp.c | 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 47 rdesc = nor->dirmap.rdesc; in spi_nor_otp_read_secr() 50 nor->read_dummy = 8; in spi_nor_otp_read_secr() 52 nor->dirmap.rdesc = NULL; in spi_nor_otp_read_secr() 60 nor->dirmap.rdesc = rdesc; in spi_nor_otp_read_secr() 94 wdesc = nor->dirmap.wdesc; in spi_nor_otp_write_secr() 98 nor->dirmap.wdesc = NULL; in spi_nor_otp_write_secr() 177 u8 *cr = nor->bouncebuf; in spi_nor_otp_lock_sr2() 209 u8 *cr = nor->bouncebuf; in spi_nor_otp_is_locked_sr2() [all …]
|
| A D | spansion.c | 88 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in spansion_nor_clear_sr() 113 ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); in cypress_nor_sr_ready_and_clear_reg() 171 ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); in cypress_nor_set_memlat() 225 ret = spi_nor_read_id(nor, nor->addr_nbytes, 3, buf, in cypress_nor_octal_dtr_en() 293 ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); in cypress_nor_quad_enable_volatile_reg() 315 ret = spi_nor_read_any_reg(nor, &op, nor->reg_proto); in cypress_nor_quad_enable_volatile_reg() 380 ret = spi_nor_read_sr(nor, &nor->bouncebuf[1]); in cypress_nor_determine_addr_mode_by_sr1() 388 is3byte = (nor->bouncebuf[0] == nor->bouncebuf[1]); in cypress_nor_determine_addr_mode_by_sr1() 397 is4byte = (nor->bouncebuf[0] == nor->bouncebuf[1]); in cypress_nor_determine_addr_mode_by_sr1() 1022 ret = spi_nor_read_sr(nor, nor->bouncebuf); in spansion_nor_sr_ready_and_clear() [all …]
|
| A D | swp.c | 20 if (nor->flags & SNOR_F_HAS_4BIT_BP) in spi_nor_get_sr_bp_mask() 58 struct mtd_info *mtd = &nor->mtd; in spi_nor_get_locked_range_sr() 170 ret = spi_nor_read_sr(nor, nor->bouncebuf); in spi_nor_sr_lock() 174 status_old = nor->bouncebuf[0]; in spi_nor_sr_lock() 260 ret = spi_nor_read_sr(nor, nor->bouncebuf); in spi_nor_sr_unlock() 337 ret = spi_nor_read_sr(nor, nor->bouncebuf); in spi_nor_sr_is_locked() 341 return spi_nor_is_locked_sr(nor, ofs, len, nor->bouncebuf[0]); in spi_nor_sr_is_locked() 364 ret = nor->params->locking_ops->lock(nor, ofs, len); in spi_nor_lock() 379 ret = nor->params->locking_ops->unlock(nor, ofs, len); in spi_nor_unlock() 394 ret = nor->params->locking_ops->is_locked(nor, ofs, len); in spi_nor_is_locked() [all …]
|
| A D | micron-st.c | 54 u8 *buf = nor->bouncebuf; in micron_st_nor_octal_dtr_en() 63 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en() 71 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en() 82 if (memcmp(buf, nor->info->id->bytes, nor->info->id->len)) in micron_st_nor_octal_dtr_en() 118 if (memcmp(buf, nor->info->id->bytes, nor->info->id->len)) in micron_st_nor_octal_dtr_dis() 515 if (nor->spimem) { in micron_st_nor_read_fsr() 528 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in micron_st_nor_read_fsr() 550 if (nor->spimem) { in micron_st_nor_clear_fsr() 553 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in micron_st_nor_clear_fsr() 581 ret = micron_st_nor_read_fsr(nor, nor->bouncebuf); in micron_st_nor_ready() [all …]
|
| A D | core.h | 319 int (*erase)(struct spi_nor *nor, loff_t addr); 397 int (*quad_enable)(struct spi_nor *nor); 399 int (*ready)(struct spi_nor *nor); 424 void (*default_init)(struct spi_nor *nor); 425 int (*post_bfpt)(struct spi_nor *nor, 428 int (*post_sfdp)(struct spi_nor *nor); 429 int (*late_init)(struct spi_nor *nor); 602 int spi_nor_write_enable(struct spi_nor *nor); 619 int spi_nor_sr_ready(struct spi_nor *nor); 674 int spi_nor_parse_sfdp(struct spi_nor *nor); [all …]
|
| A D | atmel.c | 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() 51 static int at25fs_nor_late_init(struct spi_nor *nor) in at25fs_nor_late_init() argument 78 if (ofs || len != nor->params->size) in atmel_nor_set_global_protection() 81 ret = spi_nor_read_sr(nor, nor->bouncebuf); in atmel_nor_set_global_protection() 85 sr = nor->bouncebuf[0]; in atmel_nor_set_global_protection() 90 ret = spi_nor_write_sr_and_check(nor, sr); in atmel_nor_set_global_protection() 111 nor->bouncebuf[0] = sr; in atmel_nor_set_global_protection() 118 return spi_nor_write_sr(nor, nor->bouncebuf, 1); in atmel_nor_set_global_protection() 136 if (ofs >= nor->params->size || (ofs + len) > nor->params->size) in atmel_nor_is_global_protected() [all …]
|
| A D | sst.c | 29 ret = spi_nor_read_cr(nor, nor->bouncebuf); in sst26vf_nor_unlock() 176 nor->program_opcode = op; in sst_nor_write_data() 194 ret = spi_nor_prep_and_lock(nor); in sst_nor_write() 198 ret = spi_nor_write_enable(nor); in sst_nor_write() 202 nor->sst_write_second = false; in sst_nor_write() 223 nor->sst_write_second = true; in sst_nor_write() 225 nor->sst_write_second = false; in sst_nor_write() 227 ret = spi_nor_write_disable(nor); in sst_nor_write() 237 ret = spi_nor_write_enable(nor); in sst_nor_write() 251 spi_nor_unlock_and_unprep(nor); in sst_nor_write() [all …]
|
| A D | sfdp.c | 193 nor->addr_nbytes = 3; in spi_nor_read_sfdp() 194 nor->read_dummy = 8; in spi_nor_read_sfdp() 711 return nor->read_dummy; in spi_nor_smpt_read_dummy() 750 nor->addr_nbytes = spi_nor_smpt_addr_nbytes(nor, smpt[i]); in spi_nor_get_map_in_use() 751 nor->read_dummy = spi_nor_smpt_read_dummy(nor, smpt[i]); in spi_nor_get_map_in_use() 1211 dev_dbg(nor->dev, in spi_nor_parse_profile1() 1356 if (nor->manufacturer && nor->manufacturer->fixups && in spi_nor_post_sfdp_fixups() 1358 ret = nor->manufacturer->fixups->post_sfdp(nor); in spi_nor_post_sfdp_fixups() 1363 if (nor->info->fixups && nor->info->fixups->post_sfdp) in spi_nor_post_sfdp_fixups() 1364 return nor->info->fixups->post_sfdp(nor); in spi_nor_post_sfdp_fixups() [all …]
|
| A D | Makefile | 4 spi-nor-objs += atmel.o 5 spi-nor-objs += eon.o 6 spi-nor-objs += esmt.o 7 spi-nor-objs += everspin.o 9 spi-nor-objs += intel.o 10 spi-nor-objs += issi.o 11 spi-nor-objs += macronix.o 13 spi-nor-objs += spansion.o 14 spi-nor-objs += sst.o 15 spi-nor-objs += winbond.o [all …]
|
| A D | sysfs.c | 15 struct spi_nor *nor = spi_mem_get_drvdata(spimem); in manufacturer_show() local 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 38 const u8 *id = nor->info->id ? nor->info->id->bytes : nor->id; in jedec_id_show() 39 u8 id_len = nor->info->id ? nor->info->id->len : SPI_NOR_MAX_ID_LEN; in jedec_id_show() 58 struct spi_nor *nor = spi_mem_get_drvdata(spimem); in sfdp_read() local 59 struct sfdp *sfdp = nor->sfdp; in sfdp_read() 77 struct spi_nor *nor = spi_mem_get_drvdata(spimem); in spi_nor_sysfs_is_visible() local 83 if (attr == &dev_attr_jedec_id.attr && !nor->info->id && !nor->id) in spi_nor_sysfs_is_visible() [all …]
|
| A D | debugfs.c | 78 struct spi_nor *nor = s->private; in spi_nor_params_show() local 82 const struct flash_info *info = nor->info; in spi_nor_params_show() 104 switch (nor->cmd_ext_type) { in spi_nor_params_show() 122 spi_nor_protocol_name(nor->read_proto)); in spi_nor_params_show() 126 spi_nor_protocol_name(nor->reg_proto)); in spi_nor_params_show() 184 struct spi_nor *nor = s->private; in spi_nor_capabilities_show() local 224 struct spi_nor *nor = data; in spi_nor_debugfs_unregister() local 226 debugfs_remove(nor->debugfs_root); in spi_nor_debugfs_unregister() 227 nor->debugfs_root = NULL; in spi_nor_debugfs_unregister() 240 ret = devm_add_action(nor->dev, spi_nor_debugfs_unregister, nor); in spi_nor_debugfs_register() [all …]
|
| A D | winbond.c | 21 w25q128_post_bfpt_fixups(struct spi_nor *nor, in w25q128_post_bfpt_fixups() argument 32 nor->params->size == SZ_2M && in w25q128_post_bfpt_fixups() 34 nor->params->size = SZ_16M; in w25q128_post_bfpt_fixups() 60 nor->flags |= SNOR_F_4B_OPCODES; in w25q256_post_bfpt_fixups() 271 nor->bouncebuf[0] = ear; in winbond_nor_write_ear() 273 if (nor->spimem) { in winbond_nor_write_ear() 276 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in winbond_nor_write_ear() 282 nor->bouncebuf, 1); in winbond_nor_write_ear() 313 ret = spi_nor_write_enable(nor); in winbond_nor_set_4byte_addr_mode() 317 ret = winbond_nor_write_ear(nor, 0); in winbond_nor_set_4byte_addr_mode() [all …]
|
| A D | issi.c | 12 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 int 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() 132 static void issi_nor_default_init(struct spi_nor *nor) in issi_nor_default_init() argument 134 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; in issi_nor_default_init()
|
| A D | macronix.c | 12 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() 188 static void macronix_nor_default_init(struct spi_nor *nor) in macronix_nor_default_init() argument 190 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; in macronix_nor_default_init() 193 static int macronix_nor_late_init(struct spi_nor *nor) in macronix_nor_late_init() argument 195 if (!nor->params->set_4byte_addr_mode) in macronix_nor_late_init() 196 nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode_en4b_ex4b; in macronix_nor_late_init()
|
| /linux/drivers/mtd/spi-nor/controllers/ |
| A D | hisi-sfc.c | 149 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_prep() 172 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_unprep() 182 struct hifmc_priv *priv = nor->priv; in hisi_spi_nor_op_reg() 337 struct spi_nor *nor; in hisi_spi_nor_register() local 342 nor = devm_kzalloc(dev, sizeof(*nor), GFP_KERNEL); in hisi_spi_nor_register() 343 if (!nor) in hisi_spi_nor_register() 346 nor->dev = dev; in hisi_spi_nor_register() 347 spi_nor_set_flash_node(nor, np); in hisi_spi_nor_register() 368 nor->priv = priv; in hisi_spi_nor_register() 375 mtd = &nor->mtd; in hisi_spi_nor_register() [all …]
|
| A D | nxp-spifi.c | 58 struct spi_nor nor; member 128 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read_reg() 151 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_write_reg() 175 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_read() 190 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_write() 220 struct nxp_spifi *spifi = nor->priv; in nxp_spifi_erase() 240 switch (spifi->nor.read_proto) { in nxp_spifi_setup_memory_cmd() 254 if (spifi->nor.addr_nbytes < 1 || spifi->nor.addr_nbytes > 4) in nxp_spifi_setup_memory_cmd() 267 nor->controller_ops->read_reg(nor, SPINOR_OP_RDID, id, in nxp_spifi_dummy_id_read() 342 spifi->nor.dev = spifi->dev; in nxp_spifi_setup_flash() [all …]
|
| /linux/Documentation/devicetree/bindings/spi/ |
| A D | 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 38 - const: mediatek,mt8173-nor [all …]
|
| A D | cdns,xspi.yaml | 21 - cdns,xspi-nor 22 - marvell,cn10-xspi-nor 55 - marvell,cn10-xspi-nor 81 compatible = "cdns,xspi-nor"; 90 compatible = "jedec,spi-nor"; 96 compatible = "jedec,spi-nor";
|
| /linux/Documentation/devicetree/bindings/mtd/ |
| A 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"; 21 compatible = "jedec,spi-nor";
|
| /linux/include/linux/mtd/ |
| A D | spi-nor.h | 306 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); 425 static inline void spi_nor_set_flash_node(struct spi_nor *nor, in spi_nor_set_flash_node() argument 428 mtd_set_of_node(&nor->mtd, np); in spi_nor_set_flash_node() 433 return mtd_get_of_node(&nor->mtd); in spi_nor_get_flash_node() [all …]
|
| /linux/arch/powerpc/boot/dts/fsl/ |
| A 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 …]
|
| A 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";
|
| /linux/arch/arm64/boot/dts/freescale/ |
| A D | fsl-ls1088a-qds.dts | 27 compatible = "jedec,spi-nor"; 35 compatible = "jedec,spi-nor"; 45 compatible = "jedec,spi-nor"; 150 compatible = "jedec,spi-nor"; 160 compatible = "jedec,spi-nor";
|
| A D | fsl-ls1028a-qds.dts | 152 compatible = "jedec,spi-nor"; 162 compatible = "jedec,spi-nor"; 172 compatible = "jedec,spi-nor"; 187 compatible = "jedec,spi-nor"; 197 compatible = "jedec,spi-nor"; 207 compatible = "jedec,spi-nor"; 222 compatible = "jedec,spi-nor"; 260 compatible = "jedec,spi-nor";
|