aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-04-02 21:44:09 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-04-02 21:44:09 +0000
commit0e4126fe8d40fbcfa1efc93d1d77c98c74d6c249 (patch)
tree7c681a5fafe54fc950f148d41d7fb532d25e88b2
parent7a7fc463250f770d7cb92375503c3c81f39fd2f2 (diff)
downloadupstream-0e4126fe8d40fbcfa1efc93d1d77c98c74d6c249.tar.gz
upstream-0e4126fe8d40fbcfa1efc93d1d77c98c74d6c249.tar.bz2
upstream-0e4126fe8d40fbcfa1efc93d1d77c98c74d6c249.zip
Add the infrastructure to detect RouterBOOT and use USB
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6844 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c12
-rw-r--r--target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/adm5120_info.h13
2 files changed, 22 insertions, 3 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 e3a3c805a8..9e39730a4f 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
@@ -37,7 +37,8 @@ static char *boot_loader_names[BOOT_LOADER_LAST+1] = {
[BOOT_LOADER_UNKNOWN] = "Unknown",
[BOOT_LOADER_CFE] = "CFE",
[BOOT_LOADER_UBOOT] = "U-Boot",
- [BOOT_LOADER_MYLOADER] = "MyLoader"
+ [BOOT_LOADER_MYLOADER] = "MyLoader",
+ [BOOT_LOADER_ROUTERBOOT]= "RouterBOOT"
};
/*
@@ -133,6 +134,12 @@ static int __init detect_myloader(void)
return 1;
}
+static int __init detect_routerboot(void)
+{
+ /* FIXME: not yet implemented */
+ return 0;
+}
+
static int __init detect_bootloader(void)
{
if (detect_cfe())
@@ -144,6 +151,9 @@ static int __init detect_bootloader(void)
if (detect_myloader())
return BOOT_LOADER_MYLOADER;
+ if (detect_routerboot())
+ return BOOT_LOADER_ROUTERBOOT;
+
return BOOT_LOADER_UNKNOWN;
}
diff --git a/target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/adm5120_info.h b/target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/adm5120_info.h
index 6d2c5c248b..60d57311ec 100644
--- a/target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/adm5120_info.h
+++ b/target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/adm5120_info.h
@@ -23,6 +23,8 @@ struct adm5120_info {
unsigned long cpu_speed;
unsigned int boot_loader;
unsigned int board_type;
+ unsigned int iface_num;
+ unsigned int has_usb;
};
#define CPU_SPEED_175 175000000
@@ -37,7 +39,8 @@ struct adm5120_info {
#define BOOT_LOADER_CFE 1
#define BOOT_LOADER_UBOOT 2
#define BOOT_LOADER_MYLOADER 3
-#define BOOT_LOADER_LAST 3
+#define BOOT_LOADER_ROUTERBOOT 4
+#define BOOT_LOADER_LAST 4
#define BOARD_TYPE_UNKNOWN 0
#define BOARD_TYPE_WP54G_WRT 1
@@ -49,7 +52,13 @@ struct adm5120_info {
#define BOARD_TYPE_NP28GHS 7
#define BOARD_TYPE_NP27G 8
#define BOARD_TYPE_WP54Gv1C 9
-#define BOARD_TYPE_RB_1xx 10
+#define BOARD_TYPE_RB_111 10
+#define BOARD_TYPE_RB_112 11
+#define BOARD_TYPE_RB_133 12
+#define BOARD_TYPE_RB_133C 13
+#define BOARD_TYPE_RB_150 14
+#define BOARD_TYPE_RB_153 15
+#define BOART_TYPE_LAST 15
extern struct adm5120_info adm5120_info;
extern void adm5120_info_init(void);