/linux-6.3-rc2/include/linux/mtd/ |
A D | mtd.h | 405 while (mtd->parent) in mtd_get_master() 406 mtd = mtd->parent; in mtd_get_master() 408 return mtd; in mtd_get_master() 413 while (mtd->parent) { in mtd_get_master_ofs() 415 mtd = mtd->parent; in mtd_get_master_ofs() 423 return mtd->parent; in mtd_is_partition() 464 mtd->dev.of_node = np; in mtd_set_of_node() 465 if (!mtd->name) in mtd_set_of_node() 476 return ops->mode == MTD_OPS_AUTO_OOB ? mtd->oobavail : mtd->oobsize; in mtd_oobavail() 642 return mtd_div_by_ws(mtd_mod_by_eb(offs, mtd), mtd); in mtd_offset_to_wunit() [all …]
|
/linux-6.3-rc2/drivers/mtd/ |
A D | mtdcore.c | 46 return mtd ? mtd_suspend(mtd) : 0; in mtd_cls_suspend() 390 mtd->_reboot(mtd); in mtd_reboot_notifier() 715 dev_set_drvdata(&mtd->dev, mtd); in add_mtd_device() 748 mtd->index, mtd->name); in add_mtd_device() 799 mtd->index, mtd->name, mtd->usecount); in del_mtd_device() 1181 if (mtd && mtd != ret) in get_mtd_device() 1221 mtd = mtd->parent; in __get_mtd_device() 1310 mtd = mtd->parent; in __put_mtd_device() 1452 mtd = mtd->parent; in mtd_update_ecc_stats() 2301 mtd = mtd->parent; in mtd_block_markbad() [all …]
|
A D | mtdpstore.c | 30 struct mtd_info *mtd = cxt->mtd; in mtdpstore_block_isbad() local 52 struct mtd_info *mtd = cxt->mtd; in mtdpstore_panic_block_isbad() local 63 struct mtd_info *mtd = cxt->mtd; in mtdpstore_mark_used() local 73 struct mtd_info *mtd = cxt->mtd; in mtdpstore_mark_unused() local 83 struct mtd_info *mtd = cxt->mtd; in mtdpstore_block_mark_unused() local 110 struct mtd_info *mtd = cxt->mtd; in mtdpstore_block_is_used() local 128 struct mtd_info *mtd = cxt->mtd; in mtdpstore_is_empty() local 142 struct mtd_info *mtd = cxt->mtd; in mtdpstore_mark_removed() local 152 struct mtd_info *mtd = cxt->mtd; in mtdpstore_block_clear_removed() local 168 struct mtd_info *mtd = cxt->mtd; in mtdpstore_block_is_removed() local [all …]
|
A D | mtdchar.c | 80 mfi->mtd = mtd; in mtdchar_open() 94 struct mtd_info *mtd = mfi->mtd; in mtdchar_close() local 100 mtd_sync(mtd); in mtdchar_close() 131 struct mtd_info *mtd = mfi->mtd; in mtdchar_read() local 221 struct mtd_info *mtd = mfi->mtd; in mtdchar_write() local 312 struct mtd_info *mtd = mfi->mtd; in otp_select_filemode() local 825 struct mtd_info *mtd = mfi->mtd; in mtdchar_ioctl() local 1234 struct mtd_info *mtd = mfi->mtd; in mtdchar_unlocked_ioctl() local 1260 struct mtd_info *mtd = mfi->mtd; in mtdchar_compat_ioctl() local 1348 struct mtd_info *mtd = mfi->mtd; in mtdchar_get_unmapped_area() local [all …]
|
A D | mtdconcat.c | 30 struct mtd_info mtd; member 83 mtd->ecc_stats.failed++; in concat_read() 86 mtd->ecc_stats.corrected++; in concat_read() 200 if (mtd->writesize > 1) { in concat_writev() 202 if (do_div(__to, mtd->writesize) || (total_len % mtd->writesize)) in concat_writev() 287 mtd->ecc_stats.failed++; in concat_read_oob() 290 mtd->ecc_stats.corrected++; in concat_read_oob() 624 mtd->ecc_stats.badblocks++; in concat_block_markbad() 727 concat->mtd.flags |= in mtd_concat_create() 759 concat->mtd.name = name; in mtd_concat_create() [all …]
|
A D | mtdoops.c | 58 struct mtd_info *mtd; member 85 struct mtd_info *mtd = cxt->mtd; in mtdoops_erase_block() local 86 u32 start_page_offset = mtd_div_by_eb(offset, mtd) * mtd->erasesize; in mtdoops_erase_block() 113 struct mtd_info *mtd = cxt->mtd; in mtdoops_erase() local 117 if (!mtd) in mtdoops_erase() 201 struct mtd_info *mtd = cxt->mtd; in mtdoops_write() local 247 struct mtd_info *mtd = cxt->mtd; in find_next_position() local 341 if (mtd->size < mtd->erasesize * 2) { in mtdoops_notify_add() 343 mtd->index); in mtdoops_notify_add() 377 cxt->mtd = mtd; in mtdoops_notify_add() [all …]
|
A D | mtdblock.c | 57 ret = mtd_erase(mtd, &erase); in erase_write() 61 pos, len, mtd->name); in erase_write() 80 struct mtd_info *mtd = mtdblk->mbd.mtd; in write_cached_data() local 113 struct mtd_info *mtd = mtdblk->mbd.mtd; in do_cached_write() local 119 mtd->name, pos, len); in do_cached_write() 183 struct mtd_info *mtd = mtdblk->mbd.mtd; in do_cached_read() local 189 mtd->name, pos, len); in do_cached_read() 268 if (!(mbd->mtd->flags & MTD_NO_ERASE) && mbd->mtd->erasesize) { in mtdblock_open() 294 mtd_sync(mbd->mtd); in mtdblock_release() 309 mtd_sync(dev->mtd); in mtdblock_flush() [all …]
|
A D | mtdsuper.c | 32 mtd->index, mtd->name); in mtd_test_super() 37 sb->s_mtd->index, sb->s_mtd->name, mtd->index, mtd->name); in mtd_test_super() 65 fc->sget_key = mtd; in mtd_get_sb() 73 mtd->index, mtd->name); in mtd_get_sb() 74 put_mtd_device(mtd); in mtd_get_sb() 78 mtd->index, mtd->name); in mtd_get_sb() 103 struct mtd_info *mtd; in mtd_get_sb_by_nr() local 106 if (IS_ERR(mtd)) { in mtd_get_sb_by_nr() 108 return PTR_ERR(mtd); in mtd_get_sb_by_nr() 143 struct mtd_info *mtd; in get_tree_mtd() local [all …]
|
/linux-6.3-rc2/drivers/mtd/nand/onenand/ |
A D | onenand_base.c | 1386 this->command(mtd, readcmd, from, mtd->oobsize); in onenand_read_oob_nolock() 1573 this->command(mtd, readcmd, from, mtd->oobsize); in onenand_bbt_read_oob() 1621 this->command(mtd, readcmd, to, mtd->oobsize); in onenand_verify_oob() 1750 this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize); in onenand_panic_write() 1918 this->command(mtd, cmd, to, mtd->writesize); in onenand_write_ops_nolock() 2027 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize); in onenand_write_oob_nolock() 2045 this->command(mtd, oobcmd, to, mtd->oobsize); in onenand_write_oob_nolock() 3750 mtd->oobsize = mtd->writesize >> 5; in onenand_probe() 3752 mtd->erasesize = mtd->writesize << 6; in onenand_probe() 3933 this->subpagesize = mtd->writesize >> mtd->subpage_sft; in onenand_scan() [all …]
|
/linux-6.3-rc2/drivers/mtd/nand/raw/ |
A D | mpc5121_nfc.c | 142 nfc_write(mtd, reg, nfc_read(mtd, reg) | bits); in nfc_set() 148 nfc_write(mtd, reg, nfc_read(mtd, reg) & ~bits); in nfc_clear() 156 mpc5121_nfc_done(mtd); in mpc5121_nfc_send_addr() 164 mpc5121_nfc_done(mtd); in mpc5121_nfc_send_cmd() 172 mpc5121_nfc_done(mtd); in mpc5121_nfc_send_prog_page() 180 mpc5121_nfc_done(mtd); in mpc5121_nfc_send_read_page() 188 mpc5121_nfc_done(mtd); in mpc5121_nfc_send_read_id() 416 sbsize = (mtd->oobsize / (mtd->writesize / 512)) & ~1; in mpc5121_nfc_copy_spare() 762 nfc_write(mtd, NFC_SPAS, mtd->oobsize >> 1); in mpc5121_nfc_probe() 766 mtd); in mpc5121_nfc_probe() [all …]
|
/linux-6.3-rc2/drivers/mtd/ubi/ |
A D | gluebi.c | 44 struct mtd_info mtd; member 92 gluebi = container_of(mtd, struct gluebi_device, mtd); in gluebi_get_device() 134 gluebi = container_of(mtd, struct gluebi_device, mtd); in gluebi_put_device() 159 gluebi = container_of(mtd, struct gluebi_device, mtd); in gluebi_read() 199 gluebi = container_of(mtd, struct gluebi_device, mtd); in gluebi_write() 202 if (len % mtd->writesize || offs % mtd->writesize) in gluebi_write() 244 gluebi = container_of(mtd, struct gluebi_device, mtd); in gluebi_erase() 288 mtd = &gluebi->mtd; in gluebi_create() 290 if (!mtd->name) { in gluebi_create() 368 mtd = &gluebi->mtd; in gluebi_remove() [all …]
|
/linux-6.3-rc2/drivers/mtd/chips/ |
A D | map_ram.c | 36 struct mtd_info *mtd; in map_ram_probe() local 59 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_ram_probe() 60 if (!mtd) in map_ram_probe() 64 mtd->priv = map; in map_ram_probe() 65 mtd->name = map->name; in map_ram_probe() 66 mtd->type = MTD_RAM; in map_ram_probe() 67 mtd->size = map->size; in map_ram_probe() 76 mtd->writesize = 1; in map_ram_probe() 79 while(mtd->size & (mtd->erasesize - 1)) in map_ram_probe() 80 mtd->erasesize >>= 1; in map_ram_probe() [all …]
|
A D | map_rom.c | 45 struct mtd_info *mtd; in map_rom_probe() local 47 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_rom_probe() 48 if (!mtd) in map_rom_probe() 52 mtd->priv = map; in map_rom_probe() 53 mtd->name = map->name; in map_rom_probe() 54 mtd->type = MTD_ROM; in map_rom_probe() 55 mtd->size = map->size; in map_rom_probe() 60 mtd->_sync = maprom_nop; in map_rom_probe() 64 mtd->writesize = 1; in map_rom_probe() 65 mtd->writebufsize = 1; in map_rom_probe() [all …]
|
A D | map_absent.c | 47 struct mtd_info *mtd; in map_absent_probe() local 49 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_absent_probe() 50 if (!mtd) { in map_absent_probe() 55 mtd->priv = map; in map_absent_probe() 56 mtd->name = map->name; in map_absent_probe() 57 mtd->type = MTD_ABSENT; in map_absent_probe() 58 mtd->size = map->size; in map_absent_probe() 63 mtd->flags = 0; in map_absent_probe() 64 mtd->erasesize = PAGE_SIZE; in map_absent_probe() 65 mtd->writesize = 1; in map_absent_probe() [all …]
|
/linux-6.3-rc2/drivers/mtd/devices/ |
A D | mtdram.c | 68 *virt = mtd->priv + from; in ram_point() 127 memset(mtd, 0, sizeof(*mtd)); in mtdram_init_device() 130 mtd->name = name; in mtdram_init_device() 131 mtd->type = MTD_RAM; in mtdram_init_device() 132 mtd->flags = MTD_CAP_RAM; in mtdram_init_device() 133 mtd->size = size; in mtdram_init_device() 134 mtd->writesize = 1; in mtdram_init_device() 140 mtd->_erase = ram_erase; in mtdram_init_device() 141 mtd->_point = ram_point; in mtdram_init_device() 143 mtd->_read = ram_read; in mtdram_init_device() [all …]
|
A D | powernv_flash.c | 31 struct mtd_info mtd; member 50 struct device *dev = &mtd->dev; in powernv_flash_async_op() 186 struct mtd_info *mtd) in powernv_flash_set_driver_info() argument 210 mtd->type = MTD_NORFLASH; in powernv_flash_set_driver_info() 211 mtd->flags = MTD_WRITEABLE; in powernv_flash_set_driver_info() 212 mtd->size = size; in powernv_flash_set_driver_info() 213 mtd->erasesize = erase_size; in powernv_flash_set_driver_info() 214 mtd->writebufsize = mtd->writesize = 1; in powernv_flash_set_driver_info() 215 mtd->owner = THIS_MODULE; in powernv_flash_set_driver_info() 219 mtd->dev.parent = dev; in powernv_flash_set_driver_info() [all …]
|
/linux-6.3-rc2/drivers/mtd/tests/ |
A D | oobtest.c | 356 if (IS_ERR(mtd)) { in mtd_oobtest_init() 367 tmp = mtd->size; in mtd_oobtest_init() 370 pgcnt = mtd->erasesize / mtd->writesize; in mtd_oobtest_init() 375 (unsigned long long)mtd->size, mtd->erasesize, in mtd_oobtest_init() 376 mtd->writesize, ebcnt, pgcnt, mtd->oobsize); in mtd_oobtest_init() 551 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 570 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 596 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 615 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 644 addr = (loff_t)(i + 1) * mtd->erasesize - mtd->writesize; in mtd_oobtest_init() [all …]
|
A D | pagetest.c | 28 static struct mtd_info *mtd; variable 47 return mtdtest_write(mtd, addr, mtd->erasesize, writebuf); in write_eraseblock() 59 addr0 += mtd->erasesize; in verify_eraseblock() 61 addrn = mtd->size; in verify_eraseblock() 129 addrn = mtd->size; in crosstest() 337 if (IS_ERR(mtd)) { in mtd_pagetest_init() 338 err = PTR_ERR(mtd); in mtd_pagetest_init() 348 tmp = mtd->size; in mtd_pagetest_init() 351 pgcnt = mtd->erasesize / mtd->writesize; in mtd_pagetest_init() 357 (unsigned long long)mtd->size, mtd->erasesize, in mtd_pagetest_init() [all …]
|
A D | stresstest.c | 32 static struct mtd_info *mtd; variable 73 if (offs >= mtd->erasesize) in do_read() 74 offs -= mtd->erasesize; in do_read() 113 offs -= mtd->erasesize; in do_write() 145 if (IS_ERR(mtd)) { in mtd_stresstest_init() 146 err = PTR_ERR(mtd); in mtd_stresstest_init() 151 if (mtd->writesize == 1) { in mtd_stresstest_init() 156 pgsize = mtd->writesize; in mtd_stresstest_init() 158 tmp = mtd->size; in mtd_stresstest_init() 166 (unsigned long long)mtd->size, mtd->erasesize, in mtd_stresstest_init() [all …]
|
A D | speedtest.c | 33 static struct mtd_info *mtd; variable 53 err = mtd_erase(mtd, &ei); in multiblock_erase() 67 return mtdtest_write(mtd, addr, mtd->erasesize, iobuf); in write_eraseblock() 111 return mtdtest_read(mtd, addr, mtd->erasesize, iobuf); in read_eraseblock() 194 if (IS_ERR(mtd)) { in mtd_speedtest_init() 195 err = PTR_ERR(mtd); in mtd_speedtest_init() 200 if (mtd->writesize == 1) { in mtd_speedtest_init() 205 pgsize = mtd->writesize; in mtd_speedtest_init() 207 tmp = mtd->size; in mtd_speedtest_init() 215 (unsigned long long)mtd->size, mtd->erasesize, in mtd_speedtest_init() [all …]
|
A D | readtest.c | 26 static struct mtd_info *mtd; variable 49 if (mtd->oobsize) { in read_eraseblock_by_page() 70 oobbuf += mtd->oobsize; in read_eraseblock_by_page() 86 n = mtd->erasesize; in dump_eraseblock() 96 if (!mtd->oobsize) in dump_eraseblock() 99 n = mtd->oobsize; in dump_eraseblock() 129 if (IS_ERR(mtd)) { in mtd_readtest_init() 130 err = PTR_ERR(mtd); in mtd_readtest_init() 142 tmp = mtd->size; in mtd_readtest_init() 150 (unsigned long long)mtd->size, mtd->erasesize, in mtd_readtest_init() [all …]
|
A D | nandbiterrs.c | 95 return mtdtest_write(mtd, offset, mtd->writesize, wbuffer); in write_page() 108 ops.len = mtd->writesize; in rewrite_page() 140 err = mtd_read(mtd, offset, mtd->writesize, &read, rbuffer); in read_page() 184 while (byte < mtd->writesize) { in insert_biterror() 337 if (IS_ERR(mtd)) { in mtd_nandbiterrs_init() 338 err = PTR_ERR(mtd); in mtd_nandbiterrs_init() 343 if (!mtd_type_is_nand(mtd)) { in mtd_nandbiterrs_init() 350 (unsigned long long)mtd->size, mtd->erasesize, in mtd_nandbiterrs_init() 351 mtd->writesize, mtd->oobsize); in mtd_nandbiterrs_init() 353 subsize = mtd->writesize >> mtd->subpage_sft; in mtd_nandbiterrs_init() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/sfc/siena/ |
A D | mtd.c | 16 #define to_efx_mtd_partition(mtd) \ argument 17 container_of(mtd, struct efx_mtd_partition, mtd) 23 struct efx_nic *efx = mtd->priv; in efx_mtd_erase() 31 struct efx_nic *efx = mtd->priv; in efx_mtd_sync() 34 rc = efx->type->mtd_sync(mtd); in efx_mtd_sync() 64 part->mtd.writesize = 1; in efx_siena_mtd_add() 69 part->mtd.owner = THIS_MODULE; in efx_siena_mtd_add() 70 part->mtd.priv = efx; in efx_siena_mtd_add() 71 part->mtd.name = part->name; in efx_siena_mtd_add() 72 part->mtd._erase = efx_mtd_erase; in efx_siena_mtd_add() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/sfc/ |
A D | mtd.c | 16 #define to_efx_mtd_partition(mtd) \ argument 17 container_of(mtd, struct efx_mtd_partition, mtd) 23 struct efx_nic *efx = mtd->priv; in efx_mtd_erase() 31 struct efx_nic *efx = mtd->priv; in efx_mtd_sync() 34 rc = efx->type->mtd_sync(mtd); in efx_mtd_sync() 64 part->mtd.writesize = 1; in efx_mtd_add() 69 part->mtd.owner = THIS_MODULE; in efx_mtd_add() 70 part->mtd.priv = efx; in efx_mtd_add() 71 part->mtd.name = part->name; in efx_mtd_add() 72 part->mtd._erase = efx_mtd_erase; in efx_mtd_add() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/sfc/falcon/ |
A D | mtd.c | 16 #define to_ef4_mtd_partition(mtd) \ argument 17 container_of(mtd, struct ef4_mtd_partition, mtd) 23 struct ef4_nic *efx = mtd->priv; in ef4_mtd_erase() 31 struct ef4_nic *efx = mtd->priv; in ef4_mtd_sync() 34 rc = efx->type->mtd_sync(mtd); in ef4_mtd_sync() 64 part->mtd.writesize = 1; in ef4_mtd_add() 66 part->mtd.owner = THIS_MODULE; in ef4_mtd_add() 67 part->mtd.priv = efx; in ef4_mtd_add() 68 part->mtd.name = part->name; in ef4_mtd_add() 69 part->mtd._erase = ef4_mtd_erase; in ef4_mtd_add() [all …]
|