-
- writel(0x1d7ff, IFXMIPS_EBU_BUSCON0);
-
- danube_map.read = danube_read16;
- danube_map.write = danube_write16;
- danube_map.copy_from = danube_copy_from;
- danube_map.copy_to = danube_copy_to;
-
- danube_map.phys = IFXMIPS_FLASH_START;
- danube_map.virt = ioremap_nocache(IFXMIPS_FLASH_START, IFXMIPS_FLASH_MAX);
- danube_map.size = IFXMIPS_FLASH_MAX;
- if (!danube_map.virt) {
- printk(KERN_WARNING "Failed to ioremap!\n");
+ int err, i;
+ int kernel_part = 2, rootfs_part = 3;
+ int num_parts = ARRAY_SIZE(ifxmips_partitions);
+
+ ifxmips_w32(0x1d7ff, IFXMIPS_EBU_BUSCON0);
+
+ ifxmips_map.read = ifxmips_read16;
+ ifxmips_map.write = ifxmips_write16;
+ ifxmips_map.copy_from = ifxmips_copy_from;
+ ifxmips_map.copy_to = ifxmips_copy_to;
+ ifxmips_map.phys = dev->resource->start;
+ ifxmips_map.size = dev->resource->end - ifxmips_map.phys + 1;
+ ifxmips_map.virt = ioremap_nocache(ifxmips_map.phys, ifxmips_map.size);
+
+ if (!ifxmips_map.virt) {
+ printk(KERN_WARNING "ifxmips_mtd: failed to ioremap!\n");