aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-05-31 22:53:39 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-05-31 22:53:39 +0000
commit57da5f9061b003809ec13f601853ac56849d5ba9 (patch)
tree392dbdec94f8a02d0d0693d024ad3915ffec492b /target/linux/ar71xx
parent431a42fc3b0da786e5f350b338946153f39f27fe (diff)
downloadmaster-187ad058-57da5f9061b003809ec13f601853ac56849d5ba9.tar.gz
master-187ad058-57da5f9061b003809ec13f601853ac56849d5ba9.tar.bz2
master-187ad058-57da5f9061b003809ec13f601853ac56849d5ba9.zip
ar71xx: add WMAC initialization code for the AR933X SoCs
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27064 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar9xxx-wmac.c14
-rw-r--r--target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar9xxx-wmac.c b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar9xxx-wmac.c
index ade61e46c7..f07d368362 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar9xxx-wmac.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ar9xxx-wmac.c
@@ -63,6 +63,15 @@ static void ar913x_wmac_init(void)
ar9xxx_wmac_resources[0].end = AR91XX_WMAC_BASE + AR91XX_WMAC_SIZE - 1;
}
+static void ar933x_wmac_init(void)
+{
+ ar9xxx_wmac_device.name = "ar933x_wmac";
+ ar9xxx_wmac_resources[0].start = AR933X_WMAC_BASE;
+ ar9xxx_wmac_resources[0].end = AR933X_WMAC_BASE + AR933X_WMAC_SIZE - 1;
+ if (ar71xx_ref_freq == MHZ_25)
+ ar9xxx_wmac_data.is_clk_25mhz = true;
+}
+
static void ar934x_wmac_init(void)
{
ar9xxx_wmac_device.name = "ar934x_wmac";
@@ -80,6 +89,11 @@ void __init ar9xxx_add_device_wmac(u8 *cal_data, u8 *mac_addr)
ar913x_wmac_init();
break;
+ case AR71XX_SOC_AR9330:
+ case AR71XX_SOC_AR9331:
+ ar933x_wmac_init();
+ break;
+
case AR71XX_SOC_AR9341:
case AR71XX_SOC_AR9342:
case AR71XX_SOC_AR9344:
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
index 8a86a307da..7c99dba665 100644
--- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
+++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
@@ -72,6 +72,8 @@
#define AR933X_UART_BASE (AR71XX_APB_BASE + 0x00020000)
#define AR933X_UART_SIZE 0x14
+#define AR933X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
+#define AR933X_WMAC_SIZE 0x20000
#define AR934X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
#define AR934X_WMAC_SIZE 0x20000