aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorEzequiel GarcĂ­a <ezequiel@vanguardiasur.com.ar>2014-09-11 11:02:08 -0400
committerBrian Norris <computersforpeace@gmail.com>2014-09-17 04:02:48 -0400
commitfef775caa705255358cdf7bbaf9bbc2fd1111761 (patch)
treeed080f0f7c339f4b51cbc3e19fa98b73c161c4a3 /arch/arm/mach-omap2
parent2d405ec5fdd5b6848beb820301d4fcaa3e2c4159 (diff)
nand: omap2: Add support for flash-based bad block table
This commit adds a new platform-data boolean property that enables use of a flash-based bad block table. This can also be enabled by setting the 'nand-on-flash-bbt' devicetree property. If the flash BBT is not enabled, the driver falls back to use OOB bad block markers only, as before. If the flash BBT is enabled the kernel will keep track of bad blocks using a BBT, in addition to the OOB markers. As explained by Brian Norris the reasons for using a BBT are: "" The primary reason would be that NAND datasheets specify it these days. A better argument is that nobody guarantees that you can write a bad block marker to a worn out block; you may just get program failures. This has been acknowledged by several developers over the last several years. Additionally, you get a boot-time performance improvement if you only have to read a few pages, instead of a page or two from every block on the flash. "" Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/gpmc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 2f97228f188a..b55a225387cd 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1440,6 +1440,8 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
1440 break; 1440 break;
1441 } 1441 }
1442 1442
1443 gpmc_nand_data->flash_bbt = of_get_nand_on_flash_bbt(child);
1444
1443 val = of_get_nand_bus_width(child); 1445 val = of_get_nand_bus_width(child);
1444 if (val == 16) 1446 if (val == 16)
1445 gpmc_nand_data->devsize = NAND_BUSWIDTH_16; 1447 gpmc_nand_data->devsize = NAND_BUSWIDTH_16;