From: Wolfgang Denk Date: Fri, 27 Jul 2012 15:35:12 +0200 Subject: [U-Boot] [PATCH v2 3/7] dfu: DFU backend implementation In-Reply-To: <20120727151523.41406989@amdc308.digital.local> References: <1341308291-14663-1-git-send-email-l.majewski@samsung.com> <1341416922-13792-1-git-send-email-l.majewski@samsung.com> <1341416922-13792-4-git-send-email-l.majewski@samsung.com> <20120727115848.5D50E200347@gemini.denx.de> <20120727151523.41406989@amdc308.digital.local> Message-ID: <20120727133512.B0B09200347@gemini.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, 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