
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:
- DFU transmission handling (via USB)
...
- Generic DFU functions ./drivers/dfu/dfu.c - which try to abstract
DFU operation to be platform independent.
...
- 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