| /OK3568_Linux_fs/kernel/include/linux/mtd/ |
| H A D | nand.h | 238 int (*erase)(struct nand_device *nand, const struct nand_pos *pos); 239 int (*markbad)(struct nand_device *nand, const struct nand_pos *pos); 240 bool (*isbad)(struct nand_device *nand, const struct nand_pos *pos); 268 int (*init_ctx)(struct nand_device *nand); 269 void (*cleanup_ctx)(struct nand_device *nand); 270 int (*prepare_io_req)(struct nand_device *nand, 272 int (*finish_io_req)(struct nand_device *nand, 284 void of_get_nand_ecc_user_config(struct nand_device *nand); 285 int nand_ecc_init_ctx(struct nand_device *nand); 286 void nand_ecc_cleanup_ctx(struct nand_device *nand); [all …]
|
| /OK3568_Linux_fs/u-boot/include/linux/mtd/ |
| H A D | nand.h | 163 int (*erase)(struct nand_device *nand, const struct nand_pos *pos); 164 int (*markbad)(struct nand_device *nand, const struct nand_pos *pos); 165 bool (*isbad)(struct nand_device *nand, const struct nand_pos *pos); 231 static inline struct mtd_info *nanddev_to_mtd(struct nand_device *nand) in nanddev_to_mtd() argument 233 return nand->mtd; in nanddev_to_mtd() 242 static inline unsigned int nanddev_bits_per_cell(const struct nand_device *nand) in nanddev_bits_per_cell() argument 244 return nand->memorg.bits_per_cell; in nanddev_bits_per_cell() 253 static inline size_t nanddev_page_size(const struct nand_device *nand) in nanddev_page_size() argument 255 return nand->memorg.pagesize; in nanddev_page_size() 265 nanddev_per_page_oobsize(const struct nand_device *nand) in nanddev_per_page_oobsize() argument [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/nand/ |
| H A D | core.c | 22 bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos) in nanddev_isbad() argument 24 if (nanddev_bbt_is_initialized(nand)) { in nanddev_isbad() 28 entry = nanddev_bbt_pos_to_entry(nand, pos); in nanddev_isbad() 29 status = nanddev_bbt_get_block_status(nand, entry); in nanddev_isbad() 32 if (nand->ops->isbad(nand, pos)) in nanddev_isbad() 37 nanddev_bbt_set_block_status(nand, entry, status); in nanddev_isbad() 47 return nand->ops->isbad(nand, pos); in nanddev_isbad() 61 int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos) in nanddev_markbad() argument 63 struct mtd_info *mtd = nanddev_to_mtd(nand); in nanddev_markbad() 67 if (nanddev_isbad(nand, pos)) in nanddev_markbad() [all …]
|
| H A D | bbt_store.c | 23 static int nanddev_read_bbt(struct nand_device *nand, u32 block, bool update) in nanddev_read_bbt() argument 26 unsigned int nblocks = nanddev_neraseblocks(nand); in nanddev_read_bbt() 28 BITS_PER_LONG) * sizeof(*nand->bbt.cache); in nanddev_read_bbt() 29 struct mtd_info *mtd = nanddev_to_mtd(nand); in nanddev_read_bbt() 37 if (!nand->bbt.cache) in nanddev_read_bbt() 80 if (update && version > nand->bbt.version) { in nanddev_read_bbt() 81 memcpy(nand->bbt.cache, data_buf, nbytes); in nanddev_read_bbt() 82 nand->bbt.version = version; in nanddev_read_bbt() 92 static int nanddev_write_bbt(struct nand_device *nand, u32 block) in nanddev_write_bbt() argument 95 unsigned int nblocks = nanddev_neraseblocks(nand); in nanddev_write_bbt() [all …]
|
| H A D | ecc.c | 105 int nand_ecc_init_ctx(struct nand_device *nand) in nand_ecc_init_ctx() argument 107 if (!nand->ecc.engine->ops->init_ctx) in nand_ecc_init_ctx() 110 return nand->ecc.engine->ops->init_ctx(nand); in nand_ecc_init_ctx() 118 void nand_ecc_cleanup_ctx(struct nand_device *nand) in nand_ecc_cleanup_ctx() argument 120 if (nand->ecc.engine->ops->cleanup_ctx) in nand_ecc_cleanup_ctx() 121 nand->ecc.engine->ops->cleanup_ctx(nand); in nand_ecc_cleanup_ctx() 130 int nand_ecc_prepare_io_req(struct nand_device *nand, in nand_ecc_prepare_io_req() argument 133 if (!nand->ecc.engine->ops->prepare_io_req) in nand_ecc_prepare_io_req() 136 return nand->ecc.engine->ops->prepare_io_req(nand, req); in nand_ecc_prepare_io_req() 145 int nand_ecc_finish_io_req(struct nand_device *nand, in nand_ecc_finish_io_req() argument [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/nand/raw/ |
| H A D | nand_base.su | |
| H A D | omap_gpmc.c | 180 struct nand_chip *nand = mtd_to_nand(mtd); in omap_enable_hwecc() local 181 struct omap_nand_info *info = nand_get_controller_data(nand); in omap_enable_hwecc() 182 unsigned int dev_width = (nand->options & NAND_BUSWIDTH_16) ? 1 : 0; in omap_enable_hwecc() 712 static int omap_select_ecc_scheme(struct nand_chip *nand, in omap_select_ecc_scheme() argument 714 struct omap_nand_info *info = nand_get_controller_data(nand); in omap_select_ecc_scheme() 725 nand->ecc.mode = NAND_ECC_SOFT; in omap_select_ecc_scheme() 726 nand->ecc.layout = NULL; in omap_select_ecc_scheme() 727 nand->ecc.size = 0; in omap_select_ecc_scheme() 740 memset(&nand->ecc, 0, sizeof(struct nand_ecc_ctrl)); in omap_select_ecc_scheme() 741 nand->ecc.mode = NAND_ECC_HW; in omap_select_ecc_scheme() [all …]
|
| H A D | rockchip_nand_v9.su | |
| H A D | mxs_nand.c | 268 struct nand_chip *nand = mtd_to_nand(mtd); in mxs_nand_cmd_ctrl() local 269 struct mxs_nand_info *nand_info = nand_get_controller_data(nand); in mxs_nand_cmd_ctrl() 362 struct nand_chip *nand = mtd_to_nand(mtd); in mxs_nand_select_chip() local 363 struct mxs_nand_info *nand_info = nand_get_controller_data(nand); in mxs_nand_select_chip() 409 struct nand_chip *nand = mtd_to_nand(mtd); in mxs_nand_read_buf() local 410 struct mxs_nand_info *nand_info = nand_get_controller_data(nand); in mxs_nand_read_buf() 493 struct nand_chip *nand = mtd_to_nand(mtd); in mxs_nand_write_buf() local 494 struct mxs_nand_info *nand_info = nand_get_controller_data(nand); in mxs_nand_write_buf() 554 static int mxs_nand_ecc_read_page(struct mtd_info *mtd, struct nand_chip *nand, in mxs_nand_ecc_read_page() argument 558 struct mxs_nand_info *nand_info = nand_get_controller_data(nand); in mxs_nand_ecc_read_page() [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/nand/ |
| H A D | core.c | 24 bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos) in nanddev_isbad() argument 26 if (nanddev_bbt_is_initialized(nand)) { in nanddev_isbad() 30 entry = nanddev_bbt_pos_to_entry(nand, pos); in nanddev_isbad() 31 status = nanddev_bbt_get_block_status(nand, entry); in nanddev_isbad() 34 if (nand->ops->isbad(nand, pos)) in nanddev_isbad() 39 nanddev_bbt_set_block_status(nand, entry, status); in nanddev_isbad() 49 return nand->ops->isbad(nand, pos); in nanddev_isbad() 63 int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos) in nanddev_markbad() argument 65 struct mtd_info *mtd = nanddev_to_mtd(nand); in nanddev_markbad() 69 if (nanddev_isbad(nand, pos)) in nanddev_markbad() [all …]
|
| H A D | bbt.c | 43 static int nanddev_read_bbt(struct nand_device *nand, u32 block, bool update) in nanddev_read_bbt() argument 46 unsigned int nblocks = nanddev_neraseblocks(nand); in nanddev_read_bbt() 48 BITS_PER_LONG) * sizeof(*nand->bbt.cache); in nanddev_read_bbt() 49 struct mtd_info *mtd = nanddev_to_mtd(nand); in nanddev_read_bbt() 57 if (!nand->bbt.cache) in nanddev_read_bbt() 101 if (update && version > nand->bbt.version) { in nanddev_read_bbt() 102 memcpy(nand->bbt.cache, data_buf, nbytes); in nanddev_read_bbt() 103 nand->bbt.version = version; in nanddev_read_bbt() 113 static int nanddev_write_bbt(struct nand_device *nand, u32 block) in nanddev_write_bbt() argument 116 unsigned int nblocks = nanddev_neraseblocks(nand); in nanddev_write_bbt() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/nand/raw/ |
| H A D | meson_nand.c | 109 struct nand_chip nand; member 217 static struct meson_nfc_nand_chip *to_meson_nand(struct nand_chip *nand) in to_meson_nand() argument 219 return container_of(nand, struct meson_nfc_nand_chip, nand); in to_meson_nand() 222 static void meson_nfc_select_chip(struct nand_chip *nand, int chip) in meson_nfc_select_chip() argument 224 struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); in meson_nfc_select_chip() 225 struct meson_nfc *nfc = nand_get_controller_data(nand); in meson_nfc_select_chip() 265 static void meson_nfc_cmd_access(struct nand_chip *nand, int raw, bool dir, in meson_nfc_cmd_access() argument 268 struct mtd_info *mtd = nand_to_mtd(nand); in meson_nfc_cmd_access() 270 struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); in meson_nfc_cmd_access() 274 pagesize = nand->ecc.size; in meson_nfc_cmd_access() [all …]
|
| H A D | sunxi_nand.c | 193 struct nand_chip nand; member 201 static inline struct sunxi_nand_chip *to_sunxi_nand(struct nand_chip *nand) in to_sunxi_nand() argument 203 return container_of(nand, struct sunxi_nand_chip, nand); in to_sunxi_nand() 405 static void sunxi_nfc_select_chip(struct nand_chip *nand, unsigned int cs) in sunxi_nfc_select_chip() argument 407 struct mtd_info *mtd = nand_to_mtd(nand); in sunxi_nfc_select_chip() 408 struct sunxi_nand_chip *sunxi_nand = to_sunxi_nand(nand); in sunxi_nfc_select_chip() 409 struct sunxi_nfc *nfc = to_sunxi_nfc(sunxi_nand->nand.controller); in sunxi_nfc_select_chip() 420 ctl |= NFC_CE_SEL(sel->cs) | NFC_EN | NFC_PAGE_SHIFT(nand->page_shift); in sunxi_nfc_select_chip() 436 static void sunxi_nfc_read_buf(struct nand_chip *nand, uint8_t *buf, int len) in sunxi_nfc_read_buf() argument 438 struct sunxi_nand_chip *sunxi_nand = to_sunxi_nand(nand); in sunxi_nfc_read_buf() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/rkflash/ |
| H A D | sfc_nand_mtd_bbt.c | 42 static int nanddev_read_bbt(struct snand_mtd_dev *nand, u32 block, bool update) in nanddev_read_bbt() argument 45 unsigned int nblocks = snanddev_neraseblocks(nand); in nanddev_read_bbt() 47 BITS_PER_LONG) * sizeof(*nand->bbt.cache); in nanddev_read_bbt() 48 struct mtd_info *mtd = snanddev_to_mtd(nand); in nanddev_read_bbt() 57 if (!nand->bbt.cache) in nanddev_read_bbt() 114 if (update && version > nand->bbt.version) { in nanddev_read_bbt() 115 memcpy(nand->bbt.cache, data_buf, nbytes); in nanddev_read_bbt() 116 nand->bbt.version = version; in nanddev_read_bbt() 126 static int nanddev_write_bbt(struct snand_mtd_dev *nand, u32 block) in nanddev_write_bbt() argument 129 unsigned int nblocks = snanddev_neraseblocks(nand); in nanddev_write_bbt() [all …]
|
| H A D | sfc_nand_mtd.c | 229 struct snand_mtd_dev *nand = mtd_to_snanddev(mtd); in sfc_erase_mtd() local 243 ret = snanddev_bbt_get_block_status(nand, addr >> mtd->erasesize_shift); in sfc_erase_mtd() 348 struct snand_mtd_dev *nand = kzalloc(sizeof(*nand), GFP_KERNEL); in sfc_nand_mtd_init() local 350 if (!nand) { in sfc_nand_mtd_init() 355 nand->snand = p_dev; in sfc_nand_mtd_init() 357 nand->mtd.name = "spi-nand0"; in sfc_nand_mtd_init() 358 nand->mtd.type = MTD_NANDFLASH; in sfc_nand_mtd_init() 359 nand->mtd.writesize = p_dev->page_size * SFC_NAND_SECTOR_SIZE; in sfc_nand_mtd_init() 360 nand->mtd.flags = MTD_CAP_NANDFLASH; in sfc_nand_mtd_init() 361 nand->mtd.size = capacity; in sfc_nand_mtd_init() [all …]
|
| /OK3568_Linux_fs/u-boot/spl/drivers/mtd/nand/spi/ |
| H A D | core.su | |
| H A D | .built-in.o.cmd | |
| /OK3568_Linux_fs/u-boot/drivers/mtd/nand/spi/ |
| H A D | core.su | |
| H A D | .built-in.o.cmd | |
| H A D | core.c | 37 struct nand_device *nand = spinand_to_nand(spinand); in spinand_cache_op_adjust_colum() local 40 if (nand->memorg.planes_per_lun < 2) in spinand_cache_op_adjust_colum() 44 shift = fls(nand->memorg.pagesize); in spinand_cache_op_adjust_colum() 78 struct nand_device *nand = spinand_to_nand(spinand); in spinand_get_cfg() local 81 spinand->cur_target >= nand->memorg.ntargets)) in spinand_get_cfg() 90 struct nand_device *nand = spinand_to_nand(spinand); in spinand_set_cfg() local 94 spinand->cur_target >= nand->memorg.ntargets)) in spinand_set_cfg() 144 struct nand_device *nand = spinand_to_nand(spinand); in spinand_select_target() local 147 if (WARN_ON(target >= nand->memorg.ntargets)) in spinand_select_target() 153 if (nand->memorg.ntargets == 1) { in spinand_select_target() [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mtd/ |
| H A D | marvell-nand.txt | 5 * "marvell,armada-8k-nand-controller" 6 * "marvell,armada370-nand-controller" 7 * "marvell,pxa3xx-nand-controller" 8 * "marvell,armada-8k-nand" (deprecated) 9 * "marvell,armada370-nand" (deprecated) 10 * "marvell,pxa3xx-nand" (deprecated) 23 "marvell,armada-8k-nand[-controller]" compatibles). 28 This property is only used with "marvell,pxa3xx-nand[-controller]" 31 This property is only used with "marvell,pxa3xx-nand[-controller]" 39 - nand-rb: see nand-controller.yaml (0-1). [all …]
|
| H A D | nvidia-tegra20-nand.txt | 5 - "nvidia,tegra20-nand" 11 - nand 15 - nand 25 - nand-ecc-mode: String, operation mode of the NAND ecc mode. Currently only 27 - nand-ecc-algo: string, algorithm of NAND ECC. 29 - nand-bus-width : See nand-controller.yaml 30 - nand-on-flash-bbt: See nand-controller.yaml 31 - nand-ecc-strength: integer representing the number of bits to correct 36 - nand-ecc-maximize: See nand-controller.yaml 37 - nand-is-boot-medium: Makes sure only ECC strengths supported by the boot ROM [all …]
|
| H A D | samsung-s3c2410.txt | 5 "samsung,s3c2410-nand" 6 "samsung,s3c2412-nand" 7 "samsung,s3c2440-nand" 9 - #address-cells, #size-cells : see nand-controller.yaml 10 - clocks : phandle to the nand controller clock 11 - clock-names : must contain "nand" 14 Child nodes representing the available nand chips. 17 - nand-ecc-mode : see nand-controller.yaml 18 - nand-on-flash-bbt : see nand-controller.yaml 26 nand-controller@4e000000 { [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/nand/spi/ |
| H A D | core.c | 54 struct nand_device *nand = spinand_to_nand(spinand); in spinand_get_cfg() local 57 spinand->cur_target >= nand->memorg.ntargets)) in spinand_get_cfg() 66 struct nand_device *nand = spinand_to_nand(spinand); in spinand_set_cfg() local 70 spinand->cur_target >= nand->memorg.ntargets)) in spinand_set_cfg() 120 struct nand_device *nand = spinand_to_nand(spinand); in spinand_select_target() local 123 if (WARN_ON(target >= nand->memorg.ntargets)) in spinand_select_target() 129 if (nand->memorg.ntargets == 1) { in spinand_select_target() 144 struct nand_device *nand = spinand_to_nand(spinand); in spinand_init_cfg_cache() local 150 nand->memorg.ntargets, in spinand_init_cfg_cache() 156 for (target = 0; target < nand->memorg.ntargets; target++) { in spinand_init_cfg_cache() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/nand/raw/atmel/ |
| H A D | nand-controller.c | 201 struct atmel_nand *nand); 203 int (*setup_interface)(struct atmel_nand *nand, int csline, 205 int (*exec_op)(struct atmel_nand *nand, 471 static void atmel_nand_data_in(struct atmel_nand *nand, void *buf, in atmel_nand_data_in() argument 476 nc = to_nand_controller(nand->base.controller); in atmel_nand_data_in() 485 !atmel_nand_dma_transfer(nc, buf, nand->activecs->io.dma, len, in atmel_nand_data_in() 489 if ((nand->base.options & NAND_BUSWIDTH_16) && !force_8bit) in atmel_nand_data_in() 490 ioread16_rep(nand->activecs->io.virt, buf, len / 2); in atmel_nand_data_in() 492 ioread8_rep(nand->activecs->io.virt, buf, len); in atmel_nand_data_in() 495 static void atmel_nand_data_out(struct atmel_nand *nand, const void *buf, in atmel_nand_data_out() argument [all …]
|