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()
28 return efx->type->mtd_erase(mtd, erase->addr, erase->len); in efx_mtd_erase()
31 static void efx_mtd_sync(struct mtd_info *mtd) in efx_mtd_sync() argument
33 struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); in efx_mtd_sync()
34 struct efx_nic *efx = mtd->priv; in efx_mtd_sync()
37 rc = efx->type->mtd_sync(mtd); in efx_mtd_sync()
48 rc = mtd_device_unregister(&part->mtd); in efx_mtd_remove_partition()
67 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()
73 part->mtd._read = efx->type->mtd_read; in efx_mtd_add()
74 part->mtd._write = efx->type->mtd_write; in efx_mtd_add()
75 part->mtd._sync = efx_mtd_sync; in efx_mtd_add()
79 if (mtd_device_register(&part->mtd, NULL, 0)) in efx_mtd_add()