diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-01-02 18:54:33 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-01-02 18:54:33 +0000 |
commit | 6f35d8b5003904de6eb320bfeb833d89601c2dd0 (patch) | |
tree | c15bc537cfa2bb59583db041f07476b67f9bcdd6 /target/linux/ar71xx/files/arch/mips | |
parent | 5c95516f24aa49727daef42c42a6101626721a7b (diff) | |
download | upstream-6f35d8b5003904de6eb320bfeb833d89601c2dd0.tar.gz upstream-6f35d8b5003904de6eb320bfeb833d89601c2dd0.tar.bz2 upstream-6f35d8b5003904de6eb320bfeb833d89601c2dd0.zip |
prepare for ath9k support
SVN-Revision: 13825
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/platform.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c index e4e9538986..ef70867a2b 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c @@ -17,6 +17,7 @@ #include <linux/dma-mapping.h> #include <linux/platform_device.h> #include <linux/serial_8250.h> +#include <linux/ath9k_platform.h> #include <asm/mach-ar71xx/ar71xx.h> #include <asm/mach-ar71xx/platform.h> @@ -605,14 +606,30 @@ static struct resource ar91xx_wmac_resources[] = { }, }; +static struct ath9k_platform_data ar91xx_wmac_data; + static struct platform_device ar91xx_wmac_device = { .name = "ath9k", .id = -1, .resource = ar91xx_wmac_resources, .num_resources = ARRAY_SIZE(ar91xx_wmac_resources), + .dev = { + .platform_data = &ar91xx_wmac_data, + }, }; void __init ar91xx_add_device_wmac(void) { + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + memcpy(ar91xx_wmac_data.eeprom_data, ee, + sizeof(ar91xx_wmac_data.eeprom_data)); + + ar71xx_device_stop(RESET_MODULE_AMBA2WMAC); + mdelay(10); + + ar71xx_device_start(RESET_MODULE_AMBA2WMAC); + mdelay(10); + platform_device_register(&ar91xx_wmac_device); } |