mtd: spi-nor: Send write disable cmd after every write enable
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Tue, 19 Nov 2024 06:39:18 +0000 (12:09 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 6 May 2025 19:13:36 +0000 (13:13 -0600)
commit46b3580c59466563bd26aa6aec1f15a8adf5dd5f
treefb487b6184bd0393e57b7f72624fee8cb21c543e
parentea2c6df478550fd5e4a412412cea30c986883808
mtd: spi-nor: Send write disable cmd after every write enable

Write enable(06h) command will be sent to a flash device to
set the write enable latch bit before every program, erase,
write command. After that write disable command (04h) needs
to be sent to clear the write enable latch.

This write_disable() is missing at the majority of the places
in the driver, add it to clear write enable latch.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://gist.github.com/PrasanthBabuMantena/c12f39744de188a9d08cd5ca51dc2a7b
Tested-by: Prasanth Babu Mantena <p-mantena@ti.com>
drivers/mtd/spi/spi-nor-core.c