Skip to content

Commit 54cab10

Browse files
committed
Merge branch 'mvebu/soc3' into next/dt
The dts Makefile has a bunch of nasty conflicts, attempt to resolve these now to avoid trouble later. Conflicts: arch/arm/boot/dts/Makefile Signed-off-by: Arnd Bergmann <[email protected]>
2 parents e887ae2 + 00e8ec2 commit 54cab10

35 files changed

+834
-156
lines changed

Documentation/arm/Marvell/README

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,24 @@ EBU Armada family
8383
88F6710
8484
88F6707
8585
88F6W11
86+
Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
87+
88+
Armada 375 Flavors:
89+
88F6720
90+
Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf
91+
92+
Armada 380/385 Flavors:
93+
88F6810
94+
88F6820
95+
88F6828
8696

8797
Armada XP Flavors:
8898
MV78230
8999
MV78260
90100
MV78460
91101
NOTE: not to be confused with the non-SMP 78xx0 SoCs
102+
Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
92103

93-
Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
94104
No public datasheet available.
95105

96106
Core: Sheeva ARMv7 compatible
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Marvell Armada 375 Platforms Device Tree Bindings
2+
-------------------------------------------------
3+
4+
Boards with a SoC of the Marvell Armada 375 family shall have the
5+
following property:
6+
7+
Required root node property:
8+
9+
compatible: must contain "marvell,armada375"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Marvell Armada 38x Platforms Device Tree Bindings
2+
-------------------------------------------------
3+
4+
Boards with a SoC of the Marvell Armada 38x family shall have the
5+
following property:
6+
7+
Required root node property:
8+
9+
- compatible: must contain either "marvell,armada380" or
10+
"marvell,armada385" depending on the variant of the SoC being used.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* Marvell Feroceon Cache
2+
3+
Required properties:
4+
- compatible : Should be either "marvell,feroceon-cache" or
5+
"marvell,kirkwood-cache".
6+
7+
Optional properties:
8+
- reg : Address of the L2 cache control register. Mandatory for
9+
"marvell,kirkwood-cache", not used by "marvell,feroceon-cache"
10+
11+
12+
Example:
13+
l2: l2-cache@20128 {
14+
compatible = "marvell,kirkwood-cache";
15+
reg = <0x20128 0x4>;
16+
};

Documentation/devicetree/bindings/arm/mvebu-system-controller.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
MVEBU System Controller
22
-----------------------
3-
MVEBU (Marvell SOCs: Armada 370/XP, Dove, mv78xx0, Kirkwood, Orion5x)
3+
MVEBU (Marvell SOCs: Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x)
44

55
Required properties:
66

77
- compatible: one of:
88
- "marvell,orion-system-controller"
99
- "marvell,armada-370-xp-system-controller"
10+
- "marvell,armada-375-system-controller"
1011
- reg: Should contain system controller registers location and length.
1112

1213
Example:

arch/arm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ config ARCH_MULTI_V5
894894
bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)"
895895
depends on !ARCH_MULTI_V6_V7
896896
select ARCH_MULTI_V4_V5
897-
select CPU_ARM926T if (!CPU_ARM946E || CPU_ARM1020 || \
897+
select CPU_ARM926T if !(CPU_ARM946E || CPU_ARM1020 || \
898898
CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \
899899
CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_FEROCEON)
900900

arch/arm/boot/dts/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ dtb-$(CONFIG_ARCH_BERLIN) += \
5555
berlin2cd-google-chromecast.dtb
5656
dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \
5757
da850-evm.dtb
58-
dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \
58+
dtb-$(CONFIG_MACH_DOVE) += dove-cm-a510.dtb \
5959
dove-cubox.dtb \
6060
dove-d2plug.dtb \
6161
dove-d3plug.dtb \
@@ -82,8 +82,8 @@ dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
8282
ecx-2000.dtb
8383
dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
8484
integratorcp.dtb
85-
dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
86-
dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-b3.dtb \
85+
kirkwood := \
86+
kirkwood-b3.dtb \
8787
kirkwood-cloudbox.dtb \
8888
kirkwood-db-88f6281.dtb \
8989
kirkwood-db-88f6282.dtb \
@@ -139,6 +139,9 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-b3.dtb \
139139
kirkwood-ts219-6282.dtb \
140140
kirkwood-ts419-6281.dtb \
141141
kirkwood-ts419-6282.dtb
142+
dtb-$(CONFIG_ARCH_KIRKWOOD) += $(kirkwood)
143+
dtb-$(CONFIG_MACH_KIRKWOOD) += $(kirkwood)
144+
dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
142145
dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
143146
dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb
144147
dtb-$(CONFIG_ARCH_MXC) += \

arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,66 @@
122122
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
123123
};
124124
};
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+
};
125187
};

arch/arm/plat-orion/include/plat/cache-feroceon-l2.h renamed to arch/arm/include/asm/hardware/cache-feroceon-l2.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* arch/arm/plat-orion/include/plat/cache-feroceon-l2.h
2+
* arch/arm/include/asm/hardware/cache-feroceon-l2.h
33
*
44
* Copyright (C) 2008 Marvell Semiconductor
55
*
@@ -9,3 +9,5 @@
99
*/
1010

1111
extern void __init feroceon_l2_init(int l2_wt_override);
12+
extern int __init feroceon_of_init(void);
13+

arch/arm/mach-dove/Kconfig

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ config MACH_CM_A510
2020
Say 'Y' here if you want your kernel to support the
2121
CompuLab CM-A510 Board.
2222

23-
config MACH_DOVE_DT
24-
bool "Marvell Dove Flattened Device Tree"
25-
select DOVE_CLK
26-
select ORION_IRQCHIP
27-
select ORION_TIMER
28-
select REGULATOR
29-
select REGULATOR_FIXED_VOLTAGE
30-
select USE_OF
31-
help
32-
Say 'Y' here if you want your kernel to support the
33-
Marvell Dove using flattened device tree.
34-
3523
endmenu
3624

3725
endif

arch/arm/mach-dove/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ obj-y += common.o
22
obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o
33
obj-$(CONFIG_PCI) += pcie.o
44
obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
5-
obj-$(CONFIG_MACH_DOVE_DT) += board-dt.o
65
obj-$(CONFIG_MACH_CM_A510) += cm-a510.o

arch/arm/mach-kirkwood/Kconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,6 @@ config ARCH_KIRKWOOD_DT
106106
Say 'Y' here if you want your kernel to support the
107107
Marvell Kirkwood using flattened device tree.
108108

109-
config 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-
116109
endmenu
117110

118111
endif

arch/arm/mach-kirkwood/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
obj-y += common.o pcie.o
2-
obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o
1+
obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o common.o pcie.o
32
obj-$(CONFIG_PM) += pm.o
43

54
obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o
@@ -13,4 +12,3 @@ obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
1312
obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
1413

1514
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
16-
obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o

arch/arm/mach-kirkwood/board-dt.c

Lines changed: 93 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,84 @@
1919
#include <linux/of_platform.h>
2020
#include <linux/dma-mapping.h>
2121
#include <linux/irqchip.h>
22-
#include <linux/kexec.h>
22+
#include <asm/hardware/cache-feroceon-l2.h>
2323
#include <asm/mach/arch.h>
24+
#include <asm/mach/map.h>
2425
#include <mach/bridge-regs.h>
2526
#include <plat/common.h>
26-
#include "common.h"
27+
#include <plat/pcie.h>
28+
#include "pm.h"
29+
30+
static struct map_desc kirkwood_io_desc[] __initdata = {
31+
{
32+
.virtual = (unsigned long) KIRKWOOD_REGS_VIRT_BASE,
33+
.pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE),
34+
.length = KIRKWOOD_REGS_SIZE,
35+
.type = MT_DEVICE,
36+
},
37+
};
38+
39+
static void __init kirkwood_map_io(void)
40+
{
41+
iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc));
42+
}
43+
44+
static struct resource kirkwood_cpufreq_resources[] = {
45+
[0] = {
46+
.start = CPU_CONTROL_PHYS,
47+
.end = CPU_CONTROL_PHYS + 3,
48+
.flags = IORESOURCE_MEM,
49+
},
50+
};
51+
52+
static struct platform_device kirkwood_cpufreq_device = {
53+
.name = "kirkwood-cpufreq",
54+
.id = -1,
55+
.num_resources = ARRAY_SIZE(kirkwood_cpufreq_resources),
56+
.resource = kirkwood_cpufreq_resources,
57+
};
58+
59+
static void __init kirkwood_cpufreq_init(void)
60+
{
61+
platform_device_register(&kirkwood_cpufreq_device);
62+
}
63+
64+
static struct resource kirkwood_cpuidle_resource[] = {
65+
{
66+
.flags = IORESOURCE_MEM,
67+
.start = DDR_OPERATION_BASE,
68+
.end = DDR_OPERATION_BASE + 3,
69+
},
70+
};
71+
72+
static struct platform_device kirkwood_cpuidle = {
73+
.name = "kirkwood_cpuidle",
74+
.id = -1,
75+
.resource = kirkwood_cpuidle_resource,
76+
.num_resources = 1,
77+
};
78+
79+
static void __init kirkwood_cpuidle_init(void)
80+
{
81+
platform_device_register(&kirkwood_cpuidle);
82+
}
83+
84+
/* Temporary here since mach-mvebu has a function we can use */
85+
static void kirkwood_restart(enum reboot_mode mode, const char *cmd)
86+
{
87+
/*
88+
* Enable soft reset to assert RSTOUTn.
89+
*/
90+
writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
91+
92+
/*
93+
* Assert soft reset.
94+
*/
95+
writel(SOFT_RESET, SYSTEM_SOFT_RESET);
96+
97+
while (1)
98+
;
99+
}
27100

28101
#define MV643XX_ETH_MAC_ADDR_LOW 0x0414
29102
#define MV643XX_ETH_MAC_ADDR_HIGH 0x0418
@@ -104,35 +177,35 @@ static void __init kirkwood_dt_eth_fixup(void)
104177
}
105178
}
106179

107-
static void __init kirkwood_dt_init(void)
180+
/*
181+
* Disable propagation of mbus errors to the CPU local bus, as this
182+
* causes mbus errors (which can occur for example for PCI aborts) to
183+
* throw CPU aborts, which we're not set up to deal with.
184+
*/
185+
static void __init kirkwood_disable_mbus_error_propagation(void)
108186
{
109-
pr_info("Kirkwood: %s.\n", kirkwood_id());
187+
void __iomem *cpu_config;
110188

111-
/*
112-
* Disable propagation of mbus errors to the CPU local bus,
113-
* as this causes mbus errors (which can occur for example
114-
* for PCI aborts) to throw CPU aborts, which we're not set
115-
* up to deal with.
116-
*/
117-
writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG);
189+
cpu_config = ioremap(CPU_CONFIG_PHYS, 4);
190+
writel(readl(cpu_config) & ~CPU_CONFIG_ERROR_PROP, cpu_config);
191+
iounmap(cpu_config);
192+
}
118193

119-
BUG_ON(mvebu_mbus_dt_init());
194+
static void __init kirkwood_dt_init(void)
195+
{
196+
kirkwood_disable_mbus_error_propagation();
120197

121-
kirkwood_l2_init();
198+
BUG_ON(mvebu_mbus_dt_init());
122199

200+
#ifdef CONFIG_CACHE_FEROCEON_L2
201+
feroceon_of_init();
202+
#endif
123203
kirkwood_cpufreq_init();
124204
kirkwood_cpuidle_init();
125205

126206
kirkwood_pm_init();
127207
kirkwood_dt_eth_fixup();
128208

129-
#ifdef CONFIG_KEXEC
130-
kexec_reinit = kirkwood_enable_pcie;
131-
#endif
132-
133-
if (of_machine_is_compatible("marvell,mv88f6281gtw-ge"))
134-
mv88f6281gtw_ge_init();
135-
136209
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
137210
}
138211

0 commit comments

Comments
 (0)