diff options
author | Florian Fainelli <florian@openwrt.org> | 2007-07-18 12:13:37 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2007-07-18 12:13:37 +0000 |
commit | ae55158a13c0840c1fec308061e73455e6f32457 (patch) | |
tree | c5759c19ede3737515a8b422a626348e865a4b9a /target/linux/adm5120-2.6/files/drivers/mtd/maps | |
parent | 64e17158945936f8e3098a59c4f2d291aa059c68 (diff) | |
download | upstream-ae55158a13c0840c1fec308061e73455e6f32457.tar.gz upstream-ae55158a13c0840c1fec308061e73455e6f32457.tar.bz2 upstream-ae55158a13c0840c1fec308061e73455e6f32457.zip |
Load the appropriate MTD driver if we were booted from NOR/NAND only, use the TRX mapping by default if bootloader unknown
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8032 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120-2.6/files/drivers/mtd/maps')
-rw-r--r-- | target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c b/target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c index 230fceee21..3abad32fa3 100644 --- a/target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c +++ b/target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c @@ -407,6 +407,10 @@ int __init init_adm5120_map(void) 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); @@ -433,7 +437,7 @@ int __init init_adm5120_map(void) #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); |