diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2007-07-11 19:26:20 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2007-07-11 19:26:20 +0000 |
commit | b1d970fd1d76068a27c8fd33b8df224c360a1c4c (patch) | |
tree | 6e058f2de73732e989e0e34fe5286abfb96640bf /target/linux/adm5120-2.6/files/arch | |
parent | 9118d7fec965bff184c6eb916aaafb5a553538ac (diff) | |
download | mtk-20170518-b1d970fd1d76068a27c8fd33b8df224c360a1c4c.zip mtk-20170518-b1d970fd1d76068a27c8fd33b8df224c360a1c4c.tar.gz mtk-20170518-b1d970fd1d76068a27c8fd33b8df224c360a1c4c.tar.bz2 |
fix detection of admboot based boards
SVN-Revision: 7926
Diffstat (limited to 'target/linux/adm5120-2.6/files/arch')
-rw-r--r-- | target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c | 11 |
1 files changed, 8 insertions, 3 deletions
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 97ecc99..db8037f 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 */ |