/u-boot/cmd/ |
H A D | fwu_mdata.c | 16 static void print_mdata(struct fwu_mdata *mdata) argument 23 printf("crc32: %#x\n", mdata->crc32); 24 printf("version: %#x\n", mdata->version); 25 printf("active_index: %#x\n", mdata->active_index); 26 printf("previous_active_index: %#x\n", mdata->previous_active_index); 30 img_entry = &mdata->img_entry[i]; 47 struct fwu_mdata mdata; local 49 res = fwu_get_mdata(&mdata); 56 print_mdata(&mdata);
|
/u-boot/drivers/fwu-mdata/ |
H A D | Makefile | 7 obj-$(CONFIG_FWU_MDATA) += fwu-mdata-uclass.o
|
H A D | fwu-mdata-uclass.c | 23 int fwu_read_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary) argument 32 return ops->read_mdata(dev, mdata, primary); 40 int fwu_write_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary) argument 49 return ops->write_mdata(dev, mdata, primary); 54 .name = "fwu-mdata",
|
H A D | gpt_blk.c | 85 struct fwu_mdata *mdata, 95 if (!mdata) 104 len = sizeof(*mdata); 117 memcpy(mdata, mdata_aligned, sizeof(struct fwu_mdata)); 119 if (blk_dwrite(desc, blk_start, blkcnt, mdata) != blkcnt) { 135 phandle_p = dev_read_prop(dev, "fwu-mdata-store", &size); 137 log_debug("fwu-mdata-store property not found\n"); 166 static int fwu_gpt_read_mdata(struct udevice *dev, struct fwu_mdata *mdata, argument 179 return gpt_read_write_mdata(desc, mdata, MDATA_READ, 183 static int fwu_gpt_write_mdata(struct udevice *dev, struct fwu_mdata *mdata, argument 84 gpt_read_write_mdata(struct blk_desc *desc, struct fwu_mdata *mdata, u8 access, u32 part_num) argument [all...] |
H A D | raw_mtd.c | 100 static int fwu_mtd_read_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary) argument 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) argument 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 [all...] |
/u-boot/lib/fwu_updates/ |
H A D | fwu.c | 109 static int in_trial_state(struct fwu_mdata *mdata) argument 115 active_bank = mdata->active_index; 116 img_entry = &mdata->img_entry[0]; 146 * @mdata: FWU metadata structure 151 static int fwu_sync_mdata(struct fwu_mdata *mdata, int part) argument 153 void *buf = &mdata->version; 157 err = fwu_sync_mdata(mdata, SECONDARY_PART); 168 mdata->crc32 = crc32(0, buf, sizeof(*mdata) - sizeof(u32)); 170 err = fwu_write_mdata(g_dev, mdata, par 183 mdata_crc_check(struct fwu_mdata *mdata) argument 201 fwu_get_mdata(struct fwu_mdata *mdata) argument 278 struct fwu_mdata *mdata = &g_mdata; local 305 struct fwu_mdata *mdata = &g_mdata; local 349 struct fwu_mdata *mdata = &g_mdata; local 410 struct fwu_mdata *mdata = &g_mdata; local 451 struct fwu_mdata *mdata = &g_mdata; local [all...] |
H A D | fwu_mtd.c | 123 * List the image banks in the FWU mdata and search the corresponding 161 struct fwu_mdata mdata; local 164 ret = fwu_get_mdata(&mdata); 166 log_err("Failed to get the FWU mdata.\n"); 172 &mdata.img_entry[i], mtd);
|
/u-boot/test/dm/ |
H A D | fwu_mdata.c | 94 struct fwu_mdata mdata = { 0 }; local 107 ut_assertok(fwu_get_mdata(&mdata)); 109 ut_asserteq(mdata.version, 0x1); 119 struct fwu_mdata mdata = { 0 }; local 133 ut_assertok(fwu_get_mdata(&mdata)); 135 active_idx = (mdata.active_index + 1) % CONFIG_FWU_NUM_BANKS; 138 ut_assertok(fwu_get_mdata(&mdata)); 139 ut_asserteq(mdata.active_index, active_idx);
|
/u-boot/include/ |
H A D | fwu.h | 33 * @mdata: Output FWU mdata read 38 int (*read_mdata)(struct udevice *dev, struct fwu_mdata *mdata, bool primary); 43 * @mdata: Copy of the FWU metadata to write 48 int (*write_mdata)(struct udevice *dev, struct fwu_mdata *mdata, bool primary); 83 int fwu_read_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary); 88 int fwu_write_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary); 99 int fwu_get_mdata(struct fwu_mdata *mdata);
|
/u-boot/tools/ |
H A D | mkfwumdata.c | 73 struct fwu_mdata *mdata; member in struct:fwu_mdata_object 93 mobj->mdata = calloc(1, mobj->size); 94 if (!mobj->mdata) { 111 return (struct fwu_image_entry *)((char *)mobj->mdata + offset); 125 return (struct fwu_image_bank_info *)((char *)mobj->mdata + offset); 222 struct fwu_mdata *mdata = mobj->mdata; local 225 mdata->version = FWU_MDATA_VERSION; 226 mdata->active_index = active_bank; 227 mdata [all...] |
/u-boot/drivers/usb/musb-new/ |
H A D | pic32.c | 49 struct musb_host_data mdata; member in struct:pic32_musb_data 223 struct musb_host_data *mdata = &pdata->mdata; local 251 mdata->host = musb_init_controller(&pic32_musb_plat, 253 if (!mdata->host) 256 ret = musb_lowlevel_init(mdata); 259 mdata->host = musb_register(&pic32_musb_plat, &pdata->dev, mregs); 260 if (!mdata->host) 263 if ((ret == 0) && mdata->host) 273 musb_stop(pdata->mdata [all...] |
H A D | ux500.c | 18 struct musb_host_data mdata; member in struct:ux500_glue 99 glue->mdata.host->isr(0, glue->mdata.host); 109 struct musb_host_data *host = &glue->mdata; 149 struct musb_host_data *host = &glue->mdata;
|
H A D | mt85xx.c | 34 struct musb_host_data mdata; member in struct:mtk_musb_glue 319 struct musb_host_data *host = &glue->mdata; 386 struct musb_host_data *host = &glue->mdata;
|
H A D | sunxi.c | 90 struct musb_host_data mdata; member in struct:sunxi_glue 435 struct musb_host_data *host = &glue->mdata; 500 struct musb_host_data *host = &glue->mdata;
|
/u-boot/drivers/ |
H A D | Makefile | 92 obj-$(CONFIG_FWU_MDATA) += fwu-mdata/
|