linux/include/linux/mtd
Miquel Raynal 76b7dc76dd mtd: spinand: Add octal DTR support
Create a new bus interface named ODTR for "octal DTR", which matches the
following pattern: 8D-8D-8D.

Add octal DTR support for all the existing core operations. Add a second
set of templates for this bus interface.

Give the possibility for drivers to register their read, write and
update cache variants as well as their vendor specific operations.

Check the SPI controller driver supports all the octal DTR commands that
we might need before switching to the ODTR bus interface.

Make the switch by calling ->configure_chip() with the ODTR
parameter. Fallback in case this step fails.

If someone ever attempts to suspend a chip in octal DTR mode, there are
changes that it will loose its configuration at resume. Prevent any
problem by explicitly switching back to SSDR while suspending. Note:
there is a limitation in the current approach, page I/Os are not
available as the dirmaps will be created for the ODTR bus interface if
that option is supported and not switched back to SSDR during
suspend. Switching them is possible but would be costly and would not
bring anything as right after resuming we will switch again to ODTR. In
case this capability is used for debug, developpers should mind to
destroy and recreate suitable direct mappings.

Finally, as a side effect, we increase the buffer for reading IDs to
6. No device at this point returns 6 bytes, but we support 5 bytes IDs,
which means in octal DTR mode we have no other choice than reading an
even number of bytes, hence 6.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
History 2026-01-29 20:21:41 +01:00
..
bbm.h mtd: rawnand: Stop using nand_release() 2020-05-31 10:53:40 +02:00
blktrans.h mtd: block: use a simple bool to track open for write 2023-06-12 08:04:04 -06:00
cfi.h mtd: cfi: Get rid of redundant 'else' 2024-05-27 13:39:51 +02:00
cfi_endian.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
concat.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
doc2000.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
flashchip.h mtd: flashchip: explicitly include <linux/wait.h> 2024-02-05 14:27:07 +01:00
ftl.h [MTD] Remove strange u_int32_t types from FTL 2008-12-10 14:06:42 +00:00
gen_probe.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
hyperbus.h mtd: hyperbus: Make hyperbus_unregister_device() return void 2022-06-09 15:06:13 +02:00
inftl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
jedec.h treewide: Update email address 2026-01-11 06:09:11 -10:00
lpc32xx_mlc.h mtd: lpc32xx: use typedef for dma_filter_fn 2024-02-26 11:26:26 +01:00
lpc32xx_slc.h mtd: lpc32xx: use typedef for dma_filter_fn 2024-02-26 11:26:26 +01:00
map.h mtd: map: add back asm/barrier.h inclusion 2025-09-11 17:34:15 +02:00
mtd.h mtd: fix minor comment typo for struct mtd_master 2024-02-26 11:26:31 +01:00
mtdram.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nand-ecc-mtk.h mtd: nand: make mtk_ecc.c a separated module 2022-04-27 18:12:35 +02:00
nand-ecc-mxic.h mtd: spinand: Constify struct nand_ecc_engine_ops 2024-10-21 11:55:50 +02:00
nand-ecc-sw-bch.h mtd: nand: ecc-bch: Use the public nsteps field 2021-03-11 09:37:28 +01:00
nand-ecc-sw-hamming.h treewide: Update email address 2026-01-11 06:09:11 -10:00
nand-gpio.h This pull request contains the following core changes: 2017-11-22 20:46:06 -10:00
nand-qpic-common.h mtd: nand: qpic-common: remove a bunch of unused defines 2025-08-28 14:23:20 +02:00
nand.h mtd: nand: move nand_check_erased_ecc_chunk() to nand/core 2025-09-18 10:32:00 +02:00
ndfc.h treewide: Update email address 2026-01-11 06:09:11 -10:00
nftl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
onenand.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
onenand_regs.h This pull-request contains the following changes for MTD: 2019-07-13 15:42:44 -07:00
onfi.h treewide: Update email address 2026-01-11 06:09:11 -10:00
partitions.h Revert "mtd: core: always create master device" 2025-06-18 11:18:23 +02:00
pfow.h mtd: lpddr: Move function print_drs_error to lpddr_cmds.c 2020-08-27 14:14:46 +02:00
physmap.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pismo.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 178 2019-05-30 11:29:19 -07:00
plat-ram.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
platnand.h treewide: Update email address 2026-01-11 06:09:11 -10:00
qinfo.h mtd: Annotate struct lpddr_private with __counted_by 2023-09-22 16:33:21 +02:00
rawnand.h treewide: Update email address 2026-01-11 06:09:11 -10:00
sh_flctl.h mtd: rawnand: sh_flctl: convert to SPDX identifiers 2018-11-13 09:32:04 +01:00
sharpsl.h mtd: nand: ecc-hamming: Remove useless includes 2020-12-10 22:37:30 +01:00
spear_smi.h mtd: spear_smi: fix kernel-doc warnings <linux/mtd/spear_smi.h> 2025-11-03 11:42:29 +01:00
spi-nor.h mtd: spi-nor: Stop exporting spi_nor_restore() 2023-04-04 09:43:50 +03:00
spinand.h mtd: spinand: Add octal DTR support 2026-01-29 20:21:41 +01:00
super.h mtd: Kill mount_mtd() 2019-09-05 14:34:26 -04:00
ubi.h mtd: ubi: Remove unused ubi_flush 2025-07-24 22:19:17 +02:00
xip.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00