mtd: Add bad block table overrides to Davinci NAND driver
Subsystems (5)
PATCH 1/1 mtd: Add bad block table overrides to Davinci NAND driver
From: Mark A. Greer <[email protected]>
The existing NAND infrastructure allows the default main and mirror bad block tables to be overridden in nand_default_bbt(). However, the davinci_nand driver does not support this. Add that support by adding fields to the davinci driver's platform data so platform code can pass in their own bbt's and make the davinci_nand driver honor them.
Signed-off-by Mark A. Greer <[email protected]>
Signed-off-by Kevin Hilman <[email protected]>
CC Sudhakar Rajashekhara <[email protected]>
---
Applies cleanly to git://git.infradead.org/mtd-2.6.git
Tested in the Linux ARM/Davinci tree,git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
arch/arm/mach-davinci/include/mach/nand.h | 4 ++++ drivers/mtd/nand/davinci_nand.c | 2 ++ 2 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-davinci/include/mach/nand.h +4 -0
@@ -79,6 +79,10 @@ struct davinci_nand_pdata { /* platform_data *//* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */ unsigned options; + +/* Main and mirror bbt descriptor overrides */ +struct nand_bbt_descr *bbt_td; + struct nand_bbt_descr *bbt_md; };#endif /* __ARCH_ARM_DAVINCI_NAND_H */
drivers/mtd/nand/davinci_nand.c +2 -0
@@ -591,6 +591,8 @@ static int __init nand_davinci_probe(struct platform_device *pdev)/* options such as NAND_USE_FLASH_BBT or 16-bit widths */ info->chip.options = pdata->options; + info->chip.bbt_td = pdata->bbt_td; + info->chip.bbt_md = pdata->bbt_md; info->ioaddr = (uint32_t __force ) vaddr;
Signature · 1 line
1.6.3.3.220.g609a0