<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/spi_flash.h, branch v2016.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>sf: Fix NULL pointer exception for flashes without lock methods</title>
<updated>2015-11-13T14:47:22+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-11-13T10:46:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=439fcb9b4f717f5a583014acb3e75b789564867c'/>
<id>439fcb9b4f717f5a583014acb3e75b789564867c</id>
<content type='text'>
commit c3c016c "sf: Add SPI NOR protection mechanism" introduced
flash_lock()/flash_unlock()/flash_is_locked() methods for SPI flash,
but not every flash driver supplies these. We should test these
methods against NULL before actually calling them.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c3c016c "sf: Add SPI NOR protection mechanism" introduced
flash_lock()/flash_unlock()/flash_is_locked() methods for SPI flash,
but not every flash driver supplies these. We should test these
methods against NULL before actually calling them.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sf: Add SPI NOR protection mechanism</title>
<updated>2015-11-05T21:47:06+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-11-05T14:43:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c3c016cf75360c2a0d0a065b64b438aaf7720576'/>
<id>c3c016cf75360c2a0d0a065b64b438aaf7720576</id>
<content type='text'>
Many SPI flashes have protection bits (BP2, BP1 and BP0) in the
status register that can protect selected regions of the SPI NOR.

Take these bits into account when performing erase operations,
making sure that the protected areas are skipped.

Tested on a mx6qsabresd:

=&gt; sf probe
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB
=&gt; sf protect lock  0x3f0000 0x10000
=&gt; sf erase 0x3f0000 0x10000
offset 0x3f0000 is protected and cannot be erased
SF: 65536 bytes @ 0x3f0000 Erased: ERROR
=&gt; sf protect unlock  0x3f0000 0x10000
=&gt; sf erase 0x3f0000 0x10000
SF: 65536 bytes @ 0x3f0000 Erased: OK

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
[re-worked to fit the lock common to dm and non-dm]
Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many SPI flashes have protection bits (BP2, BP1 and BP0) in the
status register that can protect selected regions of the SPI NOR.

Take these bits into account when performing erase operations,
making sure that the protected areas are skipped.

Tested on a mx6qsabresd:

=&gt; sf probe
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB
=&gt; sf protect lock  0x3f0000 0x10000
=&gt; sf erase 0x3f0000 0x10000
offset 0x3f0000 is protected and cannot be erased
SF: 65536 bytes @ 0x3f0000 Erased: ERROR
=&gt; sf protect unlock  0x3f0000 0x10000
=&gt; sf erase 0x3f0000 0x10000
SF: 65536 bytes @ 0x3f0000 Erased: OK

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
[re-worked to fit the lock common to dm and non-dm]
Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sf: Add FSR support to spi_flash_cmd_wait_ready</title>
<updated>2015-10-25T14:47:03+00:00</updated>
<author>
<name>Jagan Teki</name>
<email>jteki@openedev.com</email>
</author>
<published>2015-09-29T11:24:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=baaaa7539c7511e7e90453ecf0f20d8eaeeb70c6'/>
<id>baaaa7539c7511e7e90453ecf0f20d8eaeeb70c6</id>
<content type='text'>
This patch adds flag status register reading support to
spi_flash_cmd_wait_ready.

Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: Siva Durga Prasad Paladugu &lt;sivadur@xilinx.com&gt;
Cc: Stefan Roese &lt;sr@denx.de&gt;
Cc: Tom Warren &lt;twarren@nvidia.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Hou Zhiqiang &lt;B48286@freescale.com&gt;
Tested-by: Jagan Teki &lt;jteki@openedev.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds flag status register reading support to
spi_flash_cmd_wait_ready.

Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: Siva Durga Prasad Paladugu &lt;sivadur@xilinx.com&gt;
Cc: Stefan Roese &lt;sr@denx.de&gt;
Cc: Tom Warren &lt;twarren@nvidia.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Hou Zhiqiang &lt;B48286@freescale.com&gt;
Tested-by: Jagan Teki &lt;jteki@openedev.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sf: Make flash-&gt;flags use for generic usage</title>
<updated>2015-10-25T14:47:03+00:00</updated>
<author>
<name>Jagan Teki</name>
<email>jteki@openedev.com</email>
</author>
<published>2015-09-29T05:47:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1fabefddfce1bc79a3d704501efdaa053442b8c1'/>
<id>1fabefddfce1bc79a3d704501efdaa053442b8c1</id>
<content type='text'>
Use the flash-&gt;flags for generic usage, not only for dm-spi-flash,
this will be used for future flag additions.

[Correct the spi flash flags detect logic]
Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the flash-&gt;flags for generic usage, not only for dm-spi-flash,
this will be used for future flag additions.

[Correct the spi flash flags detect logic]
Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi/sf: Minor cleanups</title>
<updated>2015-07-01T15:45:03+00:00</updated>
<author>
<name>Jagan Teki</name>
<email>jteki@openedev.com</email>
</author>
<published>2015-06-26T19:21:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5d69df3541c3c1a40ed71ff250b9c98bf2b9f582'/>
<id>5d69df3541c3c1a40ed71ff250b9c98bf2b9f582</id>
<content type='text'>
- Adjust tab spaces
- Add comments

Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Adjust tab spaces
- Add comments

Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: sf: Save flash flags to struct spi_flash</title>
<updated>2015-04-28T07:59:54+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-04-28T07:59:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=be7be78e10bfca6fc2d5e8fbc71da2db6a55c842'/>
<id>be7be78e10bfca6fc2d5e8fbc71da2db6a55c842</id>
<content type='text'>
Add a new member 'flags' in struct spi_flash to store the flash flags
during spi_flash_validate_params().

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Jagannadha Sutradharudu Teki &lt;jagannadh.teki@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new member 'flags' in struct spi_flash to store the flash flags
during spi_flash_validate_params().

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Jagannadha Sutradharudu Teki &lt;jagannadh.teki@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi flash: fix trivial problems</title>
<updated>2015-04-22T11:19:51+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@denx.de</email>
</author>
<published>2015-04-21T08:37:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d15e74f16cc521da0e08060cda2c87307bd4363f'/>
<id>d15e74f16cc521da0e08060cda2c87307bd4363f</id>
<content type='text'>
Fix typos and too big #ifdef.

Signed-off-by: Pavel Machek &lt;pavel@denx.de&gt;
Reviewed-by: Marek Vasut &lt;marex@denx.de&gt;
Reviewed-by: Jagannadha Sutradharudu Teki &lt;jagannadh.teki@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix typos and too big #ifdef.

Signed-off-by: Pavel Machek &lt;pavel@denx.de&gt;
Reviewed-by: Marek Vasut &lt;marex@denx.de&gt;
Reviewed-by: Jagannadha Sutradharudu Teki &lt;jagannadh.teki@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: sf: Add driver model read/write/erase methods</title>
<updated>2015-04-18T17:11:14+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-03-26T15:29:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8d987abc6a8553454b0b602b46a5dc09a4687110'/>
<id>8d987abc6a8553454b0b602b46a5dc09a4687110</id>
<content type='text'>
Permit use of a udevice to talk to SPI flash. Ultimately we would like
to retire the use of 'struct spi_flash' for this purpose, so create the
new API for those who want to move to it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Permit use of a udevice to talk to SPI flash. Ultimately we would like
to retire the use of 'struct spi_flash' for this purpose, so create the
new API for those who want to move to it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: sf: Add a uclass for SPI flash</title>
<updated>2014-10-22T16:36:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2014-10-14T05:42:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4c2dbefde58917205af51a2c20b3069e01e55cf4'/>
<id>4c2dbefde58917205af51a2c20b3069e01e55cf4</id>
<content type='text'>
Add a driver model uclass for SPI flash which supports the common
operations (read, write, erase). Since we must keep support for the
non-dm interface, some modification of the spi_flash header is required.

CONFIG_DM_SPI_FLASH is used to enable driver model for SPI flash.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jagannadha Sutradharudu Teki &lt;jagannadh.teki@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a driver model uclass for SPI flash which supports the common
operations (read, write, erase). Since we must keep support for the
non-dm interface, some modification of the spi_flash header is required.

CONFIG_DM_SPI_FLASH is used to enable driver model for SPI flash.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jagannadha Sutradharudu Teki &lt;jagannadh.teki@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sf: Tidy up public and private header files</title>
<updated>2014-10-22T16:36:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2014-10-14T05:42:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ff0960f9a018952cbaab59c0d87b6e0338c8f04c'/>
<id>ff0960f9a018952cbaab59c0d87b6e0338c8f04c</id>
<content type='text'>
Since spi_flash.h is supposed to be the public API for SPI flash, move
private things to sf_internal.h. Also tidy up a few comment nits.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jagannadha Sutradharudu Teki &lt;jagannadh.teki@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since spi_flash.h is supposed to be the public API for SPI flash, move
private things to sf_internal.h. Also tidy up a few comment nits.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jagannadha Sutradharudu Teki &lt;jagannadh.teki@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
