public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] Add 'sf update' command to do smart SPI flash update
Date: Fri, 19 Aug 2011 18:28:04 -0400	[thread overview]
Message-ID: <201108191828.05365.vapier@gentoo.org> (raw)
In-Reply-To: <CAPnjgZ21EFRSFPoUETBMgUksXeqNxKmEdqXemXG0Fo4Wti9nEA@mail.gmail.com>

On Friday, August 19, 2011 17:25:10 Simon Glass wrote:
> On Fri, Aug 19, 2011 at 3:15 PM, Mike Frysinger wrote:
> > On Friday, August 19, 2011 15:28:48 Simon Glass wrote:
> >> This adds a new SPI flash command which only rewrites blocks if the
> >> contents need to change. This can speed up SPI flash programming when
> >> much of the data is unchanged from what is already there.
> > 
> > looks good to me.  i'll give it a spin on a board of mine and then push
> > into my sf branch.  i really should write a spi flash simulation so i
> > could just test this from gdb ...
> 
> Funny you should say that. I rather badly need a way of testing the
> higher level U-Boot code (from the commands down to where it calls
> architecture/driver code). I am drafting up an email to send to the
> list with some thoughts on the matter.

when i wrote the blackfin system level port of the gnu sim, it was so i could 
do this (and i thought it'd be bad-ass).  i often use the gnu sim to do 
initial testing (sometimes down to the driver level) before i get around to 
loading up on actual hardware.

$ bfin-elf-run --env operating --model bf537 ./u-boot


U-Boot 2011.06-00375-g23ffb39-dirty (Aug 14 2011 - 16:54:03)

CPU:   ADSP bf537-0.2 (Detected Rev: 0.0) (bypass boot)
Board: ADI BF537 stamp board
       Support: http://blackfin.uclinux.org/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz
RAM:   64 MiB
Flash: ## Unknown flash on Bank 1 - Size = 0x00000000 = 0 MB
0 Bytes
MMC:   
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
KGDB:  [on serial] ready
Warning: Generating 'random' MAC address
Net:   bfin_mac
Hit any key to stop autoboot:  5  0 
bfin> help sf
sf - SPI flash sub-system

Usage:
sf probe [bus:]cs [hz] [mode]   - init flash device on given SPI bus
                                  and chip select
sf read addr offset len         - read `len' bytes starting at
                                  `offset' to memory at `addr'
sf write addr offset len        - write `len' bytes from memory
                                  at `addr' to flash at `offset'
sf erase offset [+]len          - erase `len' bytes from `offset'
                                  `+len' round up `len' to block size
bfin> 
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110819/4627a91d/attachment.pgp 

  reply	other threads:[~2011-08-19 22:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 19:28 [U-Boot] [PATCH v3] Add 'sf update' command to do smart SPI flash update Simon Glass
2011-08-19 21:15 ` Mike Frysinger
2011-08-19 21:25   ` Simon Glass
2011-08-19 22:28     ` Mike Frysinger [this message]
2011-08-23 22:01       ` Simon Glass
2011-08-23 22:16         ` Mike Frysinger
2011-08-24  3:41           ` Che-liang Chiou
2011-08-24  4:11             ` Simon Glass
2011-08-20 22:35 ` [U-Boot] [PATCH v4] cmd_sf: add "update" subcommand " Mike Frysinger
2011-08-20 23:04   ` Marek Vasut
2011-08-21 10:37     ` Simon Glass
2011-08-21 16:35       ` Mike Frysinger
2011-08-22 22:53         ` Simon Glass
2011-08-21 10:27   ` Simon Glass
2011-08-21 16:34     ` Mike Frysinger

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=201108191828.05365.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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