U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] dfu: dfu_sf: Use the erase sector size for erase operations
Date: Mon, 19 Oct 2015 20:06:42 -0400	[thread overview]
Message-ID: <20151020000642.GQ23893@bill-the-cat> (raw)
In-Reply-To: <1442894100-14406-1-git-send-email-festevam@gmail.com>

On Tue, Sep 22, 2015 at 12:55:00AM -0300, Fabio Estevam wrote:

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> SPI NOR flashes need to erase the entire sector size and we cannot pass
> any arbitrary length for the erase operation.
> 
> To illustrate the problem:
> 
> Copying data from PC to DFU device
> Download    [=========================] 100%       478208 bytes
> Download done.
> state(7) = dfuMANIFEST, status(0) = No error condition is present
> state(10) = dfuERROR, status(14) = Something went wrong, but the
> device does not know what it was
> Done!
> 
> In this case, the binary has 478208 bytes and the M25P32 SPI NOR
> has an erase sector of 64kB.
> 
> 478208  = 7 entire sectors of 64kiB + 19456 bytes.
> 
> Erasing the first seven 64 kB sectors works fine, but when trying
> to erase the remainding 19456 causes problem and the board hangs.
> 
> Fix the issue by always erasing with the erase sector size.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151019/e547c5e3/attachment.sig>

      parent reply	other threads:[~2015-10-20  0:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22  3:55 [U-Boot] [PATCH] dfu: dfu_sf: Use the erase sector size for erase operations Fabio Estevam
2015-09-22  7:46 ` Lukasz Majewski
2015-10-19  0:11   ` Fabio Estevam
2015-10-19  8:07     ` Lukasz Majewski
2015-10-19 10:56       ` Otavio Salvador
2015-10-19 11:08         ` Lukasz Majewski
2015-10-19 11:18         ` Lukasz Majewski
2015-10-20  0:06 ` Tom Rini [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=20151020000642.GQ23893@bill-the-cat \
    --to=trini@konsulko.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