Skip to content

Commit d4324ce

Browse files
committed
Merge tag 'mvebu-soc-3.15-2' of git://git.infradead.org/linux-mvebu into next/soc
Merge "mvebu soc changes for v3.15 (incremental pull #2)" from Jason Cooper: - mvebu - Add Armada 375, 380 and 385 SoCs - kirkwood - move kirkwood DT support to mach-mvebu - add mostly DT support for HP T5325 thin client * tag 'mvebu-soc-3.15-2' of git://git.infradead.org/linux-mvebu: ARM: kirkwood: Add HP T5325 thin client ARM: kirkwood: select dtbs based on SoC ARM: kirkwood: Remove redundant kexec code ARM: mvebu: Armada 375/38x depend on MULTI_V7 ARM: mvebu: Simplify headers and make local ARM: mvebu: Enable mvebu-soc-id on Kirkwood ARM: mvebu: Let kirkwood use the system controller for restart ARM: mvebu: Move kirkwood DT boards into mach-mvebu ARM: MM Enable building Feroceon L2 cache controller with ARCH_MVEBU ARM: Fix default CPU selection for ARCH_MULTI_V5 ARM: MM: Add DT binding for Feroceon L2 cache ARM: orion: Move cache-feroceon-l2.h out of plat-orion ARM: mvebu: Add ARCH_MULTI_V7 to SoCs ARM: kirkwood: ioremap memory control register ARM: kirkwood: ioremap the cpu_config register before using it. ARM: kirkwood: Separate board-dt from common and pcie code. ARM: kirkwood: Drop printing the SoC type and revision ARM: kirkwood: Convert mv88f6281gtw_ge switch setup to DT ARM: kirkwood: Give pm.c its own header file. ARM: mvebu: Rename the ARCH_MVEBU menu option Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 56f55de + 0d75ab6 commit d4324ce

File tree

26 files changed

+682
-110
lines changed

26 files changed

+682
-110
lines changed
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+
};

arch/arm/Kconfig

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

arch/arm/boot/dts/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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-cloudbox.dtb \
85+
kirkwood := \
86+
kirkwood-cloudbox.dtb \
8787
kirkwood-db-88f6281.dtb \
8888
kirkwood-db-88f6282.dtb \
8989
kirkwood-dns320.dtb \
@@ -117,6 +117,9 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
117117
kirkwood-topkick.dtb \
118118
kirkwood-ts219-6281.dtb \
119119
kirkwood-ts219-6282.dtb
120+
dtb-$(CONFIG_ARCH_KIRKWOOD) += $(kirkwood)
121+
dtb-$(CONFIG_MACH_KIRKWOOD) += $(kirkwood)
122+
dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
120123
dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
121124
dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb
122125
dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \

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-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

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

Lines changed: 0 additions & 50 deletions
This file was deleted.

arch/arm/mach-kirkwood/common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,18 @@
2525
#include <asm/page.h>
2626
#include <asm/mach/map.h>
2727
#include <asm/mach/time.h>
28+
#include <asm/hardware/cache-feroceon-l2.h>
2829
#include <mach/kirkwood.h>
2930
#include <mach/bridge-regs.h>
3031
#include <linux/platform_data/asoc-kirkwood.h>
31-
#include <plat/cache-feroceon-l2.h>
3232
#include <linux/platform_data/mmc-mvsdio.h>
3333
#include <linux/platform_data/mtd-orion_nand.h>
3434
#include <linux/platform_data/usb-ehci-orion.h>
3535
#include <plat/common.h>
3636
#include <plat/time.h>
3737
#include <linux/platform_data/dma-mv_xor.h>
3838
#include "common.h"
39+
#include "pm.h"
3940

4041
/* These can go away once Kirkwood uses the mvebu-mbus DT binding */
4142
#define KIRKWOOD_MBUS_NAND_TARGET 0x01

0 commit comments

Comments
 (0)