aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-11-30 13:53:39 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-11-30 13:53:39 +0000
commit2383f010d94ff4d36521b90a41e58f540b7a27b0 (patch)
tree9f75aa37795ace4f90bc4dcf9dd064e57d56f18a /target/linux/ar71xx/files/drivers/net
parenta4b3263ded693a934da7aec5e5fdd072ae21e287 (diff)
downloadupstream-2383f010d94ff4d36521b90a41e58f540b7a27b0.tar.gz
upstream-2383f010d94ff4d36521b90a41e58f540b7a27b0.tar.bz2
upstream-2383f010d94ff4d36521b90a41e58f540b7a27b0.zip
ar71xx: override fifo_cfg[123] values on AR7240
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18614 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c9
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c8
2 files changed, 13 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
index 94420477c1..72d2accedc 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
@@ -402,8 +402,13 @@ static void ag71xx_hw_init(struct ag71xx *ag)
/* setup FIFO configuration registers */
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG0, FIFO_CFG0_INIT);
- ag71xx_wr(ag, AG71XX_REG_FIFO_CFG1, 0x0fff0000);
- ag71xx_wr(ag, AG71XX_REG_FIFO_CFG2, 0x00001fff);
+ if (pdata->is_ar724x) {
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG1, pdata->fifo_cfg1);
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG2, pdata->fifo_cfg2);
+ } else {
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG1, 0x0fff0000);
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG2, 0x00001fff);
+ }
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG4, FIFO_CFG4_INIT);
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG5, FIFO_CFG5_INIT);
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c
index 6fe4d407e2..176eddaaff 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c
@@ -72,8 +72,12 @@ static void ag71xx_phy_link_update(struct ag71xx *ag)
return;
}
- ag71xx_wr(ag, AG71XX_REG_FIFO_CFG3,
- pdata->is_ar91xx ? 0x780fff : 0x008001ff);
+ if (pdata->is_ar91xx)
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG3, 0x00780fff);
+ else if (pdata->is_ar724x)
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG3, pdata->fifo_cfg3);
+ else
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG3, 0x008001ff);
if (pdata->set_pll)
pdata->set_pll(ag->speed);