ar71xx: reset the mdio bus on ar7241/ar7242
authorFelix Fietkau <nbd@openwrt.org>
Sun, 28 Mar 2010 00:35:44 +0000 (00:35 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 28 Mar 2010 00:35:44 +0000 (00:35 +0000)
SVN-Revision: 20528

target/linux/ar71xx/files/arch/mips/ar71xx/devices.c
target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h

index a7714eef9fc8389389d6853286cd01bac2e78890..f809deae55af5a279444c45f9c7f9db5d52a5326 100644 (file)
@@ -436,9 +436,12 @@ void __init ar71xx_add_device_eth(unsigned int id)
                pdata->has_gbit = 1;
                break;
 
-       case AR71XX_SOC_AR7240:
        case AR71XX_SOC_AR7241:
        case AR71XX_SOC_AR7242:
+               ar71xx_eth0_data.reset_bit |= AR724X_RESET_GE0_MDIO;
+               ar71xx_eth1_data.reset_bit |= AR724X_RESET_GE1_MDIO;
+               /* fall through */
+       case AR71XX_SOC_AR7240:
                pdata->ddr_flush = id ? ar724x_ddr_flush_ge1
                                      : ar724x_ddr_flush_ge0;
                pdata->set_pll =  id ? ar724x_set_pll_ge1
index 7a7d75c3feed67e6936689b1486e714f5ce41148..c6a5a40995c4cbc7b75170798d9b85b926677fbc 100644 (file)
@@ -427,6 +427,8 @@ void ar71xx_ddr_flush(u32 reg);
 #define RESET_MODULE_PCI_BUS           BIT(1)
 #define RESET_MODULE_PCI_CORE          BIT(0)
 
+#define AR724X_RESET_GE1_MDIO          BIT(23)
+#define AR724X_RESET_GE0_MDIO          BIT(22)
 #define AR724X_RESET_PCIE_PHY_SERIAL   BIT(10)
 #define AR724X_RESET_PCIE_PHY          BIT(7)
 #define AR724X_RESET_PCIE              BIT(6)