OSDN Git Service

mtd: m25p80: Flash protection support for STmicro chips
authorAustin Boyle <Austin.Boyle@aviatnet.com>
Fri, 4 Jan 2013 00:02:28 +0000 (13:02 +1300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 4 Feb 2013 07:26:29 +0000 (09:26 +0200)
commit972e1b7b450a93589b2a4c709e68f68da059aa5c
tree0611caf8ab75df49896c6c7890a96a7513fef88e
parentaca662a3b1c9b178536267da9fb2f0faa798cb7f
mtd: m25p80: Flash protection support for STmicro chips

This patch adds generic support for flash protection on STmicro chips.
On chips with less than 3 protection bits, the unused bits are don't cares
and so can be written anyway. The lock function will only change the
protection bits if it would not unlock other areas. Similarly, the unlock
function will not lock currently unlocked areas. Tested on the m25p64.

Signed-off-by: Austin Boyle <Austin.Boyle@aviatnet.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/devices/m25p80.c