summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120-2.6/files/arch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-26 19:41:00 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-26 19:41:00 +0000
commita5ce51c5c3a21789d000c1efb8b1c3abd61e310f (patch)
treeb8135a9df02ce224dc47b2a65571396a8c5c0e98 /target/linux/adm5120-2.6/files/arch
parent389a87145d1ac89593072a7e79c4ddec36b704cf (diff)
[adm5120] calling of prom_detect_board is needed only when we still don't know the board
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7736 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120-2.6/files/arch')
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c5
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c
index 87e3d865a..6d512f1a7 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c
@@ -206,7 +206,7 @@ static struct adm5120_board __initdata adm5120_boards[] = {
.name = "Infineon EASY 83000",
.mach_type = MACH_ADM5120_EASY83000,
.has_usb = 0,
- .iface_num = 0,
+ .iface_num = 6,
.flash0_size = 4*1024*1024,
},
{
@@ -880,7 +880,8 @@ static void __init adm5120_detect_board(void)
if (t == MACH_ADM5120_UNKNOWN)
t = uboot_detect_board();
} else {
- t = prom_detect_board();
+ if (t == MACH_ADM5120_UNKNOWN)
+ t = prom_detect_board();
}
for (board = adm5120_boards; board->mach_type != MACH_ADM5120_UNKNOWN;
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 a288b073c..c2e1dcbae 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
@@ -32,7 +32,7 @@
#include <asm/mach-adm5120/adm5120_info.h>
-static char **prom_envp;
+static char **prom_envp = NULL;
void setup_prom_printf(int);
void prom_printf(char *, ...);
@@ -106,7 +106,9 @@ void __init prom_init(void)
{
char *cmd;
- prom_envp = (char **)fw_arg2;
+ if ((fw_arg2 & 3) == 0) {
+ prom_envp = (char **)fw_arg2;
+ }
adm5120_info_init();