summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/arch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-14 13:41:42 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-14 13:41:42 +0000
commita63bf2580b863d161183c388d9f2f81e48f9344b (patch)
tree216d7238b325d3ecd66fa037a8a093375fe7f238 /target/linux/ar71xx/files/arch
parent1ee0813a713bcc9d88e55ea18aaa7d45b68ecdcc (diff)
ar71xx: remove dev-ap91-eth.c. switch its only user (RB-750) to the new switch driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23439 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig6
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/Makefile1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c61
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.h23
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c24
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c1
7 files changed, 15 insertions, 102 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
index 6d52eba862..a0e1410206 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
@@ -30,7 +30,6 @@ config AR71XX_MACH_AP96
config AR71XX_MACH_DIR_600_A1
bool "D-Link DIR-600 rev. A1 support"
- select AR71XX_DEV_AP91_ETH
select AR71XX_DEV_AP91_PCI if PCI
select AR71XX_DEV_M25P80
select AR71XX_DEV_GPIO_BUTTONS
@@ -140,7 +139,6 @@ config AR71XX_MACH_RB4XX
config AR71XX_MACH_RB750
bool "MikroTik RouterBOARD 750 support"
- select AR71XX_DEV_AP91_ETH
default n
config AR71XX_MACH_WNDR3700
@@ -281,10 +279,6 @@ config AR71XX_DEV_AP91_PCI
select AR71XX_PCI_ATH9K_FIXUP
def_bool n
-config AR71XX_DEV_AP91_ETH
- select AR71XX_DEV_DSA
- def_bool n
-
config AR71XX_DEV_AP94_PCI
select AR71XX_PCI_ATH9K_FIXUP
def_bool n
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
index 991ae92023..f6ceb0a98f 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
@@ -13,7 +13,6 @@ obj-y := prom.o irq.o setup.o devices.o gpio.o ar71xx.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_PCI) += pci.o
-obj-$(CONFIG_AR71XX_DEV_AP91_ETH) += dev-ap91-eth.o
obj-$(CONFIG_AR71XX_DEV_AP91_PCI) += dev-ap91-pci.o
obj-$(CONFIG_AR71XX_DEV_AP94_PCI) += dev-ap94-pci.o
obj-$(CONFIG_AR71XX_DEV_AR913X_WMAC) += dev-ar913x-wmac.o
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c
deleted file mode 100644
index fbb813603f..0000000000
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Atheros AP91 reference board ethernet initialization
- *
- * Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
- */
-
-#include "devices.h"
-#include "dev-dsa.h"
-#include "dev-ap91-eth.h"
-
-static struct dsa_chip_data ap91_dsa_chip = {
- .port_names[0] = "cpu",
- .port_names[1] = "lan1",
- .port_names[2] = "lan2",
- .port_names[3] = "lan3",
- .port_names[4] = "lan4",
-};
-
-static struct dsa_platform_data ap91_dsa_data = {
- .nr_chips = 1,
- .chip = &ap91_dsa_chip,
-};
-
-static void ap91_eth_set_port_name(unsigned port, const char *name)
-{
- if (port < 1 || port > 5)
- return;
-
- if (name)
- ap91_dsa_chip.port_names[port] = (char *) name;
-}
-
-void __init ap91_eth_init(const char *port_names[])
-{
- if (port_names) {
- int i;
-
- for (i = 0; i < AP91_ETH_NUM_PORT_NAMES; i++)
- ap91_eth_set_port_name(i + 1, port_names[i]);
- }
-
- /* 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_add_device_mdio(0x0);
- ar71xx_add_device_eth(1);
- ar71xx_add_device_eth(0);
-
- ar71xx_add_device_dsa(1, &ap91_dsa_data);
-}
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.h b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.h
deleted file mode 100644
index 08b1dde6bb..0000000000
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Atheros AP91 reference board ethernet initialization
- *
- * Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
- */
-
-#ifndef _AR71XX_DEV_AP91_ETH_H
-#define _AR71XX_DEV_AP91_ETH_H
-
-#define AP91_ETH_NUM_PORT_NAMES 4
-
-#if defined(CONFIG_AR71XX_DEV_AP91_ETH)
-void ap91_eth_init(const char *port_names[]) __init;
-#else
-static inline void ap91_eth_init(const char *port_names[]) { }
-#endif
-
-#endif /* _AR71XX_DEV_AP91_ETH_H */
-
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c
index 5c36402e34..ffb4c0b84b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c
@@ -16,7 +16,6 @@
#include "machtype.h"
#include "devices.h"
#include "dev-m25p80.h"
-#include "dev-ap91-eth.h"
#include "dev-ap91-pci.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c
index 9c8386b7ba..d60f45294d 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c
@@ -14,7 +14,6 @@
#include "machtype.h"
#include "devices.h"
-#include "dev-ap91-eth.h"
static struct rb750_led_data rb750_leds[] = {
{
@@ -56,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,
@@ -127,7 +119,21 @@ static void __init rb750_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, ar71xx_mac_base, 1);
- ap91_eth_init(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);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
index 834b462de4..b2cee220bb 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
@@ -16,7 +16,6 @@
#include "machtype.h"
#include "devices.h"
#include "dev-m25p80.h"
-#include "dev-ap91-eth.h"
#include "dev-ap91-pci.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"