[U-Boot] [PATCH v2 4/7] dfu: MMC specific routines for DFU operation
Marek Vasut
marex at denx.de
Mon Jul 9 18:36:41 CEST 2012
Dear Lukasz Majewski,
> Support for MMC storage devices to work with DFU framework.
>
> Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> Cc: Marek Vasut <marex at denx.de>
>
This one opens some questions.
[...]
> +int dfu_fill_entity_mmc(struct dfu_entity *dfu, char* s)
> +{
> + char *st = NULL;
> + int n = 0;
> +
> + dfu->dev_type = MMC;
> + st = dfu_extract_token(&s, &n);
> +
> + if (!strncmp(st, "mmc", n)) {
> + dfu->layout = RAW_ADDR;
> +
> + dfu->data.mmc.lba_start = simple_strtoul(s, &s, 16);
> + dfu->data.mmc.lba_size = simple_strtoul(++s, &s, 16);
> + dfu->data.mmc.lba_blk_size = get_mmc_blk_size(dfu->dev_num);
> +
^ one line too much.
> + } else if (!strncmp(st, "fat", n)) {
> + dfu->layout = FAT;
> +
> + dfu->data.mmc.dev = simple_strtoul(s, &s, 10);
> + dfu->data.mmc.part = simple_strtoul(++s, &s, 10);
> +
> + } else {
> + printf("%s: Wrong memory layout!\n", __func__);
> + }
> +
> + dfu->read_medium = dfu_read_medium_mmc;
> + dfu->write_medium = dfu_write_medium_mmc;
> +
> + return 0;
> +}
Best regards,
Marek Vasut
More information about the U-Boot
mailing list