From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 9 Jul 2012 18:36:41 +0200 Subject: [U-Boot] [PATCH v2 4/7] dfu: MMC specific routines for DFU operation In-Reply-To: <1341416922-13792-5-git-send-email-l.majewski@samsung.com> References: <1341308291-14663-1-git-send-email-l.majewski@samsung.com> <1341416922-13792-1-git-send-email-l.majewski@samsung.com> <1341416922-13792-5-git-send-email-l.majewski@samsung.com> Message-ID: <201207091836.41849.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Lukasz Majewski, > Support for MMC storage devices to work with DFU framework. > > Signed-off-by: Lukasz Majewski > Signed-off-by: Kyungmin Park > Cc: Marek Vasut > 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