<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/mtd/spi, branch v2022.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=v2022.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/mtd/spi?h=v2022.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2021-12-16T07:28:47Z</updated>
<entry>
<title>mtd: spi-nor-ids: Add support for W25Q01JV</title>
<updated>2021-12-16T07:28:47Z</updated>
<author>
<name>Ram Narayanan</name>
<email>ramnara@linux.microsoft.com</email>
</author>
<published>2021-11-30T05:54:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d7b1d8259e62c781f2c87acfac08f3c0505030dd'/>
<id>urn:sha1:d7b1d8259e62c781f2c87acfac08f3c0505030dd</id>
<content type='text'>
Adds support for Winbond's new 128MB spi nor flash.

datasheet: https://www.winbond.com/resource-files/W25Q01JV%20SPI%20RevC%2005032021%20Plus%20dummy.pdf

Signed-off-by: Ram Narayanan &lt;ramnara@linux.microsoft.com&gt;
Cc: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi: Remove SF_DUAL_FLASH symbol from Kconfig</title>
<updated>2021-12-02T06:03:01Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2021-11-30T12:47:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b3425a3f4e6f1625e3d06109d2193e70901a1683'/>
<id>urn:sha1:b3425a3f4e6f1625e3d06109d2193e70901a1683</id>
<content type='text'>
This symbol is not used anywhere in the code. Just enable in couple of
defconfigs but it does nothing that's why remove it.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor-ids: Add SECT_4K to mt25qu512a</title>
<updated>2021-10-23T10:24:51Z</updated>
<author>
<name>Kris Chaplin</name>
<email>kris.chaplin@linux.intel.com</email>
</author>
<published>2021-10-18T10:30:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=85886161ef51f1fd8a0bea2518324cf6374bac8f'/>
<id>urn:sha1:85886161ef51f1fd8a0bea2518324cf6374bac8f</id>
<content type='text'>
The mt25qu512a supports 4K or 64K sectors, so adding
SECT_4K to enable 4K sector usage.

Tested on Intel n5x hardware with QSPI carrier card

Signed-off-by: Kris Chaplin &lt;kris.chaplin@linux.intel.com&gt;
Acked-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
[jagan: droped Tested-by of patch author and datasheet link]
Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor-ids: Add is25lp512 and is25wp512 devices</title>
<updated>2021-10-23T10:22:29Z</updated>
<author>
<name>Kris Chaplin</name>
<email>kris.chaplin@linux.intel.com</email>
</author>
<published>2021-10-18T10:26:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b7a772a3bba6e414234c6c2ed098c92c3fca2db6'/>
<id>urn:sha1:b7a772a3bba6e414234c6c2ed098c92c3fca2db6</id>
<content type='text'>
Add is25lp512 and is25wp512 devices to spi-nor id table

Tested on Intel n5x hardware with QSPI carrier card

Signed-off-by: Kris Chaplin &lt;kris.chaplin@linux.intel.com&gt;
[jagan: droped Tested-by of patch author]
Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
</content>
</entry>
<entry>
<title>mtd: Remove mtd_erase_callback() entirely</title>
<updated>2021-10-23T10:17:33Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-05T13:56:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0d1ecc99cb59c2190257f7738f91db21f174dc02'/>
<id>urn:sha1:0d1ecc99cb59c2190257f7738f91db21f174dc02</id>
<content type='text'>
The original purpose of mtd_erase_callback() in Linux at the time it was
imported to U-Boot, was to inform the caller that erasing is done (since
it was an asynchronous operation).

All supplied callback methods in U-Boot do nothing, but the
mtd_erase_callback() function was (until previous patch) grossly abused
in U-Boot's mtdpart implementation for completely different purpose.

Since we got rid of the abusement, remove the mtd_erase_callback()
function and the .callback member from struct erase_info entirely, in
order to avoid such problems in the future.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor-core: Check for ctrlc() in spi_nor_erase()</title>
<updated>2021-10-23T10:17:33Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-05T13:56:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1fd5e67595367126c9f76b3f0c47db21523665c3'/>
<id>urn:sha1:1fd5e67595367126c9f76b3f0c47db21523665c3</id>
<content type='text'>
May it possible to interrupt the spi_nor_erase() function.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Masami Hiramatsu &lt;masami.hiramatsu@linaro.org&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor-core: Call mtd_erase_callback() from spi_nor_erase()</title>
<updated>2021-10-23T10:17:33Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-05T13:56:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ff0000b47d7945701b2f9d17cc301b54452d499b'/>
<id>urn:sha1:ff0000b47d7945701b2f9d17cc301b54452d499b</id>
<content type='text'>
The spi_nor_erase() function does not call mtd_erase_callback() as it
should.

The mtdpart code currently implements the subtraction of partition
offset in mtd_erase_callback().

This results in partition offset being added prior calling
spi_nor_erase(), but not subtracted back on return. The result is that
the `mtd erase` command does not erase the whole partition, only some of
it's blocks:

  =&gt; mtd erase "Rescue system"
  Erasing 0x00000000 ... 0x006fffff (1792 eraseblock(s))
  jedec_spi_nor spi-nor@0: at 0x100000, len 4096
  jedec_spi_nor spi-nor@0: at 0x201000, len 4096
  jedec_spi_nor spi-nor@0: at 0x302000, len 4096
  jedec_spi_nor spi-nor@0: at 0x403000, len 4096
  jedec_spi_nor spi-nor@0: at 0x504000, len 4096
  jedec_spi_nor spi-nor@0: at 0x605000, len 4096
  jedec_spi_nor spi-nor@0: at 0x706000, len 4096

This is obviously wrong.

Add proper calling of mtd_erase_callback() into the spi_nor_erase()
function.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Masami Hiramatsu &lt;masami.hiramatsu@linaro.org&gt;
Tested-by: Masami Hiramatsu &lt;masami.hiramatsu@linaro.org&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor-core: Don't check for zero length in spi_nor_write() / spi_nor_erase()</title>
<updated>2021-10-23T10:17:33Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-05T13:56:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7398c1b758e70708edc1d0aced2e2b07ded1ed7e'/>
<id>urn:sha1:7398c1b758e70708edc1d0aced2e2b07ded1ed7e</id>
<content type='text'>
This check is already done in all callers: mtdcore's mtd_write() /
mtd_erase(), legacy spi_nor_write() / spi_flash_erase(). No reason to do
this here as well.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor-core: Check return value of write_disable() in spi_nor_erase()</title>
<updated>2021-10-23T10:17:33Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-05T13:56:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f57277997bd8036d45337ec60b08a025a0473f89'/>
<id>urn:sha1:f57277997bd8036d45337ec60b08a025a0473f89</id>
<content type='text'>
The cleanup code of spi_nor_erase() function calls write_disable(), but
does not return it's return value even in case of failure. Fix this.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Masami Hiramatsu &lt;masami.hiramatsu@linaro.org&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor-core: Don't overwrite return value if it is non-zero</title>
<updated>2021-10-23T10:17:33Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-05T13:55:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a9d9d412e00e246dbba2076ce3c11b7a5b542a76'/>
<id>urn:sha1:a9d9d412e00e246dbba2076ce3c11b7a5b542a76</id>
<content type='text'>
The cleanup code of the spi_nor_erase() function overwrites the ret
variable with return value of clean_bar(), even if the ret variable is
already set. Fix this.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Masami Hiramatsu &lt;masami.hiramatsu@linaro.org&gt;
</content>
</entry>
</feed>
