Home
last modified time | relevance | path

Searched refs:spinand (Results 1 – 12 of 12) sorted by relevance

/linux-6.12.1/drivers/mtd/nand/spi/
Dcore.c23 static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val) in spinand_read_reg_op() argument
26 spinand->scratchbuf); in spinand_read_reg_op()
29 ret = spi_mem_exec_op(spinand->spimem, &op); in spinand_read_reg_op()
33 *val = *spinand->scratchbuf; in spinand_read_reg_op()
37 int spinand_write_reg_op(struct spinand_device *spinand, u8 reg, u8 val) in spinand_write_reg_op() argument
40 spinand->scratchbuf); in spinand_write_reg_op()
42 *spinand->scratchbuf = val; in spinand_write_reg_op()
43 return spi_mem_exec_op(spinand->spimem, &op); in spinand_write_reg_op()
46 static int spinand_read_status(struct spinand_device *spinand, u8 *status) in spinand_read_status() argument
48 return spinand_read_reg_op(spinand, REG_STATUS, status); in spinand_read_status()
[all …]
Dwinbond.c65 static int w25m02gv_select_target(struct spinand_device *spinand, in w25m02gv_select_target() argument
72 spinand->scratchbuf, in w25m02gv_select_target()
75 *spinand->scratchbuf = target; in w25m02gv_select_target()
76 return spi_mem_exec_op(spinand->spimem, &op); in w25m02gv_select_target()
125 static int w25n02kv_ecc_get_status(struct spinand_device *spinand, in w25n02kv_ecc_get_status() argument
128 struct nand_device *nand = spinand_to_nand(spinand); in w25n02kv_ecc_get_status()
130 struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf); in w25n02kv_ecc_get_status()
146 if (spi_mem_exec_op(spinand->spimem, &op)) in w25n02kv_ecc_get_status()
149 mbf = *(spinand->scratchbuf) >> 4; in w25n02kv_ecc_get_status()
257 static int winbond_spinand_init(struct spinand_device *spinand) in winbond_spinand_init() argument
[all …]
Dmicron.c93 struct spinand_device *spinand = mtd_to_spinand(mtd); in micron_4_ooblayout_ecc() local
95 if (section >= spinand->base.memorg.pagesize / in micron_4_ooblayout_ecc()
108 struct spinand_device *spinand = mtd_to_spinand(mtd); in micron_4_ooblayout_free() local
110 if (section >= spinand->base.memorg.pagesize / in micron_4_ooblayout_free()
131 static int micron_select_target(struct spinand_device *spinand, in micron_select_target() argument
135 spinand->scratchbuf); in micron_select_target()
140 *spinand->scratchbuf = MICRON_SELECT_DIE(target); in micron_select_target()
142 return spi_mem_exec_op(spinand->spimem, &op); in micron_select_target()
145 static int micron_8_ecc_get_status(struct spinand_device *spinand, in micron_8_ecc_get_status() argument
286 static int micron_spinand_init(struct spinand_device *spinand) in micron_spinand_init() argument
[all …]
Dmacronix.c65 static int macronix_get_eccsr(struct spinand_device *spinand, u8 *eccsr) in macronix_get_eccsr() argument
67 struct macronix_priv *priv = spinand->priv; in macronix_get_eccsr()
73 int ret = spi_mem_exec_op(spinand->spimem, &op); in macronix_get_eccsr()
90 static int macronix_ecc_get_status(struct spinand_device *spinand, in macronix_ecc_get_status() argument
93 struct nand_device *nand = spinand_to_nand(spinand); in macronix_ecc_get_status()
109 if (macronix_get_eccsr(spinand, spinand->scratchbuf)) in macronix_ecc_get_status()
112 eccsr = *spinand->scratchbuf; in macronix_ecc_get_status()
124 static int macronix_set_cont_read(struct spinand_device *spinand, bool enable) in macronix_set_cont_read() argument
126 struct macronix_priv *priv = spinand->priv; in macronix_set_cont_read()
129 ret = spinand_upd_cfg(spinand, MACRONIX_CFG_CONT_READ, in macronix_set_cont_read()
[all …]
Dgigadevice.c100 static int gd5fxgq4xa_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4xa_ecc_get_status() argument
184 static int gd5fxgq4uexxg_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4uexxg_ecc_get_status() argument
189 spinand->scratchbuf); in gd5fxgq4uexxg_ecc_get_status()
201 ret = spi_mem_exec_op(spinand->spimem, &op); in gd5fxgq4uexxg_ecc_get_status()
210 status2 = *(spinand->scratchbuf); in gd5fxgq4uexxg_ecc_get_status()
227 static int gd5fxgq5xexxg_ecc_get_status(struct spinand_device *spinand, in gd5fxgq5xexxg_ecc_get_status() argument
232 spinand->scratchbuf); in gd5fxgq5xexxg_ecc_get_status()
244 ret = spi_mem_exec_op(spinand->spimem, &op); in gd5fxgq5xexxg_ecc_get_status()
252 status2 = *(spinand->scratchbuf); in gd5fxgq5xexxg_ecc_get_status()
265 static int gd5fxgq4ufxxg_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4ufxxg_ecc_get_status() argument
DMakefile2 spinand-objs := core.o alliancememory.o ato.o esmt.o foresee.o gigadevice.o macronix.o
3 spinand-objs += micron.o paragon.o toshiba.o winbond.o xtx.o
4 obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
Dtoshiba.c71 static int tx58cxgxsxraix_ecc_get_status(struct spinand_device *spinand, in tx58cxgxsxraix_ecc_get_status() argument
74 struct nand_device *nand = spinand_to_nand(spinand); in tx58cxgxsxraix_ecc_get_status()
76 struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf); in tx58cxgxsxraix_ecc_get_status()
92 if (spi_mem_exec_op(spinand->spimem, &op)) in tx58cxgxsxraix_ecc_get_status()
95 mbf = *(spinand->scratchbuf) >> 4; in tx58cxgxsxraix_ecc_get_status()
Dalliancememory.c95 static int am_ecc_get_status(struct spinand_device *spinand, u8 status) in am_ecc_get_status() argument
106 if (spinand->base.mtd.oobsize == 64) in am_ecc_get_status()
119 if (spinand->base.mtd.oobsize == 64) in am_ecc_get_status()
Dforesee.c52 static int f35sqa002g_ecc_get_status(struct spinand_device *spinand, u8 status) in f35sqa002g_ecc_get_status() argument
54 struct nand_device *nand = spinand_to_nand(spinand); in f35sqa002g_ecc_get_status()
Dxtx.c70 static int xt26g0xa_ecc_get_status(struct spinand_device *spinand, in xt26g0xa_ecc_get_status() argument
123 static int xt26xxxd_ecc_get_status(struct spinand_device *spinand, in xt26xxxd_ecc_get_status() argument
Dparagon.c70 static int pn26g0xa_ecc_get_status(struct spinand_device *spinand, in pn26g0xa_ecc_get_status() argument
/linux-6.12.1/include/linux/mtd/
Dspinand.h241 int (*init)(struct spinand_device *spinand);
242 void (*cleanup)(struct spinand_device *spinand);
309 int (*get_status)(struct spinand_device *spinand, u8 status);
358 int (*select_target)(struct spinand_device *spinand,
360 int (*set_cont_read)(struct spinand_device *spinand,
456 int (*select_target)(struct spinand_device *spinand,
470 int (*set_cont_read)(struct spinand_device *spinand,
491 static inline struct mtd_info *spinand_to_mtd(struct spinand_device *spinand) in spinand_to_mtd() argument
493 return nanddev_to_mtd(&spinand->base); in spinand_to_mtd()
514 spinand_to_nand(struct spinand_device *spinand) in spinand_to_nand() argument
[all …]