diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-11-30 13:53:39 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-11-30 13:53:39 +0000 |
commit | 35dbf66787d0b33738b475e8af504bcd8e2dea3e (patch) | |
tree | bf304f139388d014daa78a990f2d519530ca23cd /target/linux/ar71xx/files/drivers | |
parent | cbae183c9e9ab18059d72fddc4331005861671fa (diff) | |
download | upstream-35dbf66787d0b33738b475e8af504bcd8e2dea3e.tar.gz upstream-35dbf66787d0b33738b475e8af504bcd8e2dea3e.tar.bz2 upstream-35dbf66787d0b33738b475e8af504bcd8e2dea3e.zip |
ar71xx: override fifo_cfg[123] values on AR7240
SVN-Revision: 18614
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c | 9 | ||||
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c | 8 |
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); |