summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorSagnik Sasmal <sagnik@sagnik.me>2026-09-10 22:44:05 +0000
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-09-25 16:53:51 +0200
commit1c1a342aceec79528b3ba51f376eca2be5928fe7 (patch)
tree15aacc0402153736dcdfbe57a2a97f53aeed630f /include/uapi/linux
parent44b8a0bf5f96e8393312fc34b956766882341f16 (diff)
downloadlinux-1c1a342aceec79528b3ba51f376eca2be5928fe7.tar.gz
linux-1c1a342aceec79528b3ba51f376eca2be5928fe7.zip
mtd: spinand: Do not update the QE bit on devices without one
Commit be0b86c648bf ("mtd: spinand: Gather all the bus interface steps in one single function") moved quad-enable setup into spinand_configure_chip(). The new code only determines whether quad mode is needed when SPINAND_HAS_QE_BIT is set, but calls spinand_init_quad_enable() unconditionally. This clears configuration register bit 0 on devices without a QE bit. That bit is not universally a QE bit. On the Winbond W25N02KV it is H-DIS, which disables the active-low HOLD function. Clearing H-DIS enables HOLD during single and dual I/O operations. If IO3 is not kept high, the flash can pause a command and ignore clock and data. H-DIS is not restored by the FFh reset command, allowing the incorrect state to survive an SoC warm reboot while the flash remains powered. Before the refactoring, spinand_init_quad_enable() returned without touching the configuration register on devices without SPINAND_HAS_QE_BIT. Restore that behavior by only calling the helper when the flag is set. Return zero explicitly once SSDR configuration completes, as all errors are returned immediately. This avoids returning an uninitialized value when neither optional configuration step runs. The regression was reproduced on a JioRouter JIDU6401 with an MT7986 SoC and a W25N02KV. With Linux 6.18.44, sysupgrade failed and the following warm reboot hung in BL2. With this change applied, both sysupgrade and warm reboot completed successfully. Fixes: be0b86c648bf ("mtd: spinand: Gather all the bus interface steps in one single function") Cc: stable@vger.kernel.org Suggested-by: Miquel Raynal <miquel.raynal@bootlin.com> Assisted-by: LLM Signed-off-by: Sagnik Sasmal <sagnik@sagnik.me> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions