Commit 38220cb1 authored by Mark A. Greer's avatar Mark A. Greer Committed by Kevin Hilman

nand: Add bad block table overrides to Davinci NAND driver

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.  So,
add fields to the davinci driver's platform data so platform
code can pass in their own bbt's and make the driver honor
those overrides.
Signed-off-by: default avatarMark A. Greer <mgreer@mvista.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 79a02230
...@@ -79,6 +79,10 @@ struct davinci_nand_pdata { /* platform_data */ ...@@ -79,6 +79,10 @@ struct davinci_nand_pdata { /* platform_data */
/* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */ /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */
unsigned options; 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 */ #endif /* __ARCH_ARM_DAVINCI_NAND_H */
...@@ -591,6 +591,8 @@ static int __init nand_davinci_probe(struct platform_device *pdev) ...@@ -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 */ /* options such as NAND_USE_FLASH_BBT or 16-bit widths */
info->chip.options = pdata->options; 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; info->ioaddr = (uint32_t __force) vaddr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment