diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-27 14:05:26 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-29 09:06:49 -0400 |
commit | 8be834f76291fdcc0614cb84926c6910b9f2ecbc (patch) | |
tree | c982bac1ebe520e7f6c17291887ff8b1c2219180 /drivers/mtd | |
parent | 19676ff0a64af9d75d48f17cb67bee8110f6ffbf (diff) |
[MTD] NAND Fix platform structure and NDFC driver
The platform structure was lacking an oobinfo field.
The NDFC driver had some remains from another tree.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/ndfc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 4d70dd16cf5d..5790d630faed 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/mtd/nand_ecc.h> | 20 | #include <linux/mtd/nand_ecc.h> |
21 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
22 | #include <linux/mtd/ndfc.h> | 22 | #include <linux/mtd/ndfc.h> |
23 | #include <linux/mtd/ubi.h> | ||
24 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
25 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
26 | 25 | ||
@@ -169,14 +168,13 @@ static void ndfc_chip_init(struct ndfc_nand_mtd *mtd) | |||
169 | chip->ecc.mode = NAND_ECC_HW; | 168 | chip->ecc.mode = NAND_ECC_HW; |
170 | chip->ecc.size = 256; | 169 | chip->ecc.size = 256; |
171 | chip->ecc.bytes = 3; | 170 | chip->ecc.bytes = 3; |
172 | chip->autooob = mtd->pl_chip->autooob; | 171 | chip->autooob = mtd->pl_chip->oobinfo; |
173 | mtd->mtd.priv = chip; | 172 | mtd->mtd.priv = chip; |
174 | mtd->mtd.owner = THIS_MODULE; | 173 | mtd->mtd.owner = THIS_MODULE; |
175 | } | 174 | } |
176 | 175 | ||
177 | static int ndfc_chip_probe(struct platform_device *pdev) | 176 | static int ndfc_chip_probe(struct platform_device *pdev) |
178 | { | 177 | { |
179 | int rc; | ||
180 | struct platform_nand_chip *nc = pdev->dev.platform_data; | 178 | struct platform_nand_chip *nc = pdev->dev.platform_data; |
181 | struct ndfc_chip_settings *settings = nc->priv; | 179 | struct ndfc_chip_settings *settings = nc->priv; |
182 | struct ndfc_controller *ndfc = &ndfc_ctrl; | 180 | struct ndfc_controller *ndfc = &ndfc_ctrl; |
@@ -235,7 +233,7 @@ static int ndfc_nand_probe(struct platform_device *pdev) | |||
235 | struct ndfc_controller_settings *settings = nc->priv; | 233 | struct ndfc_controller_settings *settings = nc->priv; |
236 | struct resource *res = pdev->resource; | 234 | struct resource *res = pdev->resource; |
237 | struct ndfc_controller *ndfc = &ndfc_ctrl; | 235 | struct ndfc_controller *ndfc = &ndfc_ctrl; |
238 | unsigned long long phys = NDFC_PHYSADDR_OFFS | res->start; | 236 | unsigned long long phys = setting->erpn | res->start; |
239 | 237 | ||
240 | ndfc->ndfcbase = ioremap64(phys, res->end - res->start + 1); | 238 | ndfc->ndfcbase = ioremap64(phys, res->end - res->start + 1); |
241 | if (!ndfc->ndfcbase) { | 239 | if (!ndfc->ndfcbase) { |