/linux-6.6.21/drivers/mtd/nand/raw/ |
D | nand_samsung.c | 16 struct nand_memory_organization *memorg; in samsung_nand_decode_id() local 18 memorg = nanddev_get_memorg(&chip->base); in samsung_nand_decode_id() 26 memorg->pagesize = 2048 << (extid & 0x03); in samsung_nand_decode_id() 27 mtd->writesize = memorg->pagesize; in samsung_nand_decode_id() 34 memorg->oobsize = 128; in samsung_nand_decode_id() 37 memorg->oobsize = 218; in samsung_nand_decode_id() 40 memorg->oobsize = 400; in samsung_nand_decode_id() 43 memorg->oobsize = 436; in samsung_nand_decode_id() 46 memorg->oobsize = 512; in samsung_nand_decode_id() 49 memorg->oobsize = 640; in samsung_nand_decode_id() [all …]
|
D | nand_jedec.c | 28 struct nand_memory_organization *memorg; in nand_jedec_detect() local 37 memorg = nanddev_get_memorg(&chip->base); in nand_jedec_detect() 100 memorg->pagesize = le32_to_cpu(p->byte_per_page); in nand_jedec_detect() 101 mtd->writesize = memorg->pagesize; in nand_jedec_detect() 104 memorg->pages_per_eraseblock = in nand_jedec_detect() 106 mtd->erasesize = memorg->pages_per_eraseblock * memorg->pagesize; in nand_jedec_detect() 108 memorg->oobsize = le16_to_cpu(p->spare_bytes_per_page); in nand_jedec_detect() 109 mtd->oobsize = memorg->oobsize; in nand_jedec_detect() 111 memorg->luns_per_target = p->lun_count; in nand_jedec_detect() 112 memorg->planes_per_lun = 1 << p->multi_plane_addr; in nand_jedec_detect() [all …]
|
D | nand_hynix.c | 412 struct nand_memory_organization *memorg; in hynix_nand_extract_oobsize() local 415 memorg = nanddev_get_memorg(&chip->base); in hynix_nand_extract_oobsize() 423 memorg->oobsize = 2048; in hynix_nand_extract_oobsize() 426 memorg->oobsize = 1664; in hynix_nand_extract_oobsize() 429 memorg->oobsize = 1024; in hynix_nand_extract_oobsize() 432 memorg->oobsize = 640; in hynix_nand_extract_oobsize() 447 memorg->oobsize = 128; in hynix_nand_extract_oobsize() 450 memorg->oobsize = 224; in hynix_nand_extract_oobsize() 453 memorg->oobsize = 448; in hynix_nand_extract_oobsize() 456 memorg->oobsize = 64; in hynix_nand_extract_oobsize() [all …]
|
D | nand_amd.c | 14 struct nand_memory_organization *memorg; in amd_nand_decode_id() local 16 memorg = nanddev_get_memorg(&chip->base); in amd_nand_decode_id() 28 memorg->pagesize == 512) { in amd_nand_decode_id() 29 memorg->pages_per_eraseblock = 256; in amd_nand_decode_id() 30 memorg->pages_per_eraseblock <<= ((chip->id.data[3] & 0x03) << 1); in amd_nand_decode_id() 31 mtd->erasesize = memorg->pages_per_eraseblock * in amd_nand_decode_id() 32 memorg->pagesize; in amd_nand_decode_id()
|
D | nand_onfi.c | 148 struct nand_memory_organization *memorg; in nand_onfi_detect() local 157 memorg = nanddev_get_memorg(&chip->base); in nand_onfi_detect() 244 memorg->pagesize = le32_to_cpu(p->byte_per_page); in nand_onfi_detect() 245 mtd->writesize = memorg->pagesize; in nand_onfi_detect() 252 memorg->pages_per_eraseblock = in nand_onfi_detect() 254 mtd->erasesize = memorg->pages_per_eraseblock * memorg->pagesize; in nand_onfi_detect() 256 memorg->oobsize = le16_to_cpu(p->spare_bytes_per_page); in nand_onfi_detect() 257 mtd->oobsize = memorg->oobsize; in nand_onfi_detect() 259 memorg->luns_per_target = p->lun_count; in nand_onfi_detect() 260 memorg->planes_per_lun = 1 << p->interleaved_bits; in nand_onfi_detect() [all …]
|
D | nand_toshiba.c | 151 struct nand_memory_organization *memorg; in toshiba_nand_decode_id() local 153 memorg = nanddev_get_memorg(&chip->base); in toshiba_nand_decode_id() 168 memorg->oobsize = 32 * memorg->pagesize >> 9; in toshiba_nand_decode_id() 169 mtd->oobsize = memorg->oobsize; in toshiba_nand_decode_id()
|
D | nand_base.c | 1213 struct nand_memory_organization *memorg; in rawnand_cap_cont_reads() local 1216 memorg = nanddev_get_memorg(&chip->base); in rawnand_cap_cont_reads() 1217 pages_per_lun = memorg->pages_per_eraseblock * memorg->eraseblocks_per_lun; in rawnand_cap_cont_reads() 4970 struct nand_memory_organization *memorg; in nand_decode_ext_id() local 4975 memorg = nanddev_get_memorg(&chip->base); in nand_decode_ext_id() 4978 memorg->bits_per_cell = nand_get_bits_per_cell(id_data[2]); in nand_decode_ext_id() 4983 memorg->pagesize = 1024 << (extid & 0x03); in nand_decode_ext_id() 4984 mtd->writesize = memorg->pagesize; in nand_decode_ext_id() 4987 memorg->oobsize = (8 << (extid & 0x01)) * (mtd->writesize >> 9); in nand_decode_ext_id() 4988 mtd->oobsize = memorg->oobsize; in nand_decode_ext_id() [all …]
|
D | denali.c | 961 struct nand_memory_organization *memorg; in denali_multidev_fixup() local 963 memorg = nanddev_get_memorg(&chip->base); in denali_multidev_fixup() 993 memorg->pagesize <<= 1; in denali_multidev_fixup() 994 memorg->oobsize <<= 1; in denali_multidev_fixup()
|
D | diskonchip.c | 909 struct nand_memory_organization *memorg; in nftl_partscan() local 918 memorg = nanddev_get_memorg(&this->base); in nftl_partscan() 966 memorg->pages_per_eraseblock <<= (0xff - mh->UnitSizeFactor); in nftl_partscan()
|
D | nandsim.c | 2346 struct nand_memory_organization *memorg; in ns_init_module() local 2349 memorg = nanddev_get_memorg(&chip->base); in ns_init_module() 2359 memorg->eraseblocks_per_lun = 1 << overridesize; in ns_init_module()
|
D | renesas-nand-controller.c | 1116 struct nand_memory_organization *memorg = nanddev_get_memorg(&chip->base); in rnandc_attach_chip() local 1130 switch (memorg->pages_per_eraseblock) { in rnandc_attach_chip()
|
/linux-6.6.21/include/linux/mtd/ |
D | nand.h | 419 struct nand_memory_organization memorg; member 474 return nand->memorg.bits_per_cell; in nanddev_bits_per_cell() 485 return nand->memorg.pagesize; in nanddev_page_size() 497 return nand->memorg.oobsize; in nanddev_per_page_oobsize() 509 return nand->memorg.pages_per_eraseblock; in nanddev_pages_per_eraseblock() 521 return nand->memorg.pages_per_eraseblock * in nanddev_pages_per_target() 522 nand->memorg.eraseblocks_per_lun * in nanddev_pages_per_target() 523 nand->memorg.luns_per_target; in nanddev_pages_per_target() 534 return nand->memorg.pagesize * nand->memorg.pages_per_eraseblock; in nanddev_eraseblock_size() 546 return nand->memorg.eraseblocks_per_lun; in nanddev_eraseblocks_per_lun() [all …]
|
D | spinand.h | 346 struct nand_memory_organization memorg; member 386 .memorg = __memorg, \
|
/linux-6.6.21/drivers/mtd/nand/ |
D | core.c | 197 if (!nand->memorg.max_bad_eraseblocks_per_lun) in nanddev_mtd_max_bad_blocks() 206 max_bb += nand->memorg.max_bad_eraseblocks_per_lun; in nanddev_mtd_max_bad_blocks() 355 struct nand_memory_organization *memorg = nanddev_get_memorg(nand); in nanddev_init() local 363 if (!memorg->bits_per_cell || !memorg->pagesize || in nanddev_init() 364 !memorg->pages_per_eraseblock || !memorg->eraseblocks_per_lun || in nanddev_init() 365 !memorg->planes_per_lun || !memorg->luns_per_target || in nanddev_init() 366 !memorg->ntargets) in nanddev_init() 370 fls(memorg->pages_per_eraseblock - 1); in nanddev_init() 371 nand->rowconv.lun_addr_shift = fls(memorg->eraseblocks_per_lun - 1) + in nanddev_init() 376 mtd->type = memorg->bits_per_cell == 1 ? in nanddev_init() [all …]
|
/linux-6.6.21/drivers/mtd/nand/spi/ |
D | core.c | 56 spinand->cur_target >= nand->memorg.ntargets)) in spinand_get_cfg() 69 spinand->cur_target >= nand->memorg.ntargets)) in spinand_set_cfg() 122 if (WARN_ON(target >= nand->memorg.ntargets)) in spinand_select_target() 128 if (nand->memorg.ntargets == 1) { in spinand_select_target() 147 for (target = 0; target < nand->memorg.ntargets; target++) { in spinand_read_cfg() 171 nand->memorg.ntargets, in spinand_init_cfg_cache() 866 info.offset = plane << fls(nand->memorg.pagesize); in spinand_create_dirmap() 919 nand->memorg.planes_per_lun, in spinand_create_dirmaps() 924 for (i = 0; i < nand->memorg.planes_per_lun; i++) { in spinand_create_dirmaps() 1091 nand->memorg = table[i].memorg; in spinand_match_and_init() [all …]
|
D | micron.c | 95 if (section >= spinand->base.memorg.pagesize / in micron_4_ooblayout_ecc() 110 if (section >= spinand->base.memorg.pagesize / in micron_4_ooblayout_free()
|
D | winbond.c | 183 for (i = 0; i < nand->memorg.ntargets; i++) { in winbond_spinand_init()
|
/linux-6.6.21/drivers/spi/ |
D | spi-mtk-snfi.c | 673 ret = mtk_snand_setup_pagefmt(snf, nand->memorg.pagesize, in mtk_snand_ecc_init_ctx() 674 nand->memorg.oobsize); in mtk_snand_ecc_init_ctx() 753 ret = mtk_snand_setup_pagefmt(snf, nand->memorg.pagesize, in mtk_snand_ecc_prepare_io_req() 754 nand->memorg.oobsize); in mtk_snand_ecc_prepare_io_req()
|
/linux-6.6.21/drivers/mtd/nand/raw/brcmnand/ |
D | brcmnand.c | 2656 struct nand_memory_organization *memorg = in brcmnand_setup_dev() local 2683 memorg->oobsize = mtd->oobsize; in brcmnand_setup_dev()
|