aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32/drivers/axisflashmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v32/drivers/axisflashmap.c')
-rw-r--r--arch/cris/arch-v32/drivers/axisflashmap.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c
index b34438e026be..1b6ad6247204 100644
--- a/arch/cris/arch-v32/drivers/axisflashmap.c
+++ b/arch/cris/arch-v32/drivers/axisflashmap.c
@@ -329,7 +329,6 @@ static int __init init_axis_flash(void)
329 } 329 }
330#endif 330#endif
331 331
332#ifndef CONFIG_ETRAX_VCS_SIM
333 main_mtd = flash_probe(); 332 main_mtd = flash_probe();
334 if (main_mtd) 333 if (main_mtd)
335 printk(KERN_INFO "%s: 0x%08x bytes of NOR flash memory.\n", 334 printk(KERN_INFO "%s: 0x%08x bytes of NOR flash memory.\n",
@@ -603,34 +602,7 @@ static int __init init_axis_flash(void)
603 "partition %d\n", part); 602 "partition %d\n", part);
604 } 603 }
605 } 604 }
606#endif /* CONFIG_EXTRAX_VCS_SIM */
607 605
608#ifdef CONFIG_ETRAX_VCS_SIM
609 /* For simulator, always use a RAM partition.
610 * The rootfs will be found after the kernel in RAM,
611 * with romfs_start and romfs_end indicating location and size.
612 */
613 struct mtd_info *mtd_ram;
614
615 mtd_ram = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
616 if (!mtd_ram) {
617 panic("axisflashmap: Couldn't allocate memory for "
618 "mtd_info!\n");
619 }
620
621 printk(KERN_INFO "axisflashmap: Adding RAM partition for romfs, "
622 "at %u, size %u\n",
623 (unsigned) romfs_start, (unsigned) romfs_length);
624
625 err = mtdram_init_device(mtd_ram, (void *)romfs_start,
626 romfs_length, "romfs");
627 if (err) {
628 panic("axisflashmap: Could not initialize MTD RAM "
629 "device!\n");
630 }
631#endif /* CONFIG_EXTRAX_VCS_SIM */
632
633#ifndef CONFIG_ETRAX_VCS_SIM
634 if (aux_mtd) { 606 if (aux_mtd) {
635 aux_partition.size = aux_mtd->size; 607 aux_partition.size = aux_mtd->size;
636 err = mtd_device_register(aux_mtd, &aux_partition, 1); 608 err = mtd_device_register(aux_mtd, &aux_partition, 1);
@@ -639,7 +611,6 @@ static int __init init_axis_flash(void)
639 "aux mtd device!\n"); 611 "aux mtd device!\n");
640 612
641 } 613 }
642#endif /* CONFIG_EXTRAX_VCS_SIM */
643 614
644 return err; 615 return err;
645} 616}