Handling bus locking of CFI Flash devices
Thomas De Schampheleire
patrickdepinguin at gmail.com
Fri Nov 23 13:34:18 EST 2012
I have an embedded PowerPC system with a CFI Flash located on the local bus.
Additionally, there is a control device with a 'flash-write-protect'
feature. By default, no writes can happen to the flash device on the
local bus, unless the flash-write-protect bit is cleared.
This also means that detection of the flash chip using CFI commands
will fail by default, as this incurs write operations to the bus.
Note that this flash-write-protect is different from the standard
flash 'lock/unlock' feature. The former is implemented on a specific
control logic chip of the board, while the latter is part of the flash
My question is: what is the best way to handle this flash-write-protect bit?
Right now, I am simply clearing the bit before booting the kernel,
which means that all write access to the flash is allowed. While this
works, it completely bypasses the protection feature.
Is there already a place in the MTD subsystem to handle such a
flash-write-protect bit, for example a hook that can be implemented
for a particular board?
If not, how do you suggest I proceed?
More information about the linux-mtd