ar71xx: merge ap91_eth removal from r23439
[openwrt-10.03/.git] / target / linux / ar71xx / files / arch / mips / ar71xx / mach-rb750.c
index 3972f57ac734f53bad09cb390957ec1f3bd7eef5..41a184e358f9d8cf4a7b8ac77190af725b31e4f8 100644 (file)
@@ -12,8 +12,8 @@
 #include <asm/mach-ar71xx/ar71xx.h>
 #include <asm/mach-ar71xx/mach-rb750.h>
 
+#include "devices.h"
 #include "machtype.h"
-#include "dev-ap91-eth.h"
 
 static struct rb750_led_data rb750_leds[] = {
        {
@@ -55,13 +55,6 @@ static struct platform_device rb750_leds_device = {
        }
 };
 
-static const char *rb750_port_names[AP91_ETH_NUM_PORT_NAMES] __initdata = {
-       "port5",
-       "port4",
-       "port3",
-       "port2",
-};
-
 static struct platform_device rb750_nand_device = {
        .name   = "rb750-nand",
        .id     = -1,
@@ -124,7 +117,21 @@ static void __init rb750_setup(void)
                                     AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
                                     AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 
-       ap91_eth_init(NULL, rb750_port_names);
+       /* WAN port */
+       ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth0_data.speed = SPEED_100;
+       ar71xx_eth0_data.duplex = DUPLEX_FULL;
+
+       /* LAN ports */
+       ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth1_data.speed = SPEED_1000;
+       ar71xx_eth1_data.duplex = DUPLEX_FULL;
+       ar71xx_eth1_data.has_ar7240_switch = 1;
+
+       ar71xx_add_device_mdio(0x0);
+       ar71xx_add_device_eth(1);
+       ar71xx_add_device_eth(0);
+
        platform_device_register(&rb750_leds_device);
        platform_device_register(&rb750_nand_device);
 }