aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-01-04 17:30:58 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-01-04 17:30:58 +0000
commit3eeb7b7a5b855fce94e7e9c73a05a64d45739f21 (patch)
tree5feb91d15580873f179f59ec7a26446bcde6ce0d /target/linux
parent97682e09446b8b199e6a3dbea645b2356de196a4 (diff)
downloadupstream-3eeb7b7a5b855fce94e7e9c73a05a64d45739f21.tar.gz
upstream-3eeb7b7a5b855fce94e7e9c73a05a64d45739f21.tar.bz2
upstream-3eeb7b7a5b855fce94e7e9c73a05a64d45739f21.zip
ar71xx: allow to use the command line hack on compex devices
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29659 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/prom.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index 293f9b25eb..b9b1e64fdf 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@ -69,35 +69,6 @@ static const char * __init ar71xx_prom_find_env(char **envp, const char *name)
return ret;
}
-static int __init ar71xx_prom_init_myloader(void)
-{
- struct myloader_info *mylo;
- char mac_buf[32];
- char *mac;
-
- mylo = myloader_get_info();
- if (!mylo)
- return 0;
-
- switch (mylo->did) {
- case DEVID_COMPEX_WP543:
- ar71xx_prom_append_cmdline("board", "WP543");
- break;
- default:
- printk(KERN_WARNING "prom: unknown device id: %x\n",
- mylo->did);
- return 0;
- }
-
- mac = mylo->macs[0];
- snprintf(mac_buf, sizeof(mac_buf), "%02x:%02x:%02x:%02x:%02x:%02x",
- mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
-
- ar71xx_prom_append_cmdline("ethaddr", mac_buf);
-
- return 1;
-}
-
#ifdef CONFIG_IMAGE_CMDLINE_HACK
extern char __image_cmdline[];
@@ -127,6 +98,37 @@ static int __init ar71xx_use__image_cmdline(void)
static inline int ar71xx_use__image_cmdline(void) { return 0; }
#endif
+static int __init ar71xx_prom_init_myloader(void)
+{
+ struct myloader_info *mylo;
+ char mac_buf[32];
+ unsigned char *mac;
+
+ mylo = myloader_get_info();
+ if (!mylo)
+ return 0;
+
+ switch (mylo->did) {
+ case DEVID_COMPEX_WP543:
+ ar71xx_prom_append_cmdline("board", "WP543");
+ break;
+ default:
+ printk(KERN_WARNING "prom: unknown device id: %x\n",
+ mylo->did);
+ return 0;
+ }
+
+ mac = mylo->macs[0];
+ snprintf(mac_buf, sizeof(mac_buf), "%02x:%02x:%02x:%02x:%02x:%02x",
+ mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+
+ ar71xx_prom_append_cmdline("ethaddr", mac_buf);
+
+ ar71xx_use__image_cmdline();
+
+ return 1;
+}
+
static __init void ar71xx_prom_init_cmdline(int argc, char **argv)
{
int i;