aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/cs553x_nand.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/cs553x_nand.c')
-rw-r--r--drivers/mtd/nand/cs553x_nand.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/mtd/nand/cs553x_nand.c b/drivers/mtd/nand/cs553x_nand.c
index f59ad1f2d5db..414afa793563 100644
--- a/drivers/mtd/nand/cs553x_nand.c
+++ b/drivers/mtd/nand/cs553x_nand.c
@@ -239,7 +239,8 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)
239 this->ecc.correct = nand_correct_data; 239 this->ecc.correct = nand_correct_data;
240 240
241 /* Enable the following for a flash based bad block table */ 241 /* Enable the following for a flash based bad block table */
242 this->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; 242 this->bbt_options = NAND_BBT_USE_FLASH;
243 this->options = NAND_NO_AUTOINCR;
243 244
244 /* Scan to find existence of the device */ 245 /* Scan to find existence of the device */
245 if (nand_scan(new_mtd, 1)) { 246 if (nand_scan(new_mtd, 1)) {
@@ -277,15 +278,11 @@ static int is_geode(void)
277 return 0; 278 return 0;
278} 279}
279 280
280static const char *part_probes[] = { "cmdlinepart", NULL };
281
282static int __init cs553x_init(void) 281static int __init cs553x_init(void)
283{ 282{
284 int err = -ENXIO; 283 int err = -ENXIO;
285 int i; 284 int i;
286 uint64_t val; 285 uint64_t val;
287 int mtd_parts_nb = 0;
288 struct mtd_partition *mtd_parts = NULL;
289 286
290 /* If the CPU isn't a Geode GX or LX, abort */ 287 /* If the CPU isn't a Geode GX or LX, abort */
291 if (!is_geode()) 288 if (!is_geode())
@@ -315,13 +312,9 @@ static int __init cs553x_init(void)
315 do mtdconcat etc. if we want to. */ 312 do mtdconcat etc. if we want to. */
316 for (i = 0; i < NR_CS553X_CONTROLLERS; i++) { 313 for (i = 0; i < NR_CS553X_CONTROLLERS; i++) {
317 if (cs553x_mtd[i]) { 314 if (cs553x_mtd[i]) {
318
319 /* If any devices registered, return success. Else the last error. */ 315 /* If any devices registered, return success. Else the last error. */
320 mtd_parts_nb = parse_mtd_partitions(cs553x_mtd[i], part_probes, &mtd_parts, 0); 316 mtd_device_parse_register(cs553x_mtd[i], NULL, 0,
321 if (mtd_parts_nb > 0) 317 NULL, 0);
322 printk(KERN_NOTICE "Using command line partition definition\n");
323 mtd_device_register(cs553x_mtd[i], mtd_parts,
324 mtd_parts_nb);
325 err = 0; 318 err = 0;
326 } 319 }
327 } 320 }