/u-boot/drivers/mtd/nand/ |
A D | core.c | 38 if (nand->ops->isbad(nand, pos)) in nanddev_isbad() 53 return nand->ops->isbad(nand, pos); in nanddev_isbad() 73 if (nanddev_isbad(nand, pos)) in nanddev_markbad() 76 ret = nand->ops->markbad(nand, pos); in nanddev_markbad() 89 ret = nanddev_bbt_update(nand); in nanddev_markbad() 136 if (nanddev_isbad(nand, pos) || nanddev_isreserved(nand, pos)) { in nanddev_erase() 148 return nand->ops->erase(nand, pos); in nanddev_erase() 208 if (!nand || !ops) in nanddev_init() 225 nand->ops = ops; in nanddev_init() 237 return nanddev_bbt_init(nand); in nanddev_init() [all …]
|
A D | bbt.c | 28 int nanddev_bbt_init(struct nand_device *nand) in nanddev_bbt_init() argument 31 unsigned int nblocks = nanddev_neraseblocks(nand); in nanddev_bbt_init() 35 nand->bbt.cache = kzalloc(nwords, GFP_KERNEL); in nanddev_bbt_init() 36 if (!nand->bbt.cache) in nanddev_bbt_init() 49 void nanddev_bbt_cleanup(struct nand_device *nand) in nanddev_bbt_cleanup() argument 51 kfree(nand->bbt.cache); in nanddev_bbt_cleanup() 64 int nanddev_bbt_update(struct nand_device *nand) in nanddev_bbt_update() argument 82 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_get_block_status() 87 if (entry >= nanddev_neraseblocks(nand)) in nanddev_bbt_get_block_status() 115 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_set_block_status() [all …]
|
/u-boot/include/linux/mtd/ |
A D | nand.h | 222 return nand->mtd; in nanddev_to_mtd() 244 return nand->memorg.pagesize; in nanddev_page_size() 256 return nand->memorg.oobsize; in nanddev_per_page_oobsize() 279 return nand->memorg.pagesize * nand->memorg.pages_per_eraseblock; in nanddev_eraseblock_size() 305 nand->memorg.pagesize; in nanddev_target_size() 316 return nand->memorg.ntargets; in nanddev_ntargets() 340 return nanddev_target_size(nand) * nanddev_ntargets(nand); in nanddev_size() 355 return &nand->memorg; in nanddev_get_memorg() 403 mtd_set_of_node(nand->mtd, np); in nanddev_set_of_node() 426 mtd_set_ofnode(nand->mtd, node); in nanddev_set_ofnode() [all …]
|
/u-boot/drivers/mtd/nand/raw/ |
A D | omap_gpmc.c | 727 nand->ecc.size = 0; in omap_select_ecc_scheme() 742 nand->ecc.strength = 1; in omap_select_ecc_scheme() 744 nand->ecc.bytes = 3; in omap_select_ecc_scheme() 779 nand->ecc.strength = 8; in omap_select_ecc_scheme() 781 nand->ecc.bytes = 13; in omap_select_ecc_scheme() 820 nand->ecc.strength = 8; in omap_select_ecc_scheme() 822 nand->ecc.bytes = 14; in omap_select_ecc_scheme() 854 nand->ecc.bytes = 26; in omap_select_ecc_scheme() 896 struct nand_chip *nand; in omap_nand_switch_ecc() local 905 nand = mtd_to_nand(mtd); in omap_nand_switch_ecc() [all …]
|
A D | davinci_nand.c | 65 *buf = readb(nand); in nand_davinci_read_buf() 96 *buf = readb(nand); in nand_davinci_read_buf() 110 writeb(*buf, nand); in nand_davinci_write_buf() 141 writeb(*buf, nand); in nand_davinci_write_buf() 750 nand->chip_delay = 0; in davinci_nand_init() 762 nand->ecc.size = 512; in davinci_nand_init() 763 nand->ecc.bytes = 3; in davinci_nand_init() 764 nand->ecc.strength = 1; in davinci_nand_init() 773 nand->ecc.size = 512; in davinci_nand_init() 774 nand->ecc.bytes = 10; in davinci_nand_init() [all …]
|
A D | fsmc_nand.c | 401 struct nand_chip *nand; in fsmc_nand_switch_ecc() local 412 nand = mtd_to_nand(mtd); in fsmc_nand_switch_ecc() 417 nand->ecc.bytes = 3; in fsmc_nand_switch_ecc() 418 nand->ecc.strength = 1; in fsmc_nand_switch_ecc() 428 nand->ecc.strength = 4; in fsmc_nand_switch_ecc() 468 nand->options = 0; in fsmc_nand_init() 473 nand->ecc.size = 512; in fsmc_nand_init() 477 nand->IO_ADDR_R = nand->IO_ADDR_W = in fsmc_nand_init() 479 nand->badblockbits = 7; in fsmc_nand_init() 485 nand->ecc.bytes = 13; in fsmc_nand_init() [all …]
|
A D | kirkwood_nand.c | 76 int board_nand_init(struct nand_chip *nand) in board_nand_init() argument 78 nand->options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING; in board_nand_init() 80 nand->options |= NAND_NO_SUBPAGE_WRITE; in board_nand_init() 83 nand->ecc.mode = NAND_ECC_SOFT_BCH; in board_nand_init() 85 nand->ecc.mode = NAND_ECC_SOFT; in board_nand_init() 87 nand->cmd_ctrl = kw_nand_hwcontrol; in board_nand_init() 88 nand->chip_delay = 40; in board_nand_init() 89 nand->select_chip = kw_nand_select_chip; in board_nand_init()
|
A D | kmeter1_nand.c | 104 int board_nand_init(struct nand_chip *nand) in board_nand_init() argument 107 nand->ecc.mode = NAND_ECC_SOFT_BCH; in board_nand_init() 109 nand->ecc.mode = NAND_ECC_SOFT; in board_nand_init() 113 nand->cmd_ctrl = kpn_nand_hwcontrol; in board_nand_init() 114 nand->read_byte = kpn_nand_read_byte; in board_nand_init() 115 nand->write_buf = kpn_nand_write_buf; in board_nand_init() 116 nand->read_buf = kpn_nand_read_buf; in board_nand_init() 117 nand->dev_ready = kpn_nand_dev_ready; in board_nand_init() 118 nand->chip_delay = KPN_DEFAULT_CHIP_DELAY; in board_nand_init()
|
A D | mxs_nand.c | 1040 nand->read_buf(mtd, nand->oob_poi, mtd->oobsize); in mxs_nand_ecc_read_oob() 1085 if (nand->waitfunc(mtd, nand) & NAND_STATUS_FAIL) in mxs_nand_ecc_write_oob() 1342 nand->cmd_ctrl = mxs_nand_cmd_ctrl; in mxs_nand_init_spl() 1347 nand->read_buf = mxs_nand_read_buf; in mxs_nand_init_spl() 1351 nand->ecc.mode = NAND_ECC_HW; in mxs_nand_init_spl() 1359 struct nand_chip *nand; in mxs_nand_init_ctrl() local 1362 nand = &nand_info->chip; in mxs_nand_init_ctrl() 1363 mtd = nand_to_mtd(nand); in mxs_nand_init_ctrl() 1384 nand->cmd_ctrl = mxs_nand_cmd_ctrl; in mxs_nand_init_ctrl() 1392 nand->read_buf = mxs_nand_read_buf; in mxs_nand_init_ctrl() [all …]
|
A D | octeontx_nand.c | 305 struct nand_chip nand; member 442 return container_of(nand, struct octeontx_nand_chip, nand); in to_otx_nand() 466 layout->eccbytes = nand->ecc.steps * nand->ecc.bytes; in octeontx_nand_calc_ecc_layout() 884 if (!nand) { in ndf_build_pre_cmd() 1014 if (!nand) in ndf_read() 1529 int i = nand->ecc.size + nand->ecc.bytes; in octeontx_nand_bch_correct() 1552 memcpy(data_buffer + nand->ecc.size, read_ecc, nand->ecc.bytes); in octeontx_nand_bch_correct() 1795 nand->ecc_step_ds, nand->ecc_strength_ds); in octeontx_nand_calc_bch_ecc_strength() 1865 nand->ecc_step_ds, nand->ecc_strength_ds); in octeontx_nfc_chip_sizing() 1950 nand = &chip->nand; in octeontx_nfc_chip_init() [all …]
|
A D | sunxi_nand.c | 244 struct nand_chip nand; member 259 return container_of(nand, struct sunxi_nand_chip, nand); in to_sunxi_nand() 447 nand->dev_ready = NULL; in sunxi_nfc_select_chip() 789 if (nand->ecc.size == 512) in sunxi_nfc_hw_ecc_enable() 1377 &chip->nand, in sunxi_nand_chip_init_timings() 1614 struct nand_chip *nand; in sunxi_nand_chip_init() local 1705 nand = &chip->nand; in sunxi_nand_chip_init() 1707 nand->chip_delay = 200; in sunxi_nand_chip_init() 1713 nand->ecc.mode = NAND_ECC_HW; in sunxi_nand_chip_init() 1714 nand->flash_node = node; in sunxi_nand_chip_init() [all …]
|
A D | atmel_nand.c | 827 nand->ecc.hwctl = NULL; in atmel_pmecc_nand_init_params() 915 nand->ecc.steps = 1; in atmel_pmecc_nand_init_params() 932 nand->ecc.bytes); in atmel_pmecc_nand_init_params() 945 nand->ecc.postpad = 0; in atmel_pmecc_nand_init_params() 946 nand->ecc.prepad = 0; in atmel_pmecc_nand_init_params() 947 nand->ecc.bytes = 0; in atmel_pmecc_nand_init_params() 1172 nand->ecc.bytes = 4; in atmel_hwecc_nand_init_param() 1211 nand->ecc.bytes = 0; in atmel_hwecc_nand_init_param() 1423 nand->chip_delay = 20; in board_nand_init() 1479 nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr; in atmel_nand_chip_init() [all …]
|
A D | nand_plat.c | 48 int board_nand_init(struct nand_chip *nand) in board_nand_init() argument 59 nand->cmd_ctrl = plat_cmd_ctrl; in board_nand_init() 60 nand->dev_ready = plat_dev_ready; in board_nand_init() 61 nand->ecc.mode = NAND_ECC_SOFT; in board_nand_init()
|
A D | fsl_elbc_nand.c | 662 struct nand_chip *nand; in fsl_elbc_chip_init() local 701 nand = &priv->chip; in fsl_elbc_chip_init() 702 mtd = nand_to_mtd(nand); in fsl_elbc_chip_init() 713 nand->waitfunc = fsl_elbc_wait; in fsl_elbc_chip_init() 716 nand->bbt_td = &bbt_main_descr; in fsl_elbc_chip_init() 734 nand->ecc.mode = NAND_ECC_HW; in fsl_elbc_chip_init() 740 nand->ecc.size = 512; in fsl_elbc_chip_init() 741 nand->ecc.bytes = 3; in fsl_elbc_chip_init() 742 nand->ecc.steps = 1; in fsl_elbc_chip_init() 743 nand->ecc.strength = 1; in fsl_elbc_chip_init() [all …]
|
/u-boot/doc/device-tree-bindings/mtd/ |
A D | stm32-fmc2-nand.txt | 27 - nand-on-flash-bbt: see nand.txt 28 - nand-ecc-strength: see nand.txt 29 - nand-ecc-step-size: see nand.txt 32 - nand-ecc-strength = <1>, nand-ecc-step-size = <512> (Hamming) 33 - nand-ecc-strength = <4>, nand-ecc-step-size = <512> (BCH4) 34 - nand-ecc-strength = <8>, nand-ecc-step-size = <512> (BCH8) (default) 38 fmc: nand-controller@58002000 { 55 nand@0 { 57 nand-on-flash-bbt;
|
/u-boot/drivers/mtd/nand/spi/ |
A D | core.c | 45 if (nand->memorg.planes_per_lun < 2) in spinand_cache_op_adjust_colum() 49 shift = fls(nand->memorg.pagesize); in spinand_cache_op_adjust_colum() 180 nand->memorg.ntargets, in spinand_init_cfg_cache() 501 return nand->eccreq.strength; in spinand_check_ecc_status() 885 nanddev_page_size(nand); in spinand_select_op_variant() 997 nanddev_size(nand) >> 20, nanddev_eraseblock_size(nand) >> 10, in spinand_detect() 998 nanddev_page_size(nand), nanddev_per_page_oobsize(nand)); in spinand_detect() 1120 nanddev_cleanup(nand); in spinand_init() 1135 nanddev_cleanup(nand); in spinand_cleanup() 1163 nand->mtd = mtd; in spinand_probe() [all …]
|
/u-boot/arch/arm/dts/ |
A D | armada-xp-db-xc3-24g4xg-u-boot.dtsi | 8 compatible="marvell,mvebu-pxa3xx-nand"; 11 nand-rb = <0>; 12 marvell,nand-keep-config; 13 nand-on-flash-bbt; 14 nand-ecc-strength = <4>; 15 nand-ecc-step-size = <512>;
|
/u-boot/drivers/dfu/ |
A D | dfu_nand.c | 32 *len = dfu->data.nand.size; in nand_block_op() 37 lim = dfu->data.nand.start + dfu->data.nand.size - start; in nand_block_op() 68 if (dfu->data.nand.ubi) in nand_block_op() 124 *size = dfu->data.nand.size; in dfu_get_medium_size_nand() 152 if (dfu->data.nand.ubi) { in dfu_flush_medium_nand() 175 opts.length = dfu->data.nand.start + in dfu_flush_medium_nand() 191 if (dfu->data.nand.ubi) in dfu_polltimeout_nand() 202 dfu->data.nand.ubi = 0; in dfu_fill_entity_nand() 233 dfu->data.nand.start = pi->offset; in dfu_fill_entity_nand() 234 dfu->data.nand.size = pi->size; in dfu_fill_entity_nand() [all …]
|
/u-boot/configs/ |
A D | socfpga_secu1_defconfig | 14 CONFIG_BUILD_TARGET="u-boot-with-nand-spl.sfp" 42 CONFIG_MTDIDS_DEFAULT="nand0=denali-nand" 43 …s=denali-nand:512k(nand.4spl),512k(nand.uboot),128k(nand.env1),128k(nand.env2),0x1000000(nand.rec)…
|
/u-boot/board/socrates/ |
A D | nand.c | 149 int board_nand_init(struct nand_chip *nand) in board_nand_init() argument 151 nand->cmd_ctrl = sc_nand_hwcontrol; in board_nand_init() 152 nand->ecc.mode = NAND_ECC_SOFT; in board_nand_init() 153 nand->dev_ready = sc_nand_device_ready; in board_nand_init() 154 nand->read_byte = sc_nand_read_byte; in board_nand_init() 155 nand->read_word = sc_nand_read_word; in board_nand_init() 156 nand->write_buf = sc_nand_write_buf; in board_nand_init() 157 nand->read_buf = sc_nand_read_buf; in board_nand_init()
|
/u-boot/doc/device-tree-bindings/nand/ |
A D | nvidia,tegra20-nand.txt | 12 - compatible : Should be "manufacturer,device", "nand-flash" 26 nvidia,nand-width : bus width of the NAND device in bits 28 - nvidia,nand-timing : Timing parameters for the NAND. Each is in ns. 42 nand-controller@0x70008000 { 43 compatible = "nvidia,tegra20-nand"; 47 nvidia,nand-width = <8>; 49 nand@0 { 51 compatible = "hynix,hy27uf4g2b", "nand-flash";
|
/u-boot/arch/mips/dts/ |
A D | ci20.dts | 51 nandc: nand-controller@1 { 52 compatible = "ingenic,jz4780-nand"; 66 nand@1 { 69 nand-ecc-step-size = <1024>; 70 nand-ecc-strength = <24>; 71 nand-ecc-mode = "hw"; 72 nand-on-flash-bbt;
|
/u-boot/board/xes/common/ |
A D | actl_nand.c | 41 int board_nand_init(struct nand_chip *nand) in board_nand_init() argument 43 nand->ecc.mode = NAND_ECC_SOFT; in board_nand_init() 44 nand->cmd_ctrl = nand_addr_hwcontrol; in board_nand_init() 45 nand->chip_delay = CONFIG_SYS_NAND_ACTL_DELAY; in board_nand_init()
|
/u-boot/doc/ |
A D | README.commands.spl | 20 nand read 0x82000000 0x280000 0x400000 /* Read kernel image from NAND*/ 22 nand erase 0x680000 0x20000 /* erase - one page */ 23 nand write 0x80000100 0x680000 0x20000 /* write the image - one page */ 27 nand read 0x82000000 0x280000 0x400000 /* Read kernel image from NAND*/ 30 nand erase 0x680000 0x20000 /* erase - one page */ 31 nand write <adress shown by spl export> 0x680000 0x20000
|
/u-boot/board/freescale/m5329evb/ |
A D | nand.c | 49 int board_nand_init(struct nand_chip *nand) in board_nand_init() argument 64 nand->chip_delay = 60; in board_nand_init() 65 nand->ecc.mode = NAND_ECC_SOFT; in board_nand_init() 66 nand->cmd_ctrl = nand_hwcontrol; in board_nand_init()
|