<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/mtd/rawnand.h, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-12-22T11:45:52+00:00</updated>
<entry>
<title>Merge tag 'nand/for-6.8' into mtd/next</title>
<updated>2023-12-22T11:45:52+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2023-12-22T11:45:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98d4fda8f2d4bc3fb97958d2ef4c90e161a628f2'/>
<id>urn:sha1:98d4fda8f2d4bc3fb97958d2ef4c90e161a628f2</id>
<content type='text'>
* Raw NAND

The most meaningful change being the conversion of the brcmnand driver
to the -&gt;exec_op() API, this series brought additional changes to the
core in order to help controller drivers to handle themselves the WP pin
during destructive operations when relevant.

As always, there is as well a whole bunch of miscellaneous W=1 fixes,
together with a few runtime fixes (double free, timeout value, OOB
layout, missing register initialization) and the usual load of remove
callbacks turned into void (which led to switch the txx9ndfmc driver to
use module_platform_driver()).
</content>
</entry>
<entry>
<title>mtd: rawnand: Prevent crossing LUN boundaries during sequential reads</title>
<updated>2023-12-22T11:38:46+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2023-12-15T12:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bbcd80f53a5e8c27c2511f539fec8c373f500cf4'/>
<id>urn:sha1:bbcd80f53a5e8c27c2511f539fec8c373f500cf4</id>
<content type='text'>
The ONFI specification states that devices do not need to support
sequential reads across LUN boundaries. In order to prevent such event
from happening and possibly failing, let's introduce the concept of
"pause" in the sequential read to handle these cases. The first/last
pages remain the same but any time we cross a LUN boundary we will end
and restart (if relevant) the sequential read operation.

Cc: stable@vger.kernel.org
Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Tested-by: Martin Hundebøll &lt;martin@geanix.com&gt;
Link: https://lore.kernel.org/linux-mtd/20231215123208.516590-2-miquel.raynal@bootlin.com
</content>
</entry>
<entry>
<title>mtd: rawnand: NAND controller write protect</title>
<updated>2023-12-04T10:51:40+00:00</updated>
<author>
<name>David Regan</name>
<email>dregan@broadcom.com</email>
</author>
<published>2023-11-25T01:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68cce21e3cc5fea8d955a62394454149270c98bc'/>
<id>urn:sha1:68cce21e3cc5fea8d955a62394454149270c98bc</id>
<content type='text'>
Allow NAND controller to be responsible for write protect pin
handling during fast path and exec_op destructive operation
when controller_wp flag is set.

Signed-off-by: David Regan &lt;dregan@broadcom.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20231125012438.15191-2-dregan@broadcom.com
</content>
</entry>
<entry>
<title>mtd: rawnand: Add destructive operation</title>
<updated>2023-12-04T10:51:40+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>bbrezillon@kernel.org</email>
</author>
<published>2023-11-25T01:24:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=578dc962ff2000ba4bf52d50717aea0819615634'/>
<id>urn:sha1:578dc962ff2000ba4bf52d50717aea0819615634</id>
<content type='text'>
Erase and program operations need the write protect (wp) pin to be
de-asserted to take effect. Add the concept of destructive
operation and pass the information to exec_op() so controllers know
when they should de-assert this pin without having to decode
the command opcode.

Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
Signed-off-by: David Regan &lt;dregan@broadcom.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20231125012438.15191-1-dregan@broadcom.com
</content>
</entry>
<entry>
<title>mtd: rawnand: Ensure the nand chip supports cached reads</title>
<updated>2023-10-16T08:47:22+00:00</updated>
<author>
<name>Rouven Czerwinski</name>
<email>r.czerwinski@pengutronix.de</email>
</author>
<published>2023-09-22T14:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f6ca3fb6978f94d95ee79f95085fc22e71ca17cc'/>
<id>urn:sha1:f6ca3fb6978f94d95ee79f95085fc22e71ca17cc</id>
<content type='text'>
Both the JEDEC and ONFI specification say that read cache sequential
support is an optional command. This means that we not only need to
check whether the individual controller supports the command, we also
need to check the parameter pages for both ONFI and JEDEC NAND flashes
before enabling sequential cache reads.

This fixes support for NAND flashes which don't support enabling cache
reads, i.e. Samsung K9F4G08U0F or Toshiba TC58NVG0S3HTA00.

Sequential cache reads are now only available for ONFI and JEDEC
devices, if individual vendors implement this, it needs to be enabled
per vendor.

Tested on i.MX6Q with a Samsung NAND flash chip that doesn't support
sequential reads.

Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
Cc: stable@vger.kernel.org
Signed-off-by: Rouven Czerwinski &lt;r.czerwinski@pengutronix.de&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230922141717.35977-1-r.czerwinski@pengutronix.de
</content>
</entry>
<entry>
<title>mtd: rawnand: export 'nand_exit_status_op()'</title>
<updated>2023-07-12T11:42:52+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>AVKrasnov@sberdevices.ru</email>
</author>
<published>2023-07-05T10:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=079c8d9da26ed041a54706de68b754337e6df17e'/>
<id>urn:sha1:079c8d9da26ed041a54706de68b754337e6df17e</id>
<content type='text'>
Export this function to work in pair with 'nand_status_op()' which is
already exported.

Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230705104403.696680-2-AVKrasnov@sberdevices.ru
</content>
</entry>
<entry>
<title>mtd: rawnand: Fix spelling mistake waifunc() -&gt; waitfunc()</title>
<updated>2023-03-07T09:11:52+00:00</updated>
<author>
<name>Md Sadre Alam</name>
<email>quic_mdalam@quicinc.com</email>
</author>
<published>2023-03-06T14:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42bf4597b7da8d9e3bc6039260e5437902af925a'/>
<id>urn:sha1:42bf4597b7da8d9e3bc6039260e5437902af925a</id>
<content type='text'>
There is a spelling mistake in a chip-&gt;legacy.waifunc(). Fix it.

Signed-off-by: Md Sadre Alam &lt;quic_mdalam@quicinc.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230306144810.22078-1-quic_mdalam@quicinc.com
</content>
</entry>
<entry>
<title>mtd: rawnand: Fix nand_chip kdoc</title>
<updated>2023-01-23T10:37:21+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2023-01-16T09:47:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=43651e60aa167974955b23f73a25eb79886ab6d0'/>
<id>urn:sha1:43651e60aa167974955b23f73a25eb79886ab6d0</id>
<content type='text'>
Describe the continuous read nand_chip fields to avoid the following
htmldocs warning:
include/linux/mtd/rawnand.h:1325: warning: Function parameter or member
'cont_read' not described in 'nand_chip'

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230116094735.11483-1-miquel.raynal@bootlin.com
</content>
</entry>
<entry>
<title>mtd: rawnand: Support for sequential cache reads</title>
<updated>2023-01-13T16:35:55+00:00</updated>
<author>
<name>JaimeLiao</name>
<email>jaimeliao.tw@gmail.com</email>
</author>
<published>2023-01-12T09:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=003fe4b9545b83cca4f7a7633695d1f69a0b0011'/>
<id>urn:sha1:003fe4b9545b83cca4f7a7633695d1f69a0b0011</id>
<content type='text'>
Add support for sequential cache reads for controllers using the generic
core helpers for their fast read/write helpers.

Sequential reads may reduce the overhead when accessing physically
continuous data by loading in cache the next page while the previous
page gets sent out on the NAND bus.

The ONFI specification provides the following additional commands to
handle sequential cached reads:

* 0x31 - READ CACHE SEQUENTIAL:
  Requires the NAND chip to load the next page into cache while keeping
  the current cache available for host reads.
* 0x3F - READ CACHE END:
  Tells the NAND chip this is the end of the sequential cache read, the
  current cache shall remain accessible for the host but no more
  internal cache loading operation is required.

On the bus, a multi page read operation is currently handled like this:

	00 -- ADDR1 -- 30 -- WAIT_RDY (tR+tRR) -- DATA1_IN
	00 -- ADDR2 -- 30 -- WAIT_RDY (tR+tRR) -- DATA2_IN
	00 -- ADDR3 -- 30 -- WAIT_RDY (tR+tRR) -- DATA3_IN

Sequential cached reads may instead be achieved with:

	00 -- ADDR1 -- 30 -- WAIT_RDY (tR) -- \
		       31 -- WAIT_RDY (tRCBSY+tRR) -- DATA1_IN \
		       31 -- WAIT_RDY (tRCBSY+tRR) -- DATA2_IN \
		       3F -- WAIT_RDY (tRCBSY+tRR) -- DATA3_IN

Below are the read speed test results with regular reads and
sequential cached reads, on NXP i.MX6 VAR-SOM-SOLO in mapping mode with
a NAND chip characterized with the following timings:
* tR: 20 µs
* tRCBSY: 5 µs
* tRR: 20 ns
and the following geometry:
* device size: 2 MiB
* eraseblock size: 128 kiB
* page size: 2 kiB

============= Normal read @ 33MHz =================
mtd_speedtest: eraseblock read speed is 15633 KiB/s
mtd_speedtest: page read speed is 15515 KiB/s
mtd_speedtest: 2 page read speed is 15398 KiB/s
===================================================

========= Sequential cache read @ 33MHz ===========
mtd_speedtest: eraseblock read speed is 18285 KiB/s
mtd_speedtest: page read speed is 15875 KiB/s
mtd_speedtest: 2 page read speed is 16253 KiB/s
===================================================

We observe an overall speed improvement of about 5% when reading
2 pages, up to 15% when reading an entire block. This is due to the
~14us gain on each additional page read (tR - (tRCBSY + tRR)).

Co-developed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: JaimeLiao &lt;jaimeliao.tw@gmail.com&gt;
Tested-by: Liao Jaime &lt;jaimeliao.tw@gmail.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230112093637.987838-4-miquel.raynal@bootlin.com
</content>
</entry>
<entry>
<title>mtd: rawnand: Check the data only read pattern only once</title>
<updated>2023-01-13T16:35:26+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2023-01-12T09:36:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9f820fc0651c32f8dde26b8e3ad93e1b9fdb62c4'/>
<id>urn:sha1:9f820fc0651c32f8dde26b8e3ad93e1b9fdb62c4</id>
<content type='text'>
Instead of checking if a pattern is supported each time we need it,
let's create a bitfield that only the core would be allowed to fill at
startup time. The core and the individual drivers may then use it in
order to check what operation they should use. This bitfield is supposed
to grow over time.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Tested-by: Liao Jaime &lt;jaimeliao.tw@gmail.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230112093637.987838-2-miquel.raynal@bootlin.com
</content>
</entry>
</feed>
