diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-01-22 22:38:19 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-01-22 22:38:19 +0000 |
commit | af015f956c35717909247a5732f6862d3de1476f (patch) | |
tree | c72d67ef23e35b8dd3e8177c4811773ed6eed759 /target/linux/ar71xx/patches-3.2/507-MIPS-ath79-prom-add-myloader-support.patch | |
parent | 386cbfe45bc521baa889a8c261b2c77e69fc956f (diff) | |
download | upstream-af015f956c35717909247a5732f6862d3de1476f.tar.gz upstream-af015f956c35717909247a5732f6862d3de1476f.tar.bz2 upstream-af015f956c35717909247a5732f6862d3de1476f.zip |
ar71xx: add initial support for 3.2
Tested on the following boards:
ALFA AP96
TL-MR3220 v1
TL-WR1043ND v1
TL-WR2543ND v1
TL-WR703N v1
TL-WR741ND v1
TL-WR741ND v4
WNDR3700 v1
WZR-HP-G300NH
SVN-Revision: 29868
Diffstat (limited to 'target/linux/ar71xx/patches-3.2/507-MIPS-ath79-prom-add-myloader-support.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.2/507-MIPS-ath79-prom-add-myloader-support.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-3.2/507-MIPS-ath79-prom-add-myloader-support.patch b/target/linux/ar71xx/patches-3.2/507-MIPS-ath79-prom-add-myloader-support.patch new file mode 100644 index 0000000000..137bf6b84e --- /dev/null +++ b/target/linux/ar71xx/patches-3.2/507-MIPS-ath79-prom-add-myloader-support.patch @@ -0,0 +1,55 @@ +--- a/arch/mips/ath79/prom.c ++++ b/arch/mips/ath79/prom.c +@@ -16,6 +16,7 @@ + + #include <asm/bootinfo.h> + #include <asm/addrspace.h> ++#include <asm/fw/myloader/myloader.h> + + #include "common.h" + +@@ -69,6 +70,34 @@ static const char * __init ath79_prom_fi + return ret; + } + ++static int __init ath79_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: ++ ath79_prom_append_cmdline("board", "WP543"); ++ break; ++ default: ++ pr_warn("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]); ++ ++ ath79_prom_append_cmdline("ethaddr", mac_buf); ++ ++ return 1; ++} ++ + static __init void ath79_prom_init_cmdline(int argc, char **argv) + { + int i; +@@ -88,6 +117,9 @@ void __init prom_init(void) + const char *env; + char **envp; + ++ if (ath79_prom_init_myloader()) ++ return; ++ + ath79_prom_init_cmdline(fw_arg0, (char **)fw_arg1); + + envp = (char **)fw_arg2; |