aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-07-20 12:04:34 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-07-20 12:04:34 +0000
commitfefc79f3cb0c74d9890617284e6fe2f8d2f6c203 (patch)
tree360fae63490481f1061409c7bb3bcc7e6849950c /target/linux/ar71xx/files/drivers/net
parent005fe5d1fde456b29fe89c9bbf8fc52c16c5f95f (diff)
downloadupstream-fefc79f3cb0c74d9890617284e6fe2f8d2f6c203.tar.gz
upstream-fefc79f3cb0c74d9890617284e6fe2f8d2f6c203.tar.bz2
upstream-fefc79f3cb0c74d9890617284e6fe2f8d2f6c203.zip
ar71xx: reset the phy in the ethernet init on ar724x
SVN-Revision: 27703
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c13
1 files changed, 13 insertions, 0 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 c1143161af..ce2af538cb 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
@@ -433,9 +433,22 @@ static void ag71xx_hw_stop(struct ag71xx *ag)
static void ag71xx_hw_init(struct ag71xx *ag)
{
struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
+ u32 reset_mask = pdata->reset_bit;
ag71xx_hw_stop(ag);
+ if (pdata->is_ar724x) {
+ u32 reset_phy = reset_mask;
+
+ reset_phy &= RESET_MODULE_GE0_PHY | RESET_MODULE_GE1_PHY;
+ reset_mask &= ~(RESET_MODULE_GE0_PHY | RESET_MODULE_GE1_PHY);
+
+ ar71xx_device_stop(reset_phy);
+ mdelay(50);
+ ar71xx_device_start(reset_phy);
+ mdelay(200);
+ }
+
ag71xx_sb(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_SR);
udelay(20);