<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/mtd/spi-nor.h, branch v4.9.97</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>mtd: spi-nor: stop passing around retlen</title>
<updated>2016-06-02T00:22:52+00:00</updated>
<author>
<name>Michal Suchanek</name>
<email>hramrach@gmail.com</email>
</author>
<published>2016-05-06T00:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2dd087b16946cf168f401526adf26afa771bb740'/>
<id>2dd087b16946cf168f401526adf26afa771bb740</id>
<content type='text'>
Do not pass retlen to hardware driver read/write functions. Update it in
spi-nor generic driver instead.

Signed-off-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Tested-by Cyrille Pitchen &lt;cyrille.pitchen@atmel.com&gt;
Acked-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Tested-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not pass retlen to hardware driver read/write functions. Update it in
spi-nor generic driver instead.

Signed-off-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Tested-by Cyrille Pitchen &lt;cyrille.pitchen@atmel.com&gt;
Acked-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Tested-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spi-nor: change return value of read/write</title>
<updated>2016-06-02T00:22:28+00:00</updated>
<author>
<name>Michal Suchanek</name>
<email>hramrach@gmail.com</email>
</author>
<published>2016-05-06T00:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=59451e1233bd315c5379a631838a03d80e689581'/>
<id>59451e1233bd315c5379a631838a03d80e689581</id>
<content type='text'>
Change the return value of spi-nor device read and write methods to
allow returning amount of data transferred and errors as
read(2)/write(2) does.

Also, start handling positive returns in spi_nor_read(), since we want
to convert drivers to start returning the read-length both via *retlen
and the return code. (We don't need to do the same transition process
for spi_nor_write(), since -&gt;write() didn't used to have a return code
at all.)

Signed-off-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Tested-by Cyrille Pitchen &lt;cyrille.pitchen@atmel.com&gt;
Acked-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Tested-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the return value of spi-nor device read and write methods to
allow returning amount of data transferred and errors as
read(2)/write(2) does.

Also, start handling positive returns in spi_nor_read(), since we want
to convert drivers to start returning the read-length both via *retlen
and the return code. (We don't need to do the same transition process
for spi_nor_write(), since -&gt;write() didn't used to have a return code
at all.)

Signed-off-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Tested-by Cyrille Pitchen &lt;cyrille.pitchen@atmel.com&gt;
Acked-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Tested-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spi-nor: support GigaDevice gd25lq64c</title>
<updated>2016-05-10T22:44:18+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2016-05-06T15:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e5366a266a8cd4cd6b0fe66876462cca2e1c6a89'/>
<id>e5366a266a8cd4cd6b0fe66876462cca2e1c6a89</id>
<content type='text'>
Also note the GigaDevice JEDEC ID.

No write-protect support yet, since this flash uses a different status
register layout.

Cc: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also note the GigaDevice JEDEC ID.

No write-protect support yet, since this flash uses a different status
register layout.

Cc: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spi-nor: add TB (Top/Bottom) protect support</title>
<updated>2016-03-08T02:01:57+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2016-01-29T19:25:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3dd8012a8eeb3702fa17450ec1a16a3f38af138d'/>
<id>3dd8012a8eeb3702fa17450ec1a16a3f38af138d</id>
<content type='text'>
Some flash support a bit in the status register that inverts protection
so that it applies to the bottom of the flash, not the top. This yields
additions to the protection range table, as noted in the comments.

Because this feature is not universal to all flash that support
lock/unlock, control it via a new flag.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Tested-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some flash support a bit in the status register that inverts protection
so that it applies to the bottom of the flash, not the top. This yields
additions to the protection range table, as noted in the comments.

Because this feature is not universal to all flash that support
lock/unlock, control it via a new flag.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Tested-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: merge MTD development from v4.4 into for-v4.5 development</title>
<updated>2016-01-06T00:05:56+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2016-01-06T00:04:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e576330033936d94a00068760a5744e27ce51a32'/>
<id>e576330033936d94a00068760a5744e27ce51a32</id>
<content type='text'>
Small conflict between some bugfixes for 4.4 and some refactoring for
4.5.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Small conflict between some bugfixes for 4.4 and some refactoring for
4.5.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spi-nor: fix Spansion regressions (aliased with Winbond)</title>
<updated>2016-01-06T00:00:03+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-15T18:48:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=67b9bcd36906e12a15ffec19463afbbd6a41660e'/>
<id>67b9bcd36906e12a15ffec19463afbbd6a41660e</id>
<content type='text'>
Spansion and Winbond have occasionally used the same manufacturer ID,
and they don't support the same features. Particularly, writing SR=0
seems to break read access for Spansion's s25fl064k. Unfortunately, we
don't currently have a way to differentiate these Spansion and Winbond
parts, so rather than regressing support for these Spansion flash, let's
drop the new Winbond lock/unlock support for now. We can try to address
Winbond support during the next release cycle.

Original discussion:

http://patchwork.ozlabs.org/patch/549173/
http://patchwork.ozlabs.org/patch/553683/

Fixes: 357ca38d4751 ("mtd: spi-nor: support lock/unlock/is_locked for Winbond")
Fixes: c6fc2171b249 ("mtd: spi-nor: disable protection for Winbond flash at startup")
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reported-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Cc: Felix Fietkau &lt;nbd@openwrt.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Spansion and Winbond have occasionally used the same manufacturer ID,
and they don't support the same features. Particularly, writing SR=0
seems to break read access for Spansion's s25fl064k. Unfortunately, we
don't currently have a way to differentiate these Spansion and Winbond
parts, so rather than regressing support for these Spansion flash, let's
drop the new Winbond lock/unlock support for now. We can try to address
Winbond support during the next release cycle.

Original discussion:

http://patchwork.ozlabs.org/patch/549173/
http://patchwork.ozlabs.org/patch/553683/

Fixes: 357ca38d4751 ("mtd: spi-nor: support lock/unlock/is_locked for Winbond")
Fixes: c6fc2171b249 ("mtd: spi-nor: disable protection for Winbond flash at startup")
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reported-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Cc: Felix Fietkau &lt;nbd@openwrt.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spi-nor: include mtd.h header for struct mtd_info definition</title>
<updated>2015-11-30T20:02:29+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-11-26T08:05:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2c81de771f38e54324ede3f24118f4852570b384'/>
<id>2c81de771f38e54324ede3f24118f4852570b384</id>
<content type='text'>
So far struct spi_nor was using just a pointer to struct mtd_info so it
wasn't needed to have it fully defined there. After recent change we
embed whole struct so we need to include a proper header.

Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")
Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So far struct spi_nor was using just a pointer to struct mtd_info so it
wasn't needed to have it fully defined there. After recent change we
embed whole struct so we need to include a proper header.

Fixes: 1976367173a4 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor")
Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spi-nor: provide default erase_sector implementation</title>
<updated>2015-11-19T21:34:44+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-11-10T20:15:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c67cbb839da9cc2757eabfa128556db6a2baf160'/>
<id>c67cbb839da9cc2757eabfa128556db6a2baf160</id>
<content type='text'>
Some spi-nor drivers perform sector erase by duplicating their
write_reg() command. Let's not require that the driver fill this out,
and provide a default instead.

Tested on m25p80.c and Medatek's MT8173 SPI NOR flash driver.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some spi-nor drivers perform sector erase by duplicating their
write_reg() command. Let's not require that the driver fill this out,
and provide a default instead.

Tested on m25p80.c and Medatek's MT8173 SPI NOR flash driver.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spi-nor: drop flash_node field</title>
<updated>2015-11-11T21:58:56+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-10-31T03:33:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=30069af7348b56eb8c5e1dda7788a531c5f24ca2'/>
<id>30069af7348b56eb8c5e1dda7788a531c5f24ca2</id>
<content type='text'>
We can just alias to the MTD of_node.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can just alias to the MTD of_node.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: add get/set of_node/flash_node helpers</title>
<updated>2015-11-11T21:45:05+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-10-31T03:33:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=28b8b26b308e656edfa9467867d5f79212da2ec3'/>
<id>28b8b26b308e656edfa9467867d5f79212da2ec3</id>
<content type='text'>
We are going to begin using the mtd-&gt;dev.of_node field for MTD device
nodes, so let's add helpers for it. Also, we'll be making some
conversions on spi_nor (and nand_chip eventually) too, so get that ready
with their own helpers.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are going to begin using the mtd-&gt;dev.of_node field for MTD device
nodes, so let's add helpers for it. Also, we'll be making some
conversions on spi_nor (and nand_chip eventually) too, so get that ready
with their own helpers.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
