/linux-6.3-rc2/drivers/mtd/nand/ |
A D | core.c | 35 if (nand->ops->isbad(nand, pos)) in nanddev_isbad() 50 return nand->ops->isbad(nand, pos); in nanddev_isbad() 73 ret = nand->ops->markbad(nand, pos); in nanddev_markbad() 131 if (nanddev_isbad(nand, pos) || nanddev_isreserved(nand, pos)) { in nanddev_erase() 137 return nand->ops->erase(nand, pos); in nanddev_erase() 231 nand->ecc.engine = nand_ecc_get_sw_engine(nand); in nanddev_get_ecc_engine() 234 nand->ecc.engine = nand_ecc_get_on_die_hw_engine(nand); in nanddev_get_ecc_engine() 237 nand->ecc.engine = nand_ecc_get_on_host_hw_engine(nand); in nanddev_get_ecc_engine() 288 nand->mtd.name); in nanddev_find_ecc_configuration() 357 if (!nand || !ops) in nanddev_init() [all …]
|
A D | ecc.c | 114 if (!nand->ecc.engine || !nand->ecc.engine->ops->init_ctx) in nand_ecc_init_ctx() 117 return nand->ecc.engine->ops->init_ctx(nand); in nand_ecc_init_ctx() 127 if (nand->ecc.engine && nand->ecc.engine->ops->cleanup_ctx) in nand_ecc_cleanup_ctx() 128 nand->ecc.engine->ops->cleanup_ctx(nand); in nand_ecc_cleanup_ctx() 140 if (!nand->ecc.engine || !nand->ecc.engine->ops->prepare_io_req) in nand_ecc_prepare_io_req() 143 return nand->ecc.engine->ops->prepare_io_req(nand, req); in nand_ecc_prepare_io_req() 155 if (!nand->ecc.engine || !nand->ecc.engine->ops->finish_io_req) in nand_ecc_finish_io_req() 158 return nand->ecc.engine->ops->finish_io_req(nand, req); in nand_ecc_finish_io_req() 495 ctx->nand = nand; in nand_ecc_init_req_tweaking() 528 struct nand_device *nand = ctx->nand; in nand_ecc_tweak_req() local [all …]
|
A D | ecc-sw-bch.c | 165 nand_ecc_sw_bch_cleanup(nand); in nand_ecc_sw_bch_init() 246 nand->ecc.ctx.priv = engine_conf; in nand_ecc_sw_bch_init_ctx() 247 nand->ecc.ctx.nsteps = nsteps; in nand_ecc_sw_bch_init_ctx() 248 nand->ecc.ctx.total = nsteps * code_size; in nand_ecc_sw_bch_init_ctx() 250 ret = nand_ecc_sw_bch_init(nand); in nand_ecc_sw_bch_init_ctx() 265 nand_ecc_sw_bch_cleanup(nand); in nand_ecc_sw_bch_init_ctx() 282 nand_ecc_sw_bch_cleanup(nand); in nand_ecc_sw_bch_cleanup_ctx() 298 int eccsteps = nand->ecc.ctx.nsteps; in nand_ecc_sw_bch_prepare_io_req() 299 int total = nand->ecc.ctx.total; in nand_ecc_sw_bch_prepare_io_req() 334 int total = nand->ecc.ctx.total; in nand_ecc_sw_bch_finish_io_req() [all …]
|
A 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() 29 if (!nand->bbt.cache) in nanddev_bbt_init() 42 void nanddev_bbt_cleanup(struct nand_device *nand) in nanddev_bbt_cleanup() argument 44 bitmap_free(nand->bbt.cache); in nanddev_bbt_cleanup() 57 int nanddev_bbt_update(struct nand_device *nand) in nanddev_bbt_update() argument 71 int nanddev_bbt_get_block_status(const struct nand_device *nand, in nanddev_bbt_get_block_status() argument 75 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_get_block_status() 80 if (entry >= nanddev_neraseblocks(nand)) in nanddev_bbt_get_block_status() 108 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_set_block_status() [all …]
|
A D | ecc-sw-hamming.c | 471 struct mtd_info *mtd = nanddev_to_mtd(nand); in nand_ecc_sw_hamming_init_ctx() 515 nand->ecc.ctx.priv = engine_conf; in nand_ecc_sw_hamming_init_ctx() 517 nand->ecc.ctx.total = nand->ecc.ctx.nsteps * engine_conf->code_size; in nand_ecc_sw_hamming_init_ctx() 549 struct mtd_info *mtd = nanddev_to_mtd(nand); in nand_ecc_sw_hamming_prepare_io_req() 550 int eccsize = nand->ecc.ctx.conf.step_size; in nand_ecc_sw_hamming_prepare_io_req() 552 int eccsteps = nand->ecc.ctx.nsteps; in nand_ecc_sw_hamming_prepare_io_req() 553 int total = nand->ecc.ctx.total; in nand_ecc_sw_hamming_prepare_io_req() 586 struct mtd_info *mtd = nanddev_to_mtd(nand); in nand_ecc_sw_hamming_finish_io_req() 587 int eccsize = nand->ecc.ctx.conf.step_size; in nand_ecc_sw_hamming_finish_io_req() 588 int total = nand->ecc.ctx.total; in nand_ecc_sw_hamming_finish_io_req() [all …]
|
/linux-6.3-rc2/include/linux/mtd/ |
A D | nand.h | 362 struct nand_device *nand; member 463 return &nand->mtd; in nanddev_to_mtd() 534 return nand->memorg.pagesize * nand->memorg.pages_per_eraseblock; in nanddev_eraseblock_size() 558 return nand->memorg.eraseblocks_per_lun * nand->memorg.luns_per_target; in nanddev_eraseblocks_per_target() 594 return nand->memorg.ntargets * nand->memorg.luns_per_target * in nanddev_neraseblocks() 606 return nanddev_target_size(nand) * nanddev_ntargets(nand); in nanddev_size() 621 return &nand->memorg; in nanddev_get_memorg() 631 return &nand->ecc.ctx.conf; in nanddev_get_ecc_conf() 651 return nand->ecc.ctx.total / nand->ecc.ctx.nsteps; in nanddev_get_ecc_bytes_per_step() 1010 return nand->ecc.ctx.priv; in nand_to_ecc_ctx() [all …]
|
A D | nand-ecc-sw-bch.h | 37 int nand_ecc_sw_bch_calculate(struct nand_device *nand, 39 int nand_ecc_sw_bch_correct(struct nand_device *nand, unsigned char *buf, 41 int nand_ecc_sw_bch_init_ctx(struct nand_device *nand); 42 void nand_ecc_sw_bch_cleanup_ctx(struct nand_device *nand); 47 static inline int nand_ecc_sw_bch_calculate(struct nand_device *nand, in nand_ecc_sw_bch_calculate() argument 54 static inline int nand_ecc_sw_bch_correct(struct nand_device *nand, in nand_ecc_sw_bch_correct() argument 62 static inline int nand_ecc_sw_bch_init_ctx(struct nand_device *nand) in nand_ecc_sw_bch_init_ctx() argument 67 static inline void nand_ecc_sw_bch_cleanup_ctx(struct nand_device *nand) {} in nand_ecc_sw_bch_cleanup_ctx() argument
|
/linux-6.3-rc2/drivers/mtd/nand/raw/ |
A D | meson_nand.c | 113 struct nand_chip nand; member 223 return container_of(nand, struct meson_nfc_nand_chip, nand); in to_meson_nand() 340 len = nand->ecc.size * (i + 1) + (nand->ecc.bytes + 2) * i; in meson_nfc_oob_ptr() 350 temp = nand->ecc.size + nand->ecc.bytes; in meson_nfc_data_ptr() 367 buf += nand->ecc.size; in meson_nfc_get_data_oob() 386 buf += nand->ecc.size; in meson_nfc_set_data_oob() 642 meson_nfc_select_chip(nand, nand->cur_cs); in meson_nfc_write_page_sub() 726 meson_nfc_select_chip(nand, nand->cur_cs); in meson_nfc_read_page_sub() 1154 if (nand->ecc.strength > 60 || nand->ecc.strength < 8) in meson_nand_bch_mode() 1273 nand = &meson_chip->nand; in meson_nfc_nand_chip_init() [all …]
|
A D | sunxi_nand.c | 206 return container_of(nand, struct sunxi_nand_chip, nand); in to_sunxi_nand() 1101 sunxi_nfc_select_chip(nand, nand->cur_cs); in sunxi_nfc_hw_ecc_read_page() 1137 sunxi_nfc_select_chip(nand, nand->cur_cs); in sunxi_nfc_hw_ecc_read_page_dma() 1159 sunxi_nfc_select_chip(nand, nand->cur_cs); in sunxi_nfc_hw_ecc_read_subpage() 1193 sunxi_nfc_select_chip(nand, nand->cur_cs); in sunxi_nfc_hw_ecc_read_subpage_dma() 1214 sunxi_nfc_select_chip(nand, nand->cur_cs); in sunxi_nfc_hw_ecc_write_page() 1251 sunxi_nfc_select_chip(nand, nand->cur_cs); in sunxi_nfc_hw_ecc_write_subpage() 1287 sunxi_nfc_select_chip(nand, nand->cur_cs); in sunxi_nfc_hw_ecc_write_page_dma() 1351 return nand->ecc.read_page(nand, buf, 1, page); in sunxi_nfc_hw_ecc_read_oob() 1361 ret = nand->ecc.write_page(nand, buf, 1, page); in sunxi_nfc_hw_ecc_write_oob() [all …]
|
A D | Makefile | 3 obj-$(CONFIG_MTD_RAW_NAND) += nand.o 43 obj-$(CONFIG_MTD_NAND_GPMI_NAND) += gpmi-nand/ 63 nand-objs += nand_onfi.o 64 nand-objs += nand_jedec.o 65 nand-objs += nand_amd.o 66 nand-objs += nand_esmt.o 67 nand-objs += nand_hynix.o 68 nand-objs += nand_macronix.o 69 nand-objs += nand_micron.o 70 nand-objs += nand_samsung.o [all …]
|
/linux-6.3-rc2/Documentation/devicetree/bindings/mtd/ |
A D | denali,nand.yaml | 15 - altr,socfpga-denali-nand 42 - const: nand 57 - const: nand 59 - const: nand 67 - $ref: nand-controller.yaml 76 "^nand@[a-f0-9]$": 79 nand-ecc-strength: 94 "^nand@[a-f0-9]$": 97 nand-ecc-strength: 113 "^nand@[a-f0-9]$": [all …]
|
A D | marvell-nand.txt | 39 - nand-rb: see nand-controller.yaml (0-1). 46 - nand-on-flash-bbt: see nand-controller.yaml. 47 - nand-ecc-mode: see nand-controller.yaml. Will use hardware ECC if not specified. 48 - nand-ecc-algo: see nand-controller.yaml. This property is essentially useful when 54 - nand-ecc-strength: see nand-controller.yaml. 74 nand@0 { 77 nand-rb = <0>; 78 nand-ecc-mode = "hw"; 80 nand-on-flash-bbt; 81 nand-ecc-strength = <4>; [all …]
|
A D | samsung-s3c2410.txt | 5 "samsung,s3c2410-nand" 6 "samsung,s3c2412-nand" 7 "samsung,s3c2440-nand" 11 - clock-names : must contain "nand" 17 - nand-ecc-mode : see nand-controller.yaml 18 - nand-on-flash-bbt : see nand-controller.yaml 26 nand-controller@4e000000 { 34 clock-names = "nand"; 36 nand { 37 nand-ecc-mode = "soft"; [all …]
|
A D | qcom,nandc.yaml | 15 - qcom,ipq806x-nand 16 - qcom,ipq4019-nand 17 - qcom,ipq6018-nand 18 - qcom,ipq8074-nand 19 - qcom,sdx55-nand 35 "^nand@[a-f0-9]$": 38 nand-bus-width: 41 nand-ecc-strength: 44 nand-ecc-step-size: 154 nand@0 { [all …]
|
A D | nvidia-tegra20-nand.txt | 5 - "nvidia,tegra20-nand" 11 - nand 15 - nand 29 - nand-bus-width : See nand-controller.yaml 30 - nand-on-flash-bbt: See nand-controller.yaml 36 - nand-ecc-maximize: See nand-controller.yaml 50 clock-names = "nand"; 52 reset-names = "nand"; 54 nand@0 { 58 nand-bus-width = <8>; [all …]
|
A D | brcm,brcmnand.yaml | 83 enum: [ nand, flash-dma, flash-edu, nand-cache, nand-int-base, iproc-idm, iproc-ext ] 104 const: nand 106 brcm,nand-has-wp: 115 "^nand@[a-f0-9]$": 121 nand-ecc-step-size: 150 - const: nand 161 - const: nand 205 nand@1 { 218 compatible = "brcm,nand-bcm63168", "brcm,nand-bcm6368", 223 reg-names = "nand", "nand-int-base", "nand-cache"; [all …]
|
A D | mediatek,mtk-nfc.yaml | 42 "^nand@[a-f0-9]$": 43 $ref: nand-chip.yaml# 48 nand-on-flash-bbt: true 49 nand-ecc-mode: 53 - $ref: nand-controller.yaml# 62 "^nand@[a-f0-9]$": 66 nand-ecc-strength: 77 "^nand@[a-f0-9]$": 81 nand-ecc-strength: 92 "^nand@[a-f0-9]$": [all …]
|
A D | vf610-nfc.txt | 28 - nand-bus-width: see nand-controller.yaml 29 - nand-ecc-mode: see nand-controller.yaml 32 - nand-ecc-strength: supported strengths are 24 and 32 bit (see nand-controller.yaml) 35 - nand-on-flash-bbt: see nand-controller.yaml 39 nfc: nand@400e0000 { 50 nand@0 { 53 nand-bus-width = <8>; 54 nand-ecc-mode = "hw"; 55 nand-ecc-strength = <32>; 56 nand-ecc-step-size = <2048>; [all …]
|
A D | hisi504-nand.txt | 10 - nand-bus-width: See nand-controller.yaml. 11 - nand-ecc-mode: Support none and hw ecc mode. 17 - nand-ecc-strength: Number of bits to correct per ECC step. 18 - nand-ecc-step-size: Number of data bytes covered by a single ECC step. 22 - nand-ecc-strength = <16>, nand-ecc-step-size = <1024> 29 nand: nand@4020000 { 33 nand-bus-width = <8>; 34 nand-ecc-mode = "hw"; 35 nand-ecc-strength = <16>; 36 nand-ecc-step-size = <1024>;
|
A D | gpmi-nand.yaml | 22 - fsl,imx23-gpmi-nand 23 - fsl,imx28-gpmi-nand 24 - fsl,imx6q-gpmi-nand 25 - fsl,imx6sx-gpmi-nand 26 - fsl,imx7d-gpmi-nand 29 - fsl,imx8mm-gpmi-nand 30 - fsl,imx8mn-gpmi-nand 40 - const: gpmi-nand 96 - $ref: "nand-controller.yaml" 103 - fsl,imx23-gpmi-nand [all …]
|
A D | rockchip,nand-controller.yaml | 10 - $ref: "nand-controller.yaml#" 58 "^nand@[0-7]$": 65 nand-ecc-mode: 68 nand-ecc-step-size: 71 nand-ecc-strength: 87 nand-bus-width: 149 nand@0 { 151 label = "rk-nand"; 152 nand-bus-width = <8>; 153 nand-ecc-mode = "hw"; [all …]
|
A D | atmel-nand.txt | 106 nand@3 { 124 "atmel,at91rm9200-nand" 125 "atmel,sama5d2-nand" 126 "atmel,sama5d4-nand" 142 - atmel,nand-has-dma : boolean to support dma transfer for nand read/write. 170 nand0: nand@40000000,0 { 179 nand-on-flash-bbt; 191 nand0: nand@40000000 { 202 nand-on-flash-bbt; 203 nand-ecc-mode = "hw"; [all …]
|
/linux-6.3-rc2/drivers/mtd/nand/spi/ |
A D | core.c | 171 nand->memorg.ntargets, in spinand_init_cfg_cache() 263 nand->ecc.ctx.conf.step_size = nand->ecc.requirements.step_size; in spinand_ondie_ecc_init_ctx() 264 nand->ecc.ctx.conf.strength = nand->ecc.requirements.strength; in spinand_ondie_ecc_init_ctx() 282 kfree(nand->ecc.ctx.priv); in spinand_ondie_ecc_cleanup_ctx() 440 nbytes = nanddev_page_size(nand) + nanddev_per_page_oobsize(nand); in spinand_write_to_cache_op() 1035 nanddev_page_size(nand); in spinand_select_op_variant() 1148 nanddev_size(nand) >> 20, nanddev_eraseblock_size(nand) >> 10, in spinand_detect() 1149 nanddev_page_size(nand), nanddev_per_page_oobsize(nand)); in spinand_detect() 1277 if (nand->ecc.engine) { in spinand_init() 1303 nanddev_cleanup(nand); in spinand_init() [all …]
|
/linux-6.3-rc2/drivers/mtd/nand/raw/atmel/ |
A D | nand-controller.c | 524 return nand_gpio_waitrdy(&nand->base, nand->activecs->rb.gpio, in atmel_nand_waitrdy() 547 nand->activecs = &nand->cs[cs]; in atmel_nand_select_target() 559 nand->activecs = &nand->cs[cs]; in atmel_hsmc_nand_select_target() 1597 BIT(nand->cs[i].id), BIT(nand->cs[i].id)); in atmel_smc_nand_init() 1638 if (!nand) in atmel_nand_create() 1722 return nand; in atmel_nand_create() 1734 if (nand->cdgpio && gpiod_get_value(nand->cdgpio)) { in atmel_nand_controller_add_nand() 1787 nand = devm_kzalloc(nc->dev, sizeof(*nand) + sizeof(*nand->cs), in atmel_nand_controller_legacy_add_nands() 1789 if (!nand) in atmel_nand_controller_legacy_add_nands() 1792 nand->numcs = 1; in atmel_nand_controller_legacy_add_nands() [all …]
|
/linux-6.3-rc2/drivers/mtd/nand/raw/ingenic/ |
A D | ingenic_nand_drv.c | 160 if (nand->reading) in ingenic_nand_ecc_calculate() 163 params.size = nand->chip.ecc.size; in ingenic_nand_ecc_calculate() 299 if (!nand->busy_gpio) in ingenic_nand_exec_instr() 351 struct ingenic_nand *nand; in ingenic_nand_init_chip() local 372 nand = devm_kzalloc(dev, sizeof(*nand), GFP_KERNEL); in ingenic_nand_init_chip() 373 if (!nand) in ingenic_nand_init_chip() 378 if (IS_ERR(nand->busy_gpio)) { in ingenic_nand_init_chip() 379 ret = PTR_ERR(nand->busy_gpio); in ingenic_nand_init_chip() 398 if (IS_ERR(nand->wp_gpio)) { in ingenic_nand_init_chip() 399 ret = PTR_ERR(nand->wp_gpio); in ingenic_nand_init_chip() [all …]
|