/linux-6.6.21/drivers/mtd/nand/spi/ |
D | core.c | 23 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 …]
|
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() 106 static int w25n02kv_ecc_get_status(struct spinand_device *spinand, in w25n02kv_ecc_get_status() argument 109 struct nand_device *nand = spinand_to_nand(spinand); in w25n02kv_ecc_get_status() 111 struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf); in w25n02kv_ecc_get_status() 126 if (spi_mem_exec_op(spinand->spimem, &op)) in w25n02kv_ecc_get_status() 129 mbf = *(spinand->scratchbuf) >> 4; in w25n02kv_ecc_get_status() 174 static int winbond_spinand_init(struct spinand_device *spinand) in winbond_spinand_init() argument [all …]
|
D | micron.c | 93 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 …]
|
D | gigadevice.c | 100 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
|
D | Makefile | 2 spinand-objs := core.o alliancememory.o ato.o esmt.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
|
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, spinand->scratchbuf)) in mx35lf1ge4ab_ecc_get_status() 89 eccsr = *spinand->scratchbuf; in mx35lf1ge4ab_ecc_get_status()
|
D | toshiba.c | 71 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()
|
D | alliancememory.c | 95 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()
|
D | paragon.c | 70 static int pn26g0xa_ecc_get_status(struct spinand_device *spinand, in pn26g0xa_ecc_get_status() argument
|
D | xtx.c | 63 static int xt26g0xa_ecc_get_status(struct spinand_device *spinand, in xt26g0xa_ecc_get_status() argument
|
/linux-6.6.21/include/linux/mtd/ |
D | spinand.h | 241 int (*init)(struct spinand_device *spinand); 242 void (*cleanup)(struct spinand_device *spinand); 308 int (*get_status)(struct spinand_device *spinand, u8 status); 354 int (*select_target)(struct spinand_device *spinand, 441 int (*select_target)(struct spinand_device *spinand, 472 static inline struct mtd_info *spinand_to_mtd(struct spinand_device *spinand) in spinand_to_mtd() argument 474 return nanddev_to_mtd(&spinand->base); in spinand_to_mtd() 495 spinand_to_nand(struct spinand_device *spinand) in spinand_to_nand() argument 497 return &spinand->base; in spinand_to_nand() 507 static inline void spinand_set_of_node(struct spinand_device *spinand, in spinand_set_of_node() argument [all …]
|