<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/cmd_sf.c, branch v2013.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>spi: Add SPI flash test</title>
<updated>2012-12-19T22:51:57+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2012-10-08T13:16:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2400727318a0a1ecf15a9deae85b0719c4c47aba'/>
<id>2400727318a0a1ecf15a9deae85b0719c4c47aba</id>
<content type='text'>
It is useful to have a basic SPI flash test, which tests that the SPI chip,
the SPI bus and the driver are behaving.

This test erases part of the flash, writes data and reads it back as a
sanity check that all is well.

Use CONFIG_SF_TEST to enable it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is useful to have a basic SPI flash test, which tests that the SPI chip,
the SPI bus and the driver are behaving.

This test erases part of the flash, writes data and reads it back as a
sanity check that all is well.

Use CONFIG_SF_TEST to enable it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: Add progress percentage and write speed to `sf update`</title>
<updated>2012-12-19T22:51:23+00:00</updated>
<author>
<name>James Miller</name>
<email>jamesmiller@chromium.org</email>
</author>
<published>2012-09-28T14:28:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a683c288d46336410ddfa2f5c70046dd1d4a5d1e'/>
<id>a683c288d46336410ddfa2f5c70046dd1d4a5d1e</id>
<content type='text'>
Output a progress update only at most 10 times per second, to avoid
saturating (and waiting on) the console. Make the summary line
to fit on a single line. Make sure that cursor sits at the end of
each update line instead of the beginning.

Sample output:

SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
Update SPI
1331200 bytes written, 2863104 bytes skipped in 21.912s, speed 199728 B/s

time: 21.919 seconds, 21919 ticks
Skipping verify

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: James Miller &lt;jamesmiller@chromium.org&gt;
Signed-off-by: Taylor Hutt &lt;thutt@chromium.org&gt;
[trini: Drop 'const' from bytes_per_second()]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Output a progress update only at most 10 times per second, to avoid
saturating (and waiting on) the console. Make the summary line
to fit on a single line. Make sure that cursor sits at the end of
each update line instead of the beginning.

Sample output:

SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
Update SPI
1331200 bytes written, 2863104 bytes skipped in 21.912s, speed 199728 B/s

time: 21.919 seconds, 21919 ticks
Skipping verify

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: James Miller &lt;jamesmiller@chromium.org&gt;
Signed-off-by: Taylor Hutt &lt;thutt@chromium.org&gt;
[trini: Drop 'const' from bytes_per_second()]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_sf: add size checking to spi flash commands</title>
<updated>2012-04-03T04:34:13+00:00</updated>
<author>
<name>Gerlando Falauto</name>
<email>gerlando.falauto@keymile.com</email>
</author>
<published>2012-04-03T04:34:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=864939949eda9108fb7bc350af040500cd102954'/>
<id>864939949eda9108fb7bc350af040500cd102954</id>
<content type='text'>
SPI flash operations inadvertently stretching beyond the flash size will
result in a wraparound. This may be particularly dangerous when burning
u-boot, because the flash contents will be corrupted rendering the board
unusable, without any warning being issued.
So add a consistency checking so not to overflow past the flash size.

Signed-off-by: Gerlando Falauto &lt;gerlando.falauto@keymile.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SPI flash operations inadvertently stretching beyond the flash size will
result in a wraparound. This may be particularly dangerous when burning
u-boot, because the flash contents will be corrupted rendering the board
unusable, without any warning being issued.
So add a consistency checking so not to overflow past the flash size.

Signed-off-by: Gerlando Falauto &lt;gerlando.falauto@keymile.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert cmd_usage() calls in common to use a return value</title>
<updated>2012-03-06T20:09:46+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2011-12-10T08:44:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4c12eeb8b55483e48ef98b8a480e2bbacc9f210d'/>
<id>4c12eeb8b55483e48ef98b8a480e2bbacc9f210d</id>
<content type='text'>
Change all files in common/ to use CMD_RET_USAGE instead of calling
cmd_usage() directly. I'm not completely sure about this patch since
the code since impact is small (100 byte or so on ARM) and it might
need splitting into smaller patches. But for now here it is.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change all files in common/ to use CMD_RET_USAGE instead of calling
cmd_usage() directly. I'm not completely sure about this patch since
the code since impact is small (100 byte or so on ARM) and it might
need splitting into smaller patches. But for now here it is.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sf command: allow default bus and chip selects</title>
<updated>2012-02-12T20:18:29+00:00</updated>
<author>
<name>Eric Nelson</name>
<email>eric.nelson@boundarydevices.com</email>
</author>
<published>2012-01-31T17:52:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c1173bd0754aa55bc52d874d5490c0c892a56ebf'/>
<id>c1173bd0754aa55bc52d874d5490c0c892a56ebf</id>
<content type='text'>
This patch allows a board configuration file to provide default bus
and chip-selects for SPI flash so that first argument to the 'sf' command
is optional.

On boards that use the mxc_spi driver and a GPIO for chip select, this allows
a much simpler command line:
	U-Boot&gt; sf probe
instead of
	U-Boot&gt; sf probe 0x5300

Tested-by: Jason Liu &lt;jason.hui@linaro.org&gt;
Signed-off-by: Eric Nelson &lt;eric.nelson@boundarydevices.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch allows a board configuration file to provide default bus
and chip-selects for SPI flash so that first argument to the 'sf' command
is optional.

On boards that use the mxc_spi driver and a GPIO for chip select, this allows
a much simpler command line:
	U-Boot&gt; sf probe
instead of
	U-Boot&gt; sf probe 0x5300

Tested-by: Jason Liu &lt;jason.hui@linaro.org&gt;
Signed-off-by: Eric Nelson &lt;eric.nelson@boundarydevices.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_sf.c: fix printf() length modifier</title>
<updated>2011-12-17T22:55:36+00:00</updated>
<author>
<name>Andreas Bießmann</name>
<email>biessmann@corscience.de</email>
</author>
<published>2011-12-15T08:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a97f6efdb1b4281d9e733a7b73735c5ed2e5cfcb'/>
<id>a97f6efdb1b4281d9e733a7b73735c5ed2e5cfcb</id>
<content type='text'>
size_t is not always 'unsigned int', use corret length modifer.

This patch fixes following warning:

---8&lt;---
cmd_sf.c: In function 'spi_flash_update_block':
cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t'
cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
---&gt;8---

Signed-off-by: Andreas Bießmann &lt;biessmann@corscience.de&gt;
cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
cc: Thomas Chou &lt;thomas@wytron.com.tw&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
size_t is not always 'unsigned int', use corret length modifer.

This patch fixes following warning:

---8&lt;---
cmd_sf.c: In function 'spi_flash_update_block':
cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t'
cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
---&gt;8---

Signed-off-by: Andreas Bießmann &lt;biessmann@corscience.de&gt;
cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
cc: Thomas Chou &lt;thomas@wytron.com.tw&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_sf: Fix compiler warning</title>
<updated>2011-10-05T20:22:17+00:00</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2011-10-03T04:35:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8e8a4bc22fc475244dd7c794f2271dd55399e859'/>
<id>8e8a4bc22fc475244dd7c794f2271dd55399e859</id>
<content type='text'>
cmd_sf.c: In function 'do_spi_flash':
cmd_sf.c:164:9: warning: 'skipped' may be used uninitialized in this function

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cmd_sf.c: In function 'do_spi_flash':
cmd_sf.c:164:9: warning: 'skipped' may be used uninitialized in this function

Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_sf: add "update" subcommand to do smart SPI flash update</title>
<updated>2011-09-29T20:31:31+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2011-08-22T23:03:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8d1af94220f62d2227fc7e633c5cef5f78ec4f4a'/>
<id>8d1af94220f62d2227fc7e633c5cef5f78ec4f4a</id>
<content type='text'>
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.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: fix behavior of ROUND macro when input is already rounded</title>
<updated>2011-09-07T21:39:36+00:00</updated>
<author>
<name>Anton Staaf</name>
<email>robotboy@chromium.org</email>
</author>
<published>2011-09-02T13:45:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=155cfb5ef18731a6d761edd2169699c67f0e1306'/>
<id>155cfb5ef18731a6d761edd2169699c67f0e1306</id>
<content type='text'>
Currently when you call ROUND with a value that is already a
multiple of the second parameter it will return a value that is
one multiple larger, instead of returning the value passed in.

There are only two types of usage of ROUND currently, one in
various config files to round CONFIG_SYS_MALLOC_LEN to a multiple
of 4096 bytes.  The other in cmd_sf.c where the incorrect behavior
of ROUND is worked around be subtracting one from the length argument
before passing it to ROUND.

This patch fixes ROUND and removes the workaround from cmd_sf.  It
also results in all of the malloc pools that use ROUND to compute
their size shrinking by 4KB.

Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently when you call ROUND with a value that is already a
multiple of the second parameter it will return a value that is
one multiple larger, instead of returning the value passed in.

There are only two types of usage of ROUND currently, one in
various config files to round CONFIG_SYS_MALLOC_LEN to a multiple
of 4096 bytes.  The other in cmd_sf.c where the incorrect behavior
of ROUND is worked around be subtracting one from the length argument
before passing it to ROUND.

This patch fixes ROUND and removes the workaround from cmd_sf.  It
also results in all of the malloc pools that use ROUND to compute
their size shrinking by 4KB.

Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_sf: use cmd_usage() in more places</title>
<updated>2011-04-12T06:30:25+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-04-12T06:21:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8a07de03f07f386c29198f52b2192cf378bf2d7c'/>
<id>8a07de03f07f386c29198f52b2192cf378bf2d7c</id>
<content type='text'>
Requires a little reworking of the code flow with sub-functions, but
not a big deal.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Requires a little reworking of the code flow with sub-functions, but
not a big deal.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
