Lines Matching refs:mtd
19 #define to_efx_mtd_partition(mtd) \ argument
20 container_of(mtd, struct efx_mtd_partition, mtd)
24 static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) in efx_mtd_erase() argument
26 struct efx_nic *efx = mtd->priv; in efx_mtd_erase()
29 rc = efx->type->mtd_erase(mtd, erase->addr, erase->len); in efx_mtd_erase()
40 static void efx_mtd_sync(struct mtd_info *mtd) in efx_mtd_sync() argument
42 struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); in efx_mtd_sync()
43 struct efx_nic *efx = mtd->priv; in efx_mtd_sync()
46 rc = efx->type->mtd_sync(mtd); in efx_mtd_sync()
57 rc = mtd_device_unregister(&part->mtd); in efx_mtd_remove_partition()
76 part->mtd.writesize = 1; in efx_mtd_add()
78 part->mtd.owner = THIS_MODULE; in efx_mtd_add()
79 part->mtd.priv = efx; in efx_mtd_add()
80 part->mtd.name = part->name; in efx_mtd_add()
81 part->mtd._erase = efx_mtd_erase; in efx_mtd_add()
82 part->mtd._read = efx->type->mtd_read; in efx_mtd_add()
83 part->mtd._write = efx->type->mtd_write; in efx_mtd_add()
84 part->mtd._sync = efx_mtd_sync; in efx_mtd_add()
88 if (mtd_device_register(&part->mtd, NULL, 0)) in efx_mtd_add()