From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] [DFU] Implement NAND dfu support
Date: Tue, 11 Dec 2012 15:40:09 -0700 [thread overview]
Message-ID: <20121211224009.GA32714@bill-the-cat> (raw)
In-Reply-To: <1355264677.13481.13@snotra>
On Tue, Dec 11, 2012 at 04:24:37PM -0600, Scott Wood wrote:
> On 12/10/2012 07:16:50 PM, Tom Rini wrote:
> >On Mon, Dec 10, 2012 at 07:09:55PM -0600, Scott Wood wrote:
> >> On 12/10/2012 09:24:32 AM, Pantelis Antoniou wrote:
> >> >+ sprintf(cmd_buf, "nand %s %p %llx %llx",
> >> >+ op == DFU_OP_READ ? "read" : "write",
> >> >+ buf, start, count);
> >> >+
> >> >+ debug("%s: %s 0x%p\n", __func__, cmd_buf, cmd_buf);
> >> >+ ret = run_command(cmd_buf, 0);
> >>
> >> Why not use the C interface to NAND?
> >>
> >> >+ /* find out how much actual bytes have been written */
> >> >+ /* the difference is the amount of skip we must add from now on
> >> >*/
> >> >+ actual = nand_extent_skip_bad(&nand_info[dev], start, count);
> >>
> >> ...especially since you already need to interact with it here?
> >
> >I've been talking with Pantelis about this as well and in short, this
> >series adds NAND support ala MMC (which is to say, (ab)using the
> >command
> >interface). I think he was thinking we need a bit more generic
> >help to
> >avoid having to duplicate the code the command interface also uses
> >(state, sanity checking), iirc.
>
> Some elaboration on what exactly he's relying on from the command
> line interface would be nice.
My gmane-fu is failing me, but the actual 4/7 parts of
http://search.gmane.org/?query=dfu+mmc+%224%2F7%22&author=&group=gmane.comp.boot-loaders.u-boot&sort=revdate&DEFAULTOP=and&%3E=Next&xP=Zdfu%09Zmmc%094%097&xFILTERS=Gcomp.boot-loaders.u-boot---A
show the discussion. In short, for MMC writing it's more complex
because we have a number of layouts we need to deal with (raw, FAT,
other), but yes, we should in the end migrate things to using the API
rather than abusing the command infrastructure.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121211/74ba1782/attachment.pgp>
next prev parent reply other threads:[~2012-12-11 22:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 15:24 [U-Boot] [PATCH] [DFU] Implement NAND dfu support Pantelis Antoniou
2012-12-11 1:09 ` Scott Wood
2012-12-11 1:16 ` Tom Rini
2012-12-11 22:24 ` Scott Wood
2012-12-11 22:40 ` Tom Rini [this message]
2012-12-11 7:56 ` Lukasz Majewski
2012-12-11 22:23 ` Scott Wood
2012-12-12 8:35 ` Lukasz Majewski
2012-12-11 9:38 ` Pantelis Antoniou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121211224009.GA32714@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox