2 drivers/mtd/nand/plat_nand.c | 13 ++++++++++++-
3 include/linux/mtd/nand.h | 1 +
4 2 files changed, 13 insertions(+), 1 deletion(-)
6 --- a/include/linux/mtd/nand.h
7 +++ b/include/linux/mtd/nand.h
8 @@ -851,6 +851,7 @@ struct platform_nand_chip {
10 unsigned int bbt_options;
11 const char **part_probe_types;
12 + int (*chip_fixup)(struct mtd_info *mtd);
16 --- a/drivers/mtd/nand/plat_nand.c
17 +++ b/drivers/mtd/nand/plat_nand.c
18 @@ -90,7 +90,18 @@ static int plat_nand_probe(struct platfo
21 /* Scan to find existence of the device */
22 - if (nand_scan(&data->mtd, pdata->chip.nr_chips)) {
23 + if (nand_scan_ident(&data->mtd, pdata->chip.nr_chips, NULL)) {
28 + if (pdata->chip.chip_fixup) {
29 + err = pdata->chip.chip_fixup(&data->mtd);
34 + if (nand_scan_tail(&data->mtd)) {