Lines Matching defs:mdata
100 static int fwu_mtd_read_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary)
106 return mtd_io_data(mtd, offs, sizeof(struct fwu_mdata), mdata, FWU_MTD_READ);
109 static int fwu_mtd_write_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary)
115 return mtd_io_data(mtd, offs, sizeof(struct fwu_mdata), mdata, FWU_MTD_WRITE);
148 /* Find the FWU mdata storage device */
150 "fwu-mdata-store", &size);
170 log_debug("Found the FWU mdata mtd device %s\n", mtd->name);
175 log_err("Failed to find mtd device by fwu-mdata-store\n");
179 /* Get the offset of primary and secondary mdata */
180 ret = ofnode_read_string_index(dev_ofnode(dev), "mdata-parts", 0, &label);
190 ret = ofnode_read_string_index(dev_ofnode(dev), "mdata-parts", 1, &label);
257 { .compatible = "u-boot,fwu-mdata-mtd" },
262 .name = "fwu-mdata-mtd",