[U-Boot] [PATCH v2 3/7] dfu: DFU backend implementation

Wolfgang Denk
2012-07-27T13:35:12Z

Dear Lukasz,

In message <20120727151523.41406989@amdc308.digital.local> you wrote:
>
> Some clarification is needed. I've divided DFU support (PATCH v2) to
> three separate parts:
> 1. DFU transmission handling (via USB)
...
> 2. Generic DFU functions ./drivers/dfu/dfu.c - which try to abstract
> DFU operation to be platform independent.
...
> 3. Code for MMC write/read - dfu_mmc.c.

OK, than my understanding was mostly correct.

> It is possible to read/write raw data to MMC (with passing LBA address)
> or to file systems (like FAT). For now MMC is only supported. It uses
> (in my opinion) "generic" sprintf+run_command() calls, which can be
> easily extended.
> To support OneNAND one needs to define dfu_onenand.c file with OneNAND
> specific functions.

Correct. And adaption for other devices (say, NAND or USB mass
storage) should be trivial as well.

> Considering above, there are already defined "generic" access functions
> - dfu_{write|read}.

OK - but the device specific stuff is only used in the sprintf()
command then. That's why I recommend to move just this very small
function into a separate file, which can be replaced or removed later.

> > So this currently supports MMC, OneNAND and NAND as storage devices?
>
> It currently only supports MMC devices. Others (ONENAND/NAND) have been
> added as place holders for future usage.

Yes, I understand. But then, adding such support looks pretty
straightforward, and even trivial to me. You provided a pretty clear
infrastructure for this, thanks.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I thought my people would grow tired of killing. But you were right,
they see it is easier than trading. And it has its pleasures. I feel
it myself. Like the hunt, but with richer rewards.
-- Apella, "A Private Little War", stardate 4211.8