aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/plat_nand.c2
-rw-r--r--include/linux/mtd/nand.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 22e0ce788419..4e16c6f5bdd5 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -95,6 +95,8 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
95 return 0; 95 return 0;
96 } 96 }
97 } 97 }
98 if (pdata->chip.set_parts)
99 pdata->chip.set_parts(data->mtd.size, &pdata->chip);
98 if (pdata->chip.partitions) { 100 if (pdata->chip.partitions) {
99 data->parts = pdata->chip.partitions; 101 data->parts = pdata->chip.partitions;
100 res = add_mtd_partitions(&data->mtd, data->parts, 102 res = add_mtd_partitions(&data->mtd, data->parts,
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 7f2d69356554..4030ebada49e 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -563,6 +563,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
563 * @options: Option flags, e.g. 16bit buswidth 563 * @options: Option flags, e.g. 16bit buswidth
564 * @ecclayout: ecc layout info structure 564 * @ecclayout: ecc layout info structure
565 * @part_probe_types: NULL-terminated array of probe types 565 * @part_probe_types: NULL-terminated array of probe types
566 * @set_parts: platform specific function to set partitions
566 * @priv: hardware controller specific settings 567 * @priv: hardware controller specific settings
567 */ 568 */
568struct platform_nand_chip { 569struct platform_nand_chip {
@@ -574,6 +575,8 @@ struct platform_nand_chip {
574 int chip_delay; 575 int chip_delay;
575 unsigned int options; 576 unsigned int options;
576 const char **part_probe_types; 577 const char **part_probe_types;
578 void (*set_parts)(uint64_t size,
579 struct platform_nand_chip *chip);
577 void *priv; 580 void *priv;
578}; 581};
579 582