Use the flash0_size from the adm5120_board structure to correctly remap the flash...
authorFlorian Fainelli <florian@openwrt.org>
Sun, 10 Jun 2007 18:43:49 +0000 (18:43 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 10 Jun 2007 18:43:49 +0000 (18:43 +0000)
SVN-Revision: 7547

target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c

index 41c290b04a6c03542ec5853b9c0b12a0498bcc1f..230fceee21983e474bd1dd281ba38916eb14d810 100644 (file)
@@ -407,8 +407,8 @@ int __init init_adm5120_map(void)
        struct mtd_partition *parts;
        int i, parsed_nr_parts = 0;
 #endif
-       printk("adm5120 : flash init : 0x%08x 0x%08x\n", WINDOW_ADDR, WINDOW_SIZE);
-       adm5120_map.virt = ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE);
+       printk("adm5120 : flash init : 0x%08x 0x%08x\n", WINDOW_ADDR, adm5120_board.flash0_size);
+       adm5120_map.virt = ioremap_nocache(WINDOW_ADDR, adm5120_board.flash0_size);
 
        if (!adm5120_map.virt) {
                printk("Failed to ioremap\n");