[U-Boot] [PATCH 1/3] [OneNAND] Flex-OneNAND driver support
Scott Wood
scottwood at freescale.com
Thu Nov 5 23:59:06 CET 2009
On Wed, Nov 04, 2009 at 10:37:17AM +0530, Amul Kumar Saha wrote:
> This patch adds support for Flex-OneNAND devices.
>
> Signed-off-by: Rohit Hagargundgi <h.rohit at samsung.com>
> Signed-off-by: Amul Kumar Saha <amul.saha at samsung.com>
A couple 64-bit offset nits...
> +static void flexonenand_get_size(struct mtd_info *mtd)
> +{
> + struct onenand_chip *this = mtd->priv;
> + int die, ofs, i, eraseshift, density;
[snip]
> + for (; die < this->dies; die++) {
> + if (!die || this->boundary[die-1] != maxbdry) {
> + i++;
> + mtd->eraseregions[i].offset = ofs;
> + mtd->eraseregions[i].erasesize = 1 << eraseshift;
> + mtd->eraseregions[i].numblocks =
> + this->boundary[die] + 1;
> + ofs += mtd->eraseregions[i].numblocks << eraseshift;
"ofs" should be loff_t.
> + printk(KERN_INFO "Device has %d eraseregions\n", mtd->numeraseregions);
> + for (i = 0; i < mtd->numeraseregions; i++)
> + printk(KERN_INFO "[offset: 0x%08x, erasesize: 0x%05x,"
> + " numblocks: %04u]\n", mtd->eraseregions[i].offset,
> + mtd->eraseregions[i].erasesize,
> + mtd->eraseregions[i].numblocks);
offset is uint64_t, so use %08llx. This gives a warning...
If you want, I can just fix these up -- but give it a retest afterward.
-Scott
More information about the U-Boot
mailing list