Home
last modified time | relevance | path

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

/Linux-v5.10/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 static 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.c63 static int w25m02gv_select_target(struct spinand_device *spinand, in w25m02gv_select_target() argument
70 spinand->scratchbuf, in w25m02gv_select_target()
73 *spinand->scratchbuf = target; in w25m02gv_select_target()
74 return spi_mem_exec_op(spinand->spimem, &op); in w25m02gv_select_target()
99 static int winbond_spinand_init(struct spinand_device *spinand) in winbond_spinand_init() argument
101 struct nand_device *nand = spinand_to_nand(spinand); in winbond_spinand_init()
109 spinand_select_target(spinand, i); in winbond_spinand_init()
110 spinand_upd_cfg(spinand, WINBOND_CFG_BUF_READ, in winbond_spinand_init()
Dmicron.c77 static int micron_select_target(struct spinand_device *spinand, in micron_select_target() argument
81 spinand->scratchbuf); in micron_select_target()
86 *spinand->scratchbuf = MICRON_SELECT_DIE(target); in micron_select_target()
88 return spi_mem_exec_op(spinand->spimem, &op); in micron_select_target()
91 static int micron_8_ecc_get_status(struct spinand_device *spinand, in micron_8_ecc_get_status() argument
222 static int micron_spinand_init(struct spinand_device *spinand) in micron_spinand_init() argument
229 if (spinand->flags & SPINAND_HAS_CR_FEAT_BIT) in micron_spinand_init()
230 return spinand_upd_cfg(spinand, MICRON_CFG_CR, 0); in micron_spinand_init()
Dmacronix.c52 static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *eccsr) in mx35lf1ge4ab_get_eccsr() argument
59 int ret = spi_mem_exec_op(spinand->spimem, &op); in mx35lf1ge4ab_get_eccsr()
67 static int mx35lf1ge4ab_ecc_get_status(struct spinand_device *spinand, in mx35lf1ge4ab_ecc_get_status() argument
70 struct nand_device *nand = spinand_to_nand(spinand); in mx35lf1ge4ab_ecc_get_status()
86 if (mx35lf1ge4ab_get_eccsr(spinand, &eccsr)) in mx35lf1ge4ab_ecc_get_status()
DMakefile2 spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o
3 obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
Dgigadevice.c81 static int gd5fxgq4xa_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4xa_ecc_get_status() argument
164 static int gd5fxgq4uexxg_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4uexxg_ecc_get_status() argument
181 ret = spi_mem_exec_op(spinand->spimem, &op); in gd5fxgq4uexxg_ecc_get_status()
206 static int gd5fxgq4ufxxg_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4ufxxg_ecc_get_status() argument
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()
92 if (spi_mem_exec_op(spinand->spimem, &op)) in tx58cxgxsxraix_ecc_get_status()
Dparagon.c70 static int pn26g0xa_ecc_get_status(struct spinand_device *spinand, in pn26g0xa_ecc_get_status() argument
/Linux-v5.10/include/linux/mtd/
Dspinand.h219 int (*init)(struct spinand_device *spinand);
220 void (*cleanup)(struct spinand_device *spinand);
282 int (*get_status)(struct spinand_device *spinand, u8 status);
319 int (*select_target)(struct spinand_device *spinand,
404 int (*select_target)(struct spinand_device *spinand,
435 static inline struct mtd_info *spinand_to_mtd(struct spinand_device *spinand) in spinand_to_mtd() argument
437 return nanddev_to_mtd(&spinand->base); in spinand_to_mtd()
458 spinand_to_nand(struct spinand_device *spinand) in spinand_to_nand() argument
460 return &spinand->base; in spinand_to_nand()
470 static inline void spinand_set_of_node(struct spinand_device *spinand, in spinand_set_of_node() argument
[all …]