android_kernel_motorola_sm6375/drivers/mtd
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pratyush Yadav 05eb29effe spi: cadence-quadspi: Flush posted register writes before DAC access
[ Upstream commit 1ad55767e77a853c98752ed1e33b68049a243bd7 ]

cqspi_read_setup() and cqspi_write_setup() program the address width as
the last step in the setup. This is likely to be immediately followed by
a DAC region read/write. On TI K3 SoCs the DAC region is on a different
endpoint from the register region. This means that the order of the two
operations is not guaranteed, and they might be reordered at the
interconnect level. It is possible that the DAC read/write goes through
before the address width update goes through. In this situation if the
previous command used a different address width the OSPI command is sent
with the wrong number of address bytes, resulting in an invalid command
and undefined behavior.

Read back the size register to make sure the write gets flushed before
accessing the DAC region.

Fixes: 1406234105 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller")
CC: stable@vger.kernel.org
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Message-ID: <20250905185958.3575037-3-s-k6@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
[ backported to drivers/mtd/spi-nor ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-29 14:00:00 +01:00
..
chips
devices mtd: powernv: Add check devm_kasprintf() returned value 2024-11-08 16:20:28 +01:00
hyperbus
lpddr
maps
nand mtd: rawnand: fsmc: Default to autodetect buswidth 2025-10-29 13:59:53 +01:00
parsers mtd: partitions: redboot: Added conversion of operands to a larger type 2024-07-05 09:08:27 +02:00
spi-nor spi: cadence-quadspi: Flush posted register writes before DAC access 2025-10-29 14:00:00 +01:00
tests mtd: make mtd_test.c a separate module 2024-08-19 05:33:33 +02:00
ubi ubi: fastmap: Fix duplicate slab cache names while attaching 2024-12-14 19:44:40 +01:00
ftl.c mtd: fix possible integer overflow in erase_xfer() 2025-08-28 16:21:20 +02:00
inftlcore.c mtd: inftlcore: Add error check for inftl_read_oob() 2025-05-02 07:39:16 +02:00
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c
mtdblock.c
mtdblock_ro.c
mtdchar.c
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c
mtdpart.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c