]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: spi-nor: core: avoid odd length/address writes in 8D-8D-8D mode
authorPratyush Yadav <p.yadav@ti.com>
Tue, 8 Jul 2025 09:16:46 +0000 (17:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2026 10:08:56 +0000 (11:08 +0100)
commit246bbe3ee76f68e71f4bc99813d516c157edf767
treeeaa913b2c6f0dd35c07d190f58870c53ebe223ed
parenta0563931c028214c811924f08a7e9d88ea1ea78a
mtd: spi-nor: core: avoid odd length/address writes in 8D-8D-8D mode

commit 17926cd770ec837ed27d9856cf07f2da8dda4131 upstream.

On Octal DTR capable flashes like Micron Xcella the writes cannot start
or end at an odd address in Octal DTR mode. Extra 0xff bytes need to be
appended or prepended to make sure the start address and end address are
even. 0xff is used because on NOR flashes a program operation can only
flip bits from 1 to 0, not the other way round. 0 to 1 flip needs to
happen via erases.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20250708091646.292-2-ziniu.wang_1@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/spi-nor/core.c