/drivers/mtd/nand/ |
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 …]
|
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 …]
|
D | bbt.c | 23 int nanddev_bbt_init(struct nand_device *nand) in nanddev_bbt_init() argument 26 unsigned int nblocks = nanddev_neraseblocks(nand); in nanddev_bbt_init() 30 nand->bbt.cache = kcalloc(nwords, sizeof(*nand->bbt.cache), in nanddev_bbt_init() 32 if (!nand->bbt.cache) in nanddev_bbt_init() 45 void nanddev_bbt_cleanup(struct nand_device *nand) in nanddev_bbt_cleanup() argument 47 kfree(nand->bbt.cache); in nanddev_bbt_cleanup() 60 int nanddev_bbt_update(struct nand_device *nand) in nanddev_bbt_update() argument 74 int nanddev_bbt_get_block_status(const struct nand_device *nand, in nanddev_bbt_get_block_status() argument 78 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_get_block_status() 83 if (entry >= nanddev_neraseblocks(nand)) in nanddev_bbt_get_block_status() [all …]
|
D | Kconfig | 8 source "drivers/mtd/nand/onenand/Kconfig" 9 source "drivers/mtd/nand/raw/Kconfig" 10 source "drivers/mtd/nand/spi/Kconfig"
|
/drivers/mtd/nand/raw/ |
D | meson_nand.c | 110 struct nand_chip nand; member 219 static struct meson_nfc_nand_chip *to_meson_nand(struct nand_chip *nand) in to_meson_nand() argument 221 return container_of(nand, struct meson_nfc_nand_chip, nand); in to_meson_nand() 224 static void meson_nfc_select_chip(struct nand_chip *nand, int chip) in meson_nfc_select_chip() argument 226 struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); in meson_nfc_select_chip() 227 struct meson_nfc *nfc = nand_get_controller_data(nand); in meson_nfc_select_chip() 267 static void meson_nfc_cmd_access(struct nand_chip *nand, int raw, bool dir, in meson_nfc_cmd_access() argument 270 struct mtd_info *mtd = nand_to_mtd(nand); in meson_nfc_cmd_access() 272 struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); in meson_nfc_cmd_access() 276 pagesize = nand->ecc.size; in meson_nfc_cmd_access() [all …]
|
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 …]
|
D | Makefile | 3 obj-$(CONFIG_MTD_RAW_NAND) += nand.o 5 nand-$(CONFIG_MTD_NAND_ECC_SW_BCH) += nand_bch.o 47 obj-$(CONFIG_MTD_NAND_GPMI_NAND) += gpmi-nand/ 59 obj-$(CONFIG_MTD_NAND_CADENCE) += cadence-nand-controller.o 60 obj-$(CONFIG_MTD_NAND_ARASAN) += arasan-nand-controller.o 62 nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o 63 nand-objs += nand_onfi.o 64 nand-objs += nand_jedec.o 65 nand-objs += nand_amd.o 66 nand-objs += nand_esmt.o [all …]
|
D | fsmc_nand.c | 146 struct nand_chip nand; member 253 return container_of(chip, struct fsmc_nand_data, nand); in nand_to_fsmc() 275 if (host->nand.options & NAND_BUSWIDTH_16) in fsmc_nand_setup() 347 static int fsmc_setup_interface(struct nand_chip *nand, int csline, in fsmc_setup_interface() argument 350 struct fsmc_nand_data *host = nand_to_fsmc(nand); in fsmc_setup_interface() 855 struct nand_chip *nand) in fsmc_nand_probe_config_dt() argument 861 nand->options = 0; in fsmc_nand_probe_config_dt() 865 nand->options |= NAND_BUSWIDTH_16; in fsmc_nand_probe_config_dt() 873 nand->options |= NAND_SKIP_BBTSCAN; in fsmc_nand_probe_config_dt() 898 static int fsmc_nand_attach_chip(struct nand_chip *nand) in fsmc_nand_attach_chip() argument [all …]
|
D | mtk_nand.c | 127 struct nand_chip nand; member 179 static inline struct mtk_nfc_nand_chip *to_mtk_nand(struct nand_chip *nand) in to_mtk_nand() argument 181 return container_of(nand, struct mtk_nfc_nand_chip, nand); in to_mtk_nand() 500 static void mtk_nfc_select_target(struct nand_chip *nand, unsigned int cs) in mtk_nfc_select_target() argument 502 struct mtk_nfc *nfc = nand_get_controller_data(nand); in mtk_nfc_select_target() 503 struct mtk_nfc_nand_chip *mtk_nand = to_mtk_nand(nand); in mtk_nfc_select_target() 505 mtk_nfc_hw_runtime_config(nand_to_mtd(nand)); in mtk_nfc_select_target() 662 struct mtk_nfc_nand_chip *nand = to_mtk_nand(chip); in mtk_nfc_bad_mark_swap() local 663 u32 bad_pos = nand->bad_mark.pos; in mtk_nfc_bad_mark_swap() 666 bad_pos += nand->bad_mark.sec * mtk_data_len(chip); in mtk_nfc_bad_mark_swap() [all …]
|
D | nand_bch.c | 108 struct nand_chip *nand = mtd_to_nand(mtd); in nand_bch_init() local 112 unsigned int eccsize = nand->ecc.size; in nand_bch_init() 113 unsigned int eccbytes = nand->ecc.bytes; in nand_bch_init() 114 unsigned int eccstrength = nand->ecc.strength; in nand_bch_init() 118 nand->ecc.bytes = eccbytes; in nand_bch_init() 166 nand->ecc.steps = eccsteps; in nand_bch_init() 167 nand->ecc.total = eccsteps * eccbytes; in nand_bch_init() 168 nand->base.ecc.ctx.total = nand->ecc.total; in nand_bch_init() 193 nand->ecc.strength = (eccbytes * 8) / fls(8 * eccsize); in nand_bch_init()
|
D | tegra_nand.c | 460 struct tegra_nand_chip *nand = to_tegra_chip(chip); in tegra_nand_select_target() local 463 ctrl->cur_cs = nand->cs[die_nr]; in tegra_nand_select_target() 480 struct tegra_nand_chip *nand = to_tegra_chip(chip); in tegra_nand_hw_ecc() local 483 writel_relaxed(nand->bch_config, ctrl->regs + BCH_CONFIG); in tegra_nand_hw_ecc() 488 writel_relaxed(nand->config_ecc, ctrl->regs + CONFIG); in tegra_nand_hw_ecc() 490 writel_relaxed(nand->config, ctrl->regs + CONFIG); in tegra_nand_hw_ecc() 657 struct tegra_nand_chip *nand = to_tegra_chip(chip); in tegra_nand_read_page_hwecc() local 725 u8 *oob = chip->oob_poi + nand->ecc.offset + in tegra_nand_read_page_hwecc() 916 struct tegra_nand_chip *nand = to_tegra_chip(chip); in tegra_nand_attach_chip() local 941 nand->config |= CONFIG_BUS_WIDTH_16; in tegra_nand_attach_chip() [all …]
|
D | cafe_nand.c | 61 struct nand_chip nand; member 619 cafe->nand.bbt_td = &cafe_bbt_main_descr_2048; in cafe_nand_attach_chip() 620 cafe->nand.bbt_md = &cafe_bbt_mirror_descr_2048; in cafe_nand_attach_chip() 622 cafe->nand.bbt_td = &cafe_bbt_main_descr_512; in cafe_nand_attach_chip() 623 cafe->nand.bbt_md = &cafe_bbt_mirror_descr_512; in cafe_nand_attach_chip() 632 cafe->nand.ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; in cafe_nand_attach_chip() 633 cafe->nand.ecc.placement = NAND_ECC_PLACEMENT_INTERLEAVED; in cafe_nand_attach_chip() 634 cafe->nand.ecc.size = mtd->writesize; in cafe_nand_attach_chip() 635 cafe->nand.ecc.bytes = 14; in cafe_nand_attach_chip() 636 cafe->nand.ecc.strength = 4; in cafe_nand_attach_chip() [all …]
|
D | omap2.c | 145 struct nand_chip nand; member 178 return container_of(mtd_to_nand(mtd), struct omap_nand_info, nand); in mtd_to_omap() 273 struct nand_chip *nand = mtd_to_nand(mtd); in omap_read_buf8() local 275 ioread8_rep(nand->legacy.IO_ADDR_R, buf, len); in omap_read_buf8() 291 iowrite8(*p++, info->nand.legacy.IO_ADDR_W); in omap_write_buf8() 307 struct nand_chip *nand = mtd_to_nand(mtd); in omap_read_buf16() local 309 ioread16_rep(nand->legacy.IO_ADDR_R, buf, len / 2); in omap_read_buf16() 327 iowrite16(*p++, info->nand.legacy.IO_ADDR_W); in omap_write_buf16() 351 if (info->nand.options & NAND_BUSWIDTH_16) in omap_read_buf_pref() 364 if (info->nand.options & NAND_BUSWIDTH_16) in omap_read_buf_pref() [all …]
|
D | fsl_elbc_nand.c | 158 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = ctrl->nand; in set_addr() 208 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = ctrl->nand; in fsl_elbc_run_command() 313 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = ctrl->nand; in fsl_elbc_cmdfunc() 545 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = priv->ctrl->nand; in fsl_elbc_write_buf() 582 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = priv->ctrl->nand; in fsl_elbc_read_byte() 598 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = priv->ctrl->nand; in fsl_elbc_read_buf() 622 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = priv->ctrl->nand; in fsl_elbc_wait() 639 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = ctrl->nand; in fsl_elbc_read_page() 684 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = ctrl->nand; in fsl_elbc_chip_init() 835 struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = priv->ctrl->nand; in fsl_elbc_chip_remove() [all …]
|
D | diskonchip.c | 1301 struct nand_chip *nand = NULL; in doc_probe() local 1400 nand = mtd_to_nand(mtd); in doc_probe() 1401 doc = nand_get_controller_data(nand); in doc_probe() 1436 nand = kzalloc(len, GFP_KERNEL); in doc_probe() 1437 if (!nand) { in doc_probe() 1451 doc = (struct doc_priv *) (nand + 1); in doc_probe() 1465 mtd = nand_to_mtd(nand); in doc_probe() 1466 nand->bbt_td = (struct nand_bbt_descr *) (doc + 1); in doc_probe() 1467 nand->bbt_md = nand->bbt_td + 1; in doc_probe() 1472 nand->controller = &doc->base; in doc_probe() [all …]
|
D | sh_flctl.c | 1118 struct nand_chip *nand; in flctl_probe() local 1155 nand = &flctl->chip; in flctl_probe() 1156 flctl_mtd = nand_to_mtd(nand); in flctl_probe() 1157 nand_set_flash_node(nand, pdev->dev.of_node); in flctl_probe() 1167 nand->legacy.chip_delay = 20; in flctl_probe() 1169 nand->legacy.read_byte = flctl_read_byte; in flctl_probe() 1170 nand->legacy.write_buf = flctl_write_buf; in flctl_probe() 1171 nand->legacy.read_buf = flctl_read_buf; in flctl_probe() 1172 nand->legacy.select_chip = flctl_select_chip; in flctl_probe() 1173 nand->legacy.cmdfunc = flctl_cmdfunc; in flctl_probe() [all …]
|
D | stm32_fmc2_nand.c | 246 struct stm32_fmc2_nand nand; member 282 struct stm32_fmc2_nand *nand = to_fmc2_nand(chip); in stm32_fmc2_nfc_timings_init() local 283 struct stm32_fmc2_timings *timings = &nand->timings; in stm32_fmc2_nfc_timings_init() 337 struct stm32_fmc2_nand *nand = to_fmc2_nand(chip); in stm32_fmc2_nfc_select_chip() local 341 if (nand->cs_used[chipnr] == nfc->cs_sel) in stm32_fmc2_nfc_select_chip() 344 nfc->cs_sel = nand->cs_used[chipnr]; in stm32_fmc2_nfc_select_chip() 1393 struct stm32_fmc2_nand *nand = to_fmc2_nand(chip); in stm32_fmc2_nfc_calc_timings() local 1394 struct stm32_fmc2_timings *tims = &nand->timings; in stm32_fmc2_nfc_calc_timings() 1754 struct stm32_fmc2_nand *nand = &nfc->nand; in stm32_fmc2_nfc_parse_child() local 1758 if (!of_get_property(dn, "reg", &nand->ncs)) in stm32_fmc2_nfc_parse_child() [all …]
|
/drivers/mtd/nand/raw/atmel/ |
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 …]
|
D | Makefile | 2 obj-$(CONFIG_MTD_NAND_ATMEL) += atmel-nand-controller.o atmel-pmecc.o 4 atmel-nand-controller-objs := nand-controller.o
|
/drivers/mtd/nand/spi/ |
D | core.c | 53 struct nand_device *nand = spinand_to_nand(spinand); in spinand_get_cfg() local 56 spinand->cur_target >= nand->memorg.ntargets)) in spinand_get_cfg() 65 struct nand_device *nand = spinand_to_nand(spinand); in spinand_set_cfg() local 69 spinand->cur_target >= nand->memorg.ntargets)) in spinand_set_cfg() 119 struct nand_device *nand = spinand_to_nand(spinand); in spinand_select_target() local 122 if (WARN_ON(target >= nand->memorg.ntargets)) in spinand_select_target() 128 if (nand->memorg.ntargets == 1) { in spinand_select_target() 143 struct nand_device *nand = spinand_to_nand(spinand); in spinand_init_cfg_cache() local 149 nand->memorg.ntargets, in spinand_init_cfg_cache() 155 for (target = 0; target < nand->memorg.ntargets; target++) { in spinand_init_cfg_cache() [all …]
|
D | macronix.c | 70 struct nand_device *nand = spinand_to_nand(spinand); in mx35lf1ge4ab_ecc_get_status() local 87 return nanddev_get_ecc_requirements(nand)->strength; in mx35lf1ge4ab_ecc_get_status() 89 if (WARN_ON(eccsr > nanddev_get_ecc_requirements(nand)->strength || in mx35lf1ge4ab_ecc_get_status() 91 return nanddev_get_ecc_requirements(nand)->strength; in mx35lf1ge4ab_ecc_get_status()
|
D | toshiba.c | 74 struct nand_device *nand = spinand_to_nand(spinand); in tx58cxgxsxraix_ecc_get_status() local 93 return nanddev_get_ecc_requirements(nand)->strength; in tx58cxgxsxraix_ecc_get_status() 97 if (WARN_ON(mbf > nanddev_get_ecc_requirements(nand)->strength || !mbf)) in tx58cxgxsxraix_ecc_get_status() 98 return nanddev_get_ecc_requirements(nand)->strength; in tx58cxgxsxraix_ecc_get_status()
|
/drivers/mtd/nand/raw/ingenic/ |
D | ingenic_nand_drv.c | 143 struct ingenic_nand *nand = to_ingenic_nand(nand_to_mtd(chip)); in ingenic_nand_ecc_hwctl() local 145 nand->reading = (mode == NAND_ECC_READ); in ingenic_nand_ecc_hwctl() 151 struct ingenic_nand *nand = to_ingenic_nand(nand_to_mtd(chip)); in ingenic_nand_ecc_calculate() local 152 struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller); in ingenic_nand_ecc_calculate() 159 if (nand->reading) in ingenic_nand_ecc_calculate() 162 params.size = nand->chip.ecc.size; in ingenic_nand_ecc_calculate() 163 params.bytes = nand->chip.ecc.bytes; in ingenic_nand_ecc_calculate() 164 params.strength = nand->chip.ecc.strength; in ingenic_nand_ecc_calculate() 172 struct ingenic_nand *nand = to_ingenic_nand(nand_to_mtd(chip)); in ingenic_nand_ecc_correct() local 173 struct ingenic_nfc *nfc = to_ingenic_nfc(nand->chip.controller); in ingenic_nand_ecc_correct() [all …]
|
/drivers/watchdog/ |
D | rc32434_wdt.c | 68 #define SET_BITS(addr, or, nand) \ argument 69 writel((readl(&addr) | or) & ~nand, &addr) 89 u32 or, nand; in rc32434_wdt_start() local 98 nand = 1 << RC32434_ERR_WNE; in rc32434_wdt_start() 102 nand |= 1 << RC32434_ERR_WTO; in rc32434_wdt_start() 104 SET_BITS(wdt_reg->errcs, or, nand); in rc32434_wdt_start() 110 nand = 1 << RC32434_WTC_TO; in rc32434_wdt_start() 113 SET_BITS(wdt_reg->wtc, or, nand); in rc32434_wdt_start()
|
/drivers/pinctrl/qcom/ |
D | pinctrl-ipq8064.c | 510 FUNCTION(nand), 574 PINGROUP(34, nand, pdm, NA, NA, NA, NA, NA, NA, NA, NA), 575 PINGROUP(35, nand, pdm, NA, NA, NA, NA, NA, NA, NA, NA), 576 PINGROUP(36, nand, NA, NA, NA, NA, NA, NA, NA, NA, NA), 577 PINGROUP(37, nand, NA, NA, NA, NA, NA, NA, NA, NA, NA), 578 PINGROUP(38, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 579 PINGROUP(39, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 580 PINGROUP(40, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 581 PINGROUP(41, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 582 PINGROUP(42, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), [all …]
|