]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: fsl_ifc_nand: Workaround bogus WP on 16-bit NAND
authorJoe Schultz <jschultz@xes-inc.com>
Mon, 7 Apr 2014 16:58:18 +0000 (11:58 -0500)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 21 May 2014 00:36:34 +0000 (17:36 -0700)
commit96699766f283500445c62619e564244aeafaa6d6
tree12075dbaf7acb4a16d76c84c771c43eccdaaecef
parent2c51cef89f808f70081484560dba1d5fd8dc091a
mtd: fsl_ifc_nand: Workaround bogus WP on 16-bit NAND

A workaround was already in place that set the WP bit in the
IFC_CSPR0 register after a STATUS command, however it used an 8-bit
write method. As a result, the WP bit was never set on 16-bit devices,
and these devices would eventually be incorrectly marked as
write-protected.

This patch checks the chip options for a 16-bit device and uses the
appropriate write method to set the WP bit after a STATUS command.

Signed-off-by: Joe Schultz <jschultz@xes-inc.com>
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/fsl_ifc_nand.c