aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts62
-rw-r--r--arch/arm/mach-kirkwood/Kconfig7
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c3
-rw-r--r--arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c50
-rw-r--r--arch/arm/mach-kirkwood/common.h7
6 files changed, 62 insertions, 68 deletions
diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
index dc86429756d7..2cb0dc529165 100644
--- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
+++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
@@ -122,4 +122,66 @@
122 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; 122 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
123 }; 123 };
124 }; 124 };
125
126 dsa@0 {
127 compatible = "marvell,dsa";
128 #address-cells = <2>;
129 #size-cells = <0>;
130
131 dsa,ethernet = <&eth0>;
132 dsa,mii-bus = <&ethphy0>;
133
134 switch@0 {
135 #address-cells = <1>;
136 #size-cells = <0>;
137 reg = <0 0>; /* MDIO address 0, switch 0 in tree */
138
139 port@0 {
140 reg = <0>;
141 label = "lan1";
142 };
143
144 port@1 {
145 reg = <1>;
146 label = "lan2";
147 };
148
149 port@2 {
150 reg = <2>;
151 label = "lan3";
152 };
153
154 port@3 {
155 reg = <3>;
156 label = "lan4";
157 };
158
159 port@4 {
160 reg = <4>;
161 label = "wan";
162 };
163
164 port@5 {
165 reg = <5>;
166 label = "cpu";
167 };
168 };
169 };
170};
171
172&mdio {
173 status = "okay";
174
175 ethphy0: ethernet-phy@ff {
176 reg = <0xff>; /* No phy attached */
177 speed = <1000>;
178 duplex = <1>;
179 };
180};
181
182&eth0 {
183 status = "okay";
184 ethernet0-port@0 {
185 phy-handle = <&ethphy0>;
186 };
125}; 187};
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index fe8319ad3158..df4b26340ae4 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -106,13 +106,6 @@ config ARCH_KIRKWOOD_DT
106 Say 'Y' here if you want your kernel to support the 106 Say 'Y' here if you want your kernel to support the
107 Marvell Kirkwood using flattened device tree. 107 Marvell Kirkwood using flattened device tree.
108 108
109config MACH_MV88F6281GTW_GE_DT
110 bool "Marvell 88F6281 GTW GE Board (Flattened Device Tree)"
111 depends on ARCH_KIRKWOOD_DT
112 help
113 Say 'Y' here if you want your kernel to support the
114 Marvell 88F6281 GTW GE Board (Flattened Device Tree).
115
116endmenu 109endmenu
117 110
118endif 111endif
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 144b51102939..dc22bf5b21ed 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -13,4 +13,3 @@ obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
13obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o 13obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
14 14
15obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o 15obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
16obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index ceffdc8ffbbd..e74b31aa9736 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -131,9 +131,6 @@ static void __init kirkwood_dt_init(void)
131 kexec_reinit = kirkwood_enable_pcie; 131 kexec_reinit = kirkwood_enable_pcie;
132#endif 132#endif
133 133
134 if (of_machine_is_compatible("marvell,mv88f6281gtw-ge"))
135 mv88f6281gtw_ge_init();
136
137 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 134 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
138} 135}
139 136
diff --git a/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c b/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c
deleted file mode 100644
index ee5eea678c11..000000000000
--- a/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c
3 *
4 * Marvell 88F6281 GTW GE Board Setup
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/platform_device.h>
14#include <linux/irq.h>
15#include <linux/timer.h>
16#include <linux/mv643xx_eth.h>
17#include <linux/ethtool.h>
18#include <linux/gpio.h>
19#include <net/dsa.h>
20#include <asm/mach-types.h>
21#include <asm/mach/arch.h>
22#include <asm/mach/pci.h>
23#include <mach/kirkwood.h>
24#include "common.h"
25
26static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = {
27 .phy_addr = MV643XX_ETH_PHY_NONE,
28 .speed = SPEED_1000,
29 .duplex = DUPLEX_FULL,
30};
31
32static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = {
33 .port_names[0] = "lan1",
34 .port_names[1] = "lan2",
35 .port_names[2] = "lan3",
36 .port_names[3] = "lan4",
37 .port_names[4] = "wan",
38 .port_names[5] = "cpu",
39};
40
41static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = {
42 .nr_chips = 1,
43 .chip = &mv88f6281gtw_ge_switch_chip_data,
44};
45
46void __init mv88f6281gtw_ge_init(void)
47{
48 kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data);
49 kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ);
50}
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index 1296de94febf..832a4e2ab8d7 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -58,13 +58,6 @@ void kirkwood_cpufreq_init(void);
58void kirkwood_restart(enum reboot_mode, const char *); 58void kirkwood_restart(enum reboot_mode, const char *);
59void kirkwood_clk_init(void); 59void kirkwood_clk_init(void);
60 60
61/* board init functions for boards not fully converted to fdt */
62#ifdef CONFIG_MACH_MV88F6281GTW_GE_DT
63void mv88f6281gtw_ge_init(void);
64#else
65static inline void mv88f6281gtw_ge_init(void) {};
66#endif
67
68/* early init functions not converted to fdt yet */ 61/* early init functions not converted to fdt yet */
69char *kirkwood_id(void); 62char *kirkwood_id(void);
70void kirkwood_l2_init(void); 63void kirkwood_l2_init(void);