/Linux-v5.4/drivers/mtd/nand/spi/ |
D | core.c | 22 static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val) in spinand_read_reg_op() argument 25 spinand->scratchbuf); in spinand_read_reg_op() 28 ret = spi_mem_exec_op(spinand->spimem, &op); in spinand_read_reg_op() 32 *val = *spinand->scratchbuf; in spinand_read_reg_op() 36 static int spinand_write_reg_op(struct spinand_device *spinand, u8 reg, u8 val) in spinand_write_reg_op() argument 39 spinand->scratchbuf); in spinand_write_reg_op() 41 *spinand->scratchbuf = val; in spinand_write_reg_op() 42 return spi_mem_exec_op(spinand->spimem, &op); in spinand_write_reg_op() 45 static int spinand_read_status(struct spinand_device *spinand, u8 *status) in spinand_read_status() argument 47 return spinand_read_reg_op(spinand, REG_STATUS, status); in spinand_read_status() [all …]
|
D | winbond.c | 63 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() 102 static int winbond_spinand_detect(struct spinand_device *spinand) in winbond_spinand_detect() argument 104 u8 *id = spinand->id.data; in winbond_spinand_detect() 114 ret = spinand_match_and_init(spinand, winbond_spinand_table, in winbond_spinand_detect() 122 static int winbond_spinand_init(struct spinand_device *spinand) in winbond_spinand_init() argument 124 struct nand_device *nand = spinand_to_nand(spinand); in winbond_spinand_init() 132 spinand_select_target(spinand, i); in winbond_spinand_init() [all …]
|
D | macronix.c | 52 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() 121 static int macronix_spinand_detect(struct spinand_device *spinand) in macronix_spinand_detect() argument 123 u8 *id = spinand->id.data; in macronix_spinand_detect() 133 ret = spinand_match_and_init(spinand, macronix_spinand_table, in macronix_spinand_detect()
|
D | toshiba.c | 58 static int tc58cxgxsx_ecc_get_status(struct spinand_device *spinand, in tc58cxgxsx_ecc_get_status() argument 61 struct nand_device *nand = spinand_to_nand(spinand); in tc58cxgxsx_ecc_get_status() 79 if (spi_mem_exec_op(spinand->spimem, &op)) in tc58cxgxsx_ecc_get_status() 159 static int toshiba_spinand_detect(struct spinand_device *spinand) in toshiba_spinand_detect() argument 161 u8 *id = spinand->id.data; in toshiba_spinand_detect() 171 ret = spinand_match_and_init(spinand, toshiba_spinand_table, in toshiba_spinand_detect()
|
D | gigadevice.c | 81 static int gd5fxgq4xa_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4xa_ecc_get_status() argument 135 static int gd5fxgq4uexxg_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4uexxg_ecc_get_status() argument 152 ret = spi_mem_exec_op(spinand->spimem, &op); in gd5fxgq4uexxg_ecc_get_status() 177 static int gd5fxgq4ufxxg_ecc_get_status(struct spinand_device *spinand, in gd5fxgq4ufxxg_ecc_get_status() argument 245 static int gigadevice_spinand_detect(struct spinand_device *spinand) in gigadevice_spinand_detect() argument 247 u8 *id = spinand->id.data; in gigadevice_spinand_detect() 263 ret = spinand_match_and_init(spinand, gigadevice_spinand_table, in gigadevice_spinand_detect()
|
D | micron.c | 67 static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand, in mt29f2g01abagd_ecc_get_status() argument 105 static int micron_spinand_detect(struct spinand_device *spinand) in micron_spinand_detect() argument 107 u8 *id = spinand->id.data; in micron_spinand_detect() 117 ret = spinand_match_and_init(spinand, micron_spinand_table, in micron_spinand_detect()
|
D | paragon.c | 70 static int pn26g0xa_ecc_get_status(struct spinand_device *spinand, in pn26g0xa_ecc_get_status() argument 120 static int paragon_spinand_detect(struct spinand_device *spinand) in paragon_spinand_detect() argument 122 u8 *id = spinand->id.data; in paragon_spinand_detect() 130 ret = spinand_match_and_init(spinand, paragon_spinand_table, in paragon_spinand_detect()
|
D | Makefile | 2 spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o 3 obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
|
/Linux-v5.4/include/linux/mtd/ |
D | spinand.h | 209 int (*detect)(struct spinand_device *spinand); 210 int (*init)(struct spinand_device *spinand); 211 void (*cleanup)(struct spinand_device *spinand); 268 int (*get_status)(struct spinand_device *spinand, u8 status); 304 int (*select_target)(struct spinand_device *spinand, 382 int (*select_target)(struct spinand_device *spinand, 413 static inline struct mtd_info *spinand_to_mtd(struct spinand_device *spinand) in spinand_to_mtd() argument 415 return nanddev_to_mtd(&spinand->base); in spinand_to_mtd() 436 spinand_to_nand(struct spinand_device *spinand) in spinand_to_nand() argument 438 return &spinand->base; in spinand_to_nand() [all …]
|