linux/drivers/mtd/maps
Stefan Roese 1648eaaa15 mtd: cfi_cmdset_0002: Support Persistent Protection Bits (PPB) locking
Currently cfi_cmdset_0002.c does not support PPB locking of sectors. This
patch adds support for this locking/unlocking mechanism. It is needed on
some platforms, since newer U-Boot versions do support this PPB locking
and protect for example their environment sector(s) this way.

This PPB locking/unlocking will be enabled for all devices supported by
cfi_cmdset_0002 reporting 8 in the CFI word 0x49 (Sector Protect/Unprotect
scheme).

Please note that PPB locking does support sector-by-sector locking. But
the whole chip can only be unlocked together. So unlocking one sector
will automatically unlock all sectors of this device. Because of this
chip limitation, the PPB unlocking function saves the current locking
status of all sectors before unlocking the whole device. After unlocking
the saved locking status is re-configured. This way only the addressed
sectors will be unlocked.

To selectively enable this advanced sector protection mechanism, the
device-tree property "use-advanced-sector-protection" has been created.
To enable support for this locking this property needs to be present in the
flash DT node. E.g.:

nor_flash@0,0 {
	compatible = "amd,s29gl256n", "cfi-flash";
	bank-width = <2>;
	use-advanced-sector-protection;
	...

Tested with Spansion S29GL512S10THI and Micron JS28F512M29EWx flash
devices.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-02-04 09:27:33 +02:00
..
amd76xrom.c mtd: fix a number of checkpatch complaints 2012-11-22 12:16:28 +02:00
autcpu12-nvram.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
bfin-async-flash.c mtd: fix a number of checkpatch complaints 2012-11-22 12:16:28 +02:00
cfi_flagadm.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
ck804xrom.c mtd: fix a number of checkpatch complaints 2012-11-22 12:16:28 +02:00
dbox2-flash.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
dc21285.c mtd: do not use plain 0 as NULL 2012-03-27 00:53:20 +01:00
dilnetpc.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
dmv182.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
esb2rom.c Drivers: mtd: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
gpio-addr-flash.c mtd: fix a number of checkpatch complaints 2012-11-22 12:16:28 +02:00
h720x-flash.c mtd: do not use plain 0 as NULL 2012-03-27 00:53:20 +01:00
ichxrom.c mtd: fix a number of checkpatch complaints 2012-11-22 12:16:28 +02:00
impa7.c mtd: do not use plain 0 as NULL 2012-03-27 00:53:20 +01:00
intel_vr_nor.c Drivers: mtd: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
ixp4xx.c mtd: ixp4xx: oops in ixp4xx_flash_probe 2012-03-27 00:33:33 +01:00
ixp2000.c mtd: do not use plain 0 as NULL 2012-03-27 00:53:20 +01:00
Kconfig mtd: uclinux: support ROM and allow passing the base address 2013-02-04 09:26:30 +02:00
l440gx.c mtd: maps: l440gx: Add reference counter to set_vpp() 2012-03-27 00:52:49 +01:00
lantiq-flash.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
latch-addr-flash.c mtd: remove use of __devinit 2012-11-22 12:07:03 +02:00
Makefile MTD pull for 3.8 2012-12-19 12:47:41 -08:00
map_funcs.c
mbx860.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
netsc520.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
nettel.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
octagon-5066.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
pci.c Drivers: mtd: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pcmciamtd.c MTD merge for 3.4 2012-03-30 17:31:56 -07:00
physmap_of.c mtd: cfi_cmdset_0002: Support Persistent Protection Bits (PPB) locking 2013-02-04 09:27:33 +02:00
physmap.c mtd: do not use plain 0 as NULL 2012-03-27 00:53:20 +01:00
pismo.c Drivers: mtd: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
plat-ram.c Fix misspellings of "whether" in comments. 2012-11-19 14:31:35 +01:00
pmcmsp-flash.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
pxa2xx-flash.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
rbtx4939-flash.c mtd: maps: rbtx4939-flash: delete unneeded test 2012-09-29 15:06:26 +01:00
rpxlite.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
sa1100-flash.c mtd: fix a number of checkpatch complaints 2012-11-22 12:16:28 +02:00
sbc_gxx.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
sc520cdp.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
scb2_flash.c Drivers: mtd: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
scx200_docflash.c mtd: scx200_docflash: convert to mtd_device_register() 2011-05-25 02:22:04 +01:00
solutionengine.c mtd: do not use plain 0 as NULL 2012-03-27 00:53:20 +01:00
sun_uflash.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
tqm8xxl.c mtd: tqm8xll: convert to mtd_device_register() 2011-05-25 02:22:57 +01:00
ts5500_flash.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
tsunami_flash.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
uclinux.c mtd: uclinux: add a comment about why uclinux_ram_map must not be static 2013-02-04 09:26:30 +02:00
vmax301.c mtd: convert remaining users to mtd_device_register() 2011-05-25 02:25:00 +01:00
vmu-flash.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00