[package] base-files: add an experimental "-c" flag which tries to preserve *all...
[openwrt.git] / target / linux / generic / patches-2.6.35 / 080-mtd_plat_nand_chip_fixup.patch
1 ---
2 drivers/mtd/nand/plat_nand.c | 13 ++++++++++++-
3 include/linux/mtd/nand.h | 1 +
4 2 files changed, 13 insertions(+), 1 deletion(-)
5
6 --- a/include/linux/mtd/nand.h
7 +++ b/include/linux/mtd/nand.h
8 @@ -512,6 +512,7 @@ struct platform_nand_chip {
9 int chip_delay;
10 unsigned int options;
11 const char **part_probe_types;
12 + int (*chip_fixup)(struct mtd_info *mtd);
13 void (*set_parts)(uint64_t size,
14 struct platform_nand_chip *chip);
15 void *priv;
16 --- a/drivers/mtd/nand/plat_nand.c
17 +++ b/drivers/mtd/nand/plat_nand.c
18 @@ -91,7 +91,18 @@ static int __devinit plat_nand_probe(str
19 }
20
21 /* Scan to find existance 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)) {
24 + res = -ENXIO;
25 + goto out;
26 + }
27 +
28 + if (pdata->chip.chip_fixup) {
29 + res = pdata->chip.chip_fixup(&data->mtd);
30 + if (res)
31 + goto out;
32 + }
33 +
34 + if (nand_scan_tail(&data->mtd)) {
35 err = -ENXIO;
36 goto out;
37 }
This page took 0.047052 seconds and 5 git commands to generate.