Searched refs:nsmtd (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/drivers/mtd/nand/
H A Dnandsim.c451 static struct mtd_info *nsmtd; variable in typeref:struct:mtd_info
1460 nsmtd->ecc_stats.corrected, nsmtd->ecc_stats.failed); do_bit_flips()
2239 nsmtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip) ns_init_module()
2241 if (!nsmtd) { ns_init_module()
2245 chip = (struct nand_chip *)(nsmtd + 1); ns_init_module()
2246 nsmtd->priv = (void *)chip; ns_init_module()
2297 nsmtd->owner = THIS_MODULE; ns_init_module()
2308 retval = nand_scan_ident(nsmtd, 1, NULL); ns_init_module()
2324 eccsteps = nsmtd->writesize/512; ns_init_module()
2327 if ((nsmtd->oobsize < 64) || !eccsteps) { ns_init_module()
2332 if ((eccbytes*eccsteps+2) > nsmtd->oobsize) { ns_init_module()
2344 retval = nand_scan_tail(nsmtd); ns_init_module()
2353 uint64_t new_size = (uint64_t)nsmtd->erasesize << overridesize; ns_init_module()
2354 if (new_size >> overridesize != nsmtd->erasesize) { ns_init_module()
2360 nsmtd->size = new_size; ns_init_module()
2362 chip->chip_shift = ffs(nsmtd->erasesize) + overridesize - 1; ns_init_module()
2366 if ((retval = setup_wear_reporting(nsmtd)) != 0) ns_init_module()
2372 if ((retval = init_nandsim(nsmtd)) != 0) ns_init_module()
2375 if ((retval = chip->scan_bbt(nsmtd)) != 0) ns_init_module()
2378 if ((retval = parse_badblocks(nand, nsmtd)) != 0) ns_init_module()
2382 retval = mtd_device_register(nsmtd, &nand->partitions[0], ns_init_module()
2391 nand_release(nsmtd); ns_init_module()
2395 kfree(nsmtd); ns_init_module()
2408 struct nandsim *ns = ((struct nand_chip *)nsmtd->priv)->priv; ns_cleanup_module()
2413 nand_release(nsmtd); /* Unregister driver */ ns_cleanup_module()
2416 kfree(nsmtd); /* Free other structures */ ns_cleanup_module()

Completed in 75 milliseconds