OSDN Git Service

mtd: maps: physmap: Add reference counter to set_vpp()
authorPaul Parsons <lost.distance@yahoo.com>
Wed, 7 Mar 2012 14:12:08 +0000 (14:12 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:52:28 +0000 (00:52 +0100)
commit876fe76d793d03077eb61ba3afab4a383f46c554
treefb7d98bd746ebd1c3c5919f10a998e8f2dbd9e8b
parente7d9377e0440c25805dcc5b0af189a87beb69f5e
mtd: maps: physmap: Add reference counter to set_vpp()

This patch is part of a set which fixes unnecessary flash erase and write errors
resulting from the MTD CFI driver turning off vpp while an erase is in progress.
This patch allows physmap_set_vpp() calls to be nested by adding a reference
counter.

omap1_set_vpp() already used a reference counter. Since it is called from
physmap_set_vpp(), omap1_set_vpp() can now be simplified.

simtec_nor_vpp() already disabled hard interrupts. Since it is called from
physmap_set_vpp(), simtec_nor_vpp() can now be simplified.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
arch/arm/mach-omap1/flash.c
arch/arm/mach-s3c2410/nor-simtec.c
drivers/mtd/maps/physmap.c