From b549f7c5f45523bf03f6f46ed1cb509c438f4ae4 Mon Sep 17 00:00:00 2001 From: juhosg Date: Wed, 11 Jul 2007 19:26:20 +0000 Subject: [adm5120] fix detection of admboot based boards git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7926 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'target/linux/adm5120-2.6/files') diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c index 97ecc99bc9..db8037f3be 100644 --- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c +++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c @@ -110,7 +110,7 @@ static unsigned long __init detect_machtype_generic(void) { char *name; - name = generic_prom_getenv("board"); + name = generic_prom_getenv("board_name"); return find_machtype_byname(name); } @@ -228,8 +228,13 @@ static void __init prom_detect_machtype(void) return; } - adm5120_prom_type = ADM5120_PROM_GENERIC; - mips_machtype = detect_machtype_generic(); + if (generic_prom_present()) { + adm5120_prom_type = ADM5120_PROM_GENERIC; + mips_machtype = detect_machtype_generic(); + return; + } + + mips_machtype = MACH_ADM5120_GENERIC; } /* TODO: this is an ugly hack for RouterBOARDS */ -- cgit v1.2.3