ar71xx: force hardwired interface parameters in ar71xx_add_device_eth
authorGabor Juhos <juhosg@openwrt.org>
Mon, 14 Nov 2011 07:38:07 +0000 (07:38 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Mon, 14 Nov 2011 07:38:07 +0000 (07:38 +0000)
SVN-Revision: 29102

target/linux/ar71xx/files/arch/mips/ar71xx/devices.c

index b2dc0fbe55e1eb4341877782e044aa2d0434423a..16cb4f1c3e3de2208a3a077a5421423bc622a2a9 100644 (file)
@@ -821,10 +821,16 @@ void __init ar71xx_add_device_eth(unsigned int id)
                        pdata->reset_bit |= RESET_MODULE_GE0_PHY;
                        pdata->ddr_flush = ar724x_ddr_flush_ge0;
                        pdata->set_speed = ar724x_set_speed_ge0;
+
+                       pdata->phy_mask = BIT(4);
                } else {
                        pdata->reset_bit |= RESET_MODULE_GE1_PHY;
                        pdata->ddr_flush = ar724x_ddr_flush_ge1;
                        pdata->set_speed = ar724x_set_speed_ge1;
+
+                       pdata->speed = SPEED_1000;
+                       pdata->duplex = DUPLEX_FULL;
+                       pdata->has_ar7240_switch = 1;
                }
                pdata->has_gbit = 1;
                pdata->is_ar724x = 1;
@@ -874,6 +880,10 @@ void __init ar71xx_add_device_eth(unsigned int id)
                                           AR933X_RESET_GE1_MDIO;
                        pdata->ddr_flush = ar933x_ddr_flush_ge1;
                        pdata->set_speed = ar933x_set_speed_ge1;
+
+                       pdata->speed = SPEED_1000;
+                       pdata->duplex = DUPLEX_FULL;
+                       pdata->has_ar7240_switch = 1;
                }
 
                pdata->has_gbit = 1;
@@ -899,7 +909,7 @@ void __init ar71xx_add_device_eth(unsigned int id)
                        pdata->reset_bit = AR934X_RESET_GE1_MAC |
                                           AR934X_RESET_GE1_MDIO;
                        pdata->ddr_flush = ar934x_ddr_flush_ge1;
-                       pdata->set_speed = ar934x_set_speed_ge1
+                       pdata->set_speed = ar934x_set_speed_ge1;
                }
 
                pdata->has_gbit = 1;