From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] dfu, nand: writing on not empty nand partition
Date: Thu, 13 Jun 2013 14:52:14 +0200 [thread overview]
Message-ID: <51B9C07E.3040604@denx.de> (raw)
In-Reply-To: <51B9BC33.3070405@ti.com>
Hello Tom,
Am 13.06.2013 14:33, schrieb Tom Rini:
> On 06/13/2013 08:15 AM, Heiko Schocher wrote:
>> Hello,
>
>> I just tried to write with "dfu" and dfu-util on the host to a not
>> empty partiton on a nand flash. After the dfu returned without
>> error, I wanted to read the nand partiton with "nand read" and I
>> get ECC errors. This is on an am335x based board (mainline patches
>> coming soon) with ECC BCH8 enabled...
> [snip]
>> Is this a bug or a feature?
>
>> If it is a bug, I fixed it as I added in my tree in
>> drivers/mtd/nand/nand_util.c a nand_erase_write_skip_bad()
>> function, which erases before writes to "off, length" ... and call
>> this function in drivers/dfu/dfu_nand.c nand_block_op() instead
>> nand_write_skip_bad() ... Is this a possible solution?
>
> So yes, if you don't erase first, just like doing a nand write from
> the command line, it will fail. This is arguably a bug. But, I would
> go for making dfu_nand spell out a call to an existing erase function
> since we know the size of the alt setting to be written to.
Ok, can do it this way also ...
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
prev parent reply other threads:[~2013-06-13 12:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 12:15 [U-Boot] dfu, nand: writing on not empty nand partition Heiko Schocher
2013-06-13 12:33 ` Tom Rini
2013-06-13 12:52 ` Heiko Schocher [this message]
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=51B9C07E.3040604@denx.de \
--to=hs@denx.de \
--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