<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/mtd/spi, branch v2019.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/drivers/mtd/spi?h=v2019.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/mtd/spi?h=v2019.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2018-12-05T20:06:24Z</updated>
<entry>
<title>Merge branch 'master' of git://git.denx.de/u-boot-spi</title>
<updated>2018-12-05T20:06:24Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-12-05T20:06:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9450ab2ba8d720bd9f73bccc0af2e2b5a2c2aaf1'/>
<id>urn:sha1:9450ab2ba8d720bd9f73bccc0af2e2b5a2c2aaf1</id>
<content type='text'>
- Various MTD fixes from Boris
- Zap various unused / legacy paths.
- pxa3xx NAND update from Miquel

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>mtd: sf: Make sf_mtd.c more robust</title>
<updated>2018-12-05T19:15:36Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-12-02T09:54:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=08898e8b22d74a4511eadee9b06b11aab43e809c'/>
<id>urn:sha1:08898e8b22d74a4511eadee9b06b11aab43e809c</id>
<content type='text'>
SPI flash based MTD devs can be registered/unregistered at any time
through the sf probe command or the spi_flash_free() function.

This commit does not try to fix the root cause as it would probably
require rewriting most of the code and have an mtd_info object
instance per spi_flash object (not to mention that the the spi-flash
layer is likely to be replaced by a spi-nor layer ported from Linux).

Instead, we try to be as safe as can be by checking the code returned
by del_mtd_device() and complain loudly when there's nothing we can
do about the deregistration failure. When that happens we also reset
sf_mtd_info.priv to NULL, and check for NULL pointer in the mtd hooks
so that -ENODEV is returned instead of hitting a NULL pointer
dereference exception when the MTD instance is later accessed by a user.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Tested-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
</entry>
<entry>
<title>mtd: sf: Unregister the MTD device prior to removing the spi_flash obj</title>
<updated>2018-12-05T19:15:36Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-12-02T09:54:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7371944a71690abafd0717b5d5f72c67e9f0f414'/>
<id>urn:sha1:7371944a71690abafd0717b5d5f72c67e9f0f414</id>
<content type='text'>
The DM implementation of spi_flash_free() does not unregister the MTD
device before removing the spi dev object. This leads to a use-after-free
bug when the MTD device is later accessed by a MTD user (observed when
attaching the device to UBI after env_sf_load() has called
spi_flash_free()).

Implement -&gt;remove() and call spi_flash_mtd_unregister() from there.

Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver")
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Tested-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Jagan Teki &lt;jagan@openedev.com&gt;
</content>
</entry>
<entry>
<title>mtd: sf: Make sure we don't register the same device twice</title>
<updated>2018-12-05T19:15:36Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-12-02T09:54:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=492151b2093ee4df173f7e10da4938ef7c2a2156'/>
<id>urn:sha1:492151b2093ee4df173f7e10da4938ef7c2a2156</id>
<content type='text'>
spi_flash_mtd_register() can be called several times and each time it
will register the same mtd_info instance like if it was a new one.
The MTD ID allocation gets crazy when that happens, so let's track the
status of the sf_mtd_info object to avoid that.

Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver")
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Tested-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Jagan Teki &lt;jagan@openedev.com&gt;
</content>
</entry>
<entry>
<title>sf: Add a method to obtain the block-protect setting</title>
<updated>2018-11-21T02:14:22Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2018-11-06T22:21:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a58986ca8b53d8c7a441397082f84edc7f47d19f'/>
<id>urn:sha1:a58986ca8b53d8c7a441397082f84edc7f47d19f</id>
<content type='text'>
It is useful to obtain the block-protect setting of the SPI flash, so we
know whether it is fully open or (perhaps partially) write-protected. Add
a method for this. Update the sandbox driver to process this operation and
add a test.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.denx.de/u-boot-spi</title>
<updated>2018-10-12T15:54:13Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-10-12T15:54:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e6cd05e5025bbab9723bbb09c506cbb5aa63bc53'/>
<id>urn:sha1:e6cd05e5025bbab9723bbb09c506cbb5aa63bc53</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sf: Add MICRON manufacturer id</title>
<updated>2018-10-12T06:07:49Z</updated>
<author>
<name>Ashish Kumar</name>
<email>Ashish.Kumar@nxp.com</email>
</author>
<published>2018-09-25T08:41:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5c391486b411025785e064f160d248bef31b3d28'/>
<id>urn:sha1:5c391486b411025785e064f160d248bef31b3d28</id>
<content type='text'>
NOR flash name MT35X_QLKA and MT25Q_** used on NXP board has
manufacturer id as 0x2C, which are rather for newer flashes
after the split of Micron from ST.

So macro for this micron manufacturer id.

Signed-off-by: Suresh Gupta &lt;suresh.gupta@nxp.com&gt;
Signed-off-by: Yogesh Gaur &lt;yogeshnarayan.gaur@nxp.com&gt;
Signed-off-by: Ashish Kumar &lt;Ashish.Kumar@nxp.com&gt;
[jagan: updated commit message]
Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>dm: spi: Add logging of some return values</title>
<updated>2018-10-09T10:40:27Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2018-10-01T18:22:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5e24a2ef8bf4f09b18cf4e943c73bfdd169a7581'/>
<id>urn:sha1:5e24a2ef8bf4f09b18cf4e943c73bfdd169a7581</id>
<content type='text'>
When SPI flash operations fail it is helpful to be able to see the error
codes and where they are generated. Add logging to capture this
information for read operations.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>sf: Avoid allocating memory on every read operation</title>
<updated>2018-10-09T10:40:27Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2018-10-01T18:22:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=97f57109bb750d0b2908d6ecd4aef3801baf1cf2'/>
<id>urn:sha1:97f57109bb750d0b2908d6ecd4aef3801baf1cf2</id>
<content type='text'>
At present spi_flash_cmd_read_ops() allocates and frees a few bytes of
memory every time it is called. It is faster to use the stack for this
and this is now supported by the minimum GCC version required by U-Boot.

Remove the allocation and use a variable-sized array instead.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: spi: Clean up detection of sandbox SPI emulator</title>
<updated>2018-10-09T10:40:27Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2018-10-01T17:55:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=66613f5dd25c4372b3f5ecb2f0c1d08b7f77b3a8'/>
<id>urn:sha1:66613f5dd25c4372b3f5ecb2f0c1d08b7f77b3a8</id>
<content type='text'>
Now that we don't have to deal with the command-line flag we can simplify
the code for detecting the emulator. Remove the lookup based on the SPI
specification, relying just on the device tree to locate the emulator.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
