aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ath79
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-03-19 11:11:20 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-03-19 11:11:20 +0000
commitc6fb886b40603923e6b317b008076cdbd47cf762 (patch)
tree4b898c0065a1b06af11ff98e501fe3b83960c187 /target/linux/ar71xx/files/arch/mips/ath79
parent036f98bb27736a1ecd2353ae82a696e22bde7cca (diff)
downloadmaster-187ad058-c6fb886b40603923e6b317b008076cdbd47cf762.tar.gz
master-187ad058-c6fb886b40603923e6b317b008076cdbd47cf762.tar.bz2
master-187ad058-c6fb886b40603923e6b317b008076cdbd47cf762.zip
ar71xx: add AR934x specific interface speed setup for ge0
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31017 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index 2a55d33d82..d9880e0803 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -303,7 +303,12 @@ static void ar91xx_set_speed_ge1(int speed)
static void ar934x_set_speed_ge0(int speed)
{
- /* TODO */
+ void __iomem *base;
+ u32 val = ath79_get_eth_pll(0, speed);
+
+ base = ioremap_nocache(AR71XX_PLL_BASE, AR71XX_PLL_SIZE);
+ __raw_writel(val, base + AR934X_PLL_ETH_XMII_CONTROL_REG);
+ iounmap(base);
}
static void ath79_set_speed_dummy(int speed)
@@ -432,9 +437,9 @@ struct ag71xx_switch_platform_data ath79_switch_data;
#define AR933X_PLL_VAL_100 0x00001099
#define AR933X_PLL_VAL_10 0x00991099
-#define AR934X_PLL_VAL_1000 0x00110000
-#define AR934X_PLL_VAL_100 0x00001099
-#define AR934X_PLL_VAL_10 0x00991099
+#define AR934X_PLL_VAL_1000 0x16000000
+#define AR934X_PLL_VAL_100 0x00000101
+#define AR934X_PLL_VAL_10 0x00001616
static void __init ath79_init_eth_pll_data(unsigned int id)
{