Load the appropriate MTD driver if we were booted from NOR/NAND only, use the TRX...
[openwrt.git] / target / linux / adm5120-2.6 / files / drivers / mtd / maps / adm5120_mtd.c
index 230fcee..3abad32 100644 (file)
@@ -407,6 +407,10 @@ int __init init_adm5120_map(void)
        struct mtd_partition *parts;
        int i, parsed_nr_parts = 0;
 #endif
        struct mtd_partition *parts;
        int i, parsed_nr_parts = 0;
 #endif
+
+       if (adm5120_nand_boot)
+               return -ENODEV;
+
        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);
 
        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);
 
@@ -433,7 +437,7 @@ int __init init_adm5120_map(void)
 
 #ifdef CONFIG_MTD_PARTITIONS
 
 
 #ifdef CONFIG_MTD_PARTITIONS
 
-       if (adm5120_boot_loader == BOOT_LOADER_CFE)
+       if (adm5120_boot_loader == BOOT_LOADER_CFE || adm5120_boot_loader == BOOT_LOADER_UNKNOWN)
        {
                printk(KERN_NOTICE "adm5120 : using CFE flash mapping\n");
                parts = init_mtd_partitions(adm5120_mtd, size);
        {
                printk(KERN_NOTICE "adm5120 : using CFE flash mapping\n");
                parts = init_mtd_partitions(adm5120_mtd, size);
This page took 0.020422 seconds and 4 git commands to generate.