aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Cooper <jason@lakedaemon.net>2014-02-28 22:20:55 -0500
committerJason Cooper <jason@lakedaemon.net>2014-02-28 22:20:55 -0500
commitaa89b0ad4f9cac3925bd8e85dbfc3c50ba7b31cf (patch)
tree860b1de328ad7bc65fd430ea09368394f024a7e0
parentb92f10be479b3b63e753968a0c6cb3f605ad7142 (diff)
parent665ca874e1f7f0690a1efa6900e71490c3814fcd (diff)
Merge branch 'mvebu/soc-3xx' into mvebu/soc
-rw-r--r--Documentation/arm/Marvell/README12
-rw-r--r--Documentation/devicetree/bindings/arm/armada-375.txt9
-rw-r--r--Documentation/devicetree/bindings/arm/armada-38x.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/mvebu-system-controller.txt3
-rw-r--r--arch/arm/mach-mvebu/Kconfig37
-rw-r--r--arch/arm/mach-mvebu/Makefile5
-rw-r--r--arch/arm/mach-mvebu/board-v7.c (renamed from arch/arm/mach-mvebu/armada-370-xp.c)58
-rw-r--r--arch/arm/mach-mvebu/system-controller.c14
8 files changed, 133 insertions, 15 deletions
diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README
index 5a930c1528ad..963ec445e15a 100644
--- a/Documentation/arm/Marvell/README
+++ b/Documentation/arm/Marvell/README
@@ -83,14 +83,24 @@ EBU Armada family
83 88F6710 83 88F6710
84 88F6707 84 88F6707
85 88F6W11 85 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
86 96
87 Armada XP Flavors: 97 Armada XP Flavors:
88 MV78230 98 MV78230
89 MV78260 99 MV78260
90 MV78460 100 MV78460
91 NOTE: not to be confused with the non-SMP 78xx0 SoCs 101 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
92 103
93 Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
94 No public datasheet available. 104 No public datasheet available.
95 105
96 Core: Sheeva ARMv7 compatible 106 Core: Sheeva ARMv7 compatible
diff --git a/Documentation/devicetree/bindings/arm/armada-375.txt b/Documentation/devicetree/bindings/arm/armada-375.txt
new file mode 100644
index 000000000000..867d0b80cb8f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armada-375.txt
@@ -0,0 +1,9 @@
1Marvell Armada 375 Platforms Device Tree Bindings
2-------------------------------------------------
3
4Boards with a SoC of the Marvell Armada 375 family shall have the
5following property:
6
7Required root node property:
8
9compatible: must contain "marvell,armada375"
diff --git a/Documentation/devicetree/bindings/arm/armada-38x.txt b/Documentation/devicetree/bindings/arm/armada-38x.txt
new file mode 100644
index 000000000000..11f2330a6554
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armada-38x.txt
@@ -0,0 +1,10 @@
1Marvell Armada 38x Platforms Device Tree Bindings
2-------------------------------------------------
3
4Boards with a SoC of the Marvell Armada 38x family shall have the
5following property:
6
7Required root node property:
8
9 - compatible: must contain either "marvell,armada380" or
10 "marvell,armada385" depending on the variant of the SoC being used.
diff --git a/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt b/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt
index 081c6a786c8a..d24ab2ebf8a7 100644
--- a/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt
+++ b/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt
@@ -1,12 +1,13 @@
1MVEBU System Controller 1MVEBU System Controller
2----------------------- 2-----------------------
3MVEBU (Marvell SOCs: Armada 370/XP, Dove, mv78xx0, Kirkwood, Orion5x) 3MVEBU (Marvell SOCs: Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x)
4 4
5Required properties: 5Required properties:
6 6
7- compatible: one of: 7- compatible: one of:
8 - "marvell,orion-system-controller" 8 - "marvell,orion-system-controller"
9 - "marvell,armada-370-xp-system-controller" 9 - "marvell,armada-370-xp-system-controller"
10 - "marvell,armada-375-system-controller"
10- reg: Should contain system controller registers location and length. 11- reg: Should contain system controller registers location and length.
11 12
12Example: 13Example:
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 1ba825ee3fe5..4b1eea09ae93 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -21,26 +21,55 @@ if ARCH_MVEBU
21 21
22menu "Marvell EBU SoC variants" 22menu "Marvell EBU SoC variants"
23 23
24config MACH_ARMADA_370_XP 24config MACH_MVEBU_V7
25 bool 25 bool
26 select ARMADA_370_XP_TIMER 26 select ARMADA_370_XP_TIMER
27 select HAVE_SMP 27 select HAVE_SMP
28 select CACHE_L2X0 28 select CACHE_L2X0
29 select CPU_PJ4B
30 29
31config MACH_ARMADA_370 30config MACH_ARMADA_370
32 bool "Marvell Armada 370 boards" 31 bool "Marvell Armada 370 boards"
33 select ARMADA_370_CLK 32 select ARMADA_370_CLK
34 select MACH_ARMADA_370_XP 33 select CPU_PJ4B
34 select MACH_MVEBU_V7
35 select PINCTRL_ARMADA_370 35 select PINCTRL_ARMADA_370
36 help 36 help
37 Say 'Y' here if you want your kernel to support boards based 37 Say 'Y' here if you want your kernel to support boards based
38 on the Marvell Armada 370 SoC with device tree. 38 on the Marvell Armada 370 SoC with device tree.
39 39
40config MACH_ARMADA_375
41 bool "Marvell Armada 375 boards" if ARCH_MULTI_V7
42 select ARM_ERRATA_720789
43 select ARM_ERRATA_753970
44 select ARM_GIC
45 select ARMADA_375_CLK
46 select CPU_V7
47 select MACH_MVEBU_V7
48 select NEON
49 select PINCTRL_ARMADA_375
50 help
51 Say 'Y' here if you want your kernel to support boards based
52 on the Marvell Armada 375 SoC with device tree.
53
54config MACH_ARMADA_38X
55 bool "Marvell Armada 380/385 boards" if ARCH_MULTI_V7
56 select ARM_ERRATA_720789
57 select ARM_ERRATA_753970
58 select ARM_GIC
59 select ARMADA_38X_CLK
60 select CPU_V7
61 select MACH_MVEBU_V7
62 select NEON
63 select PINCTRL_ARMADA_38X
64 help
65 Say 'Y' here if you want your kernel to support boards based
66 on the Marvell Armada 380/385 SoC with device tree.
67
40config MACH_ARMADA_XP 68config MACH_ARMADA_XP
41 bool "Marvell Armada XP boards" 69 bool "Marvell Armada XP boards"
42 select ARMADA_XP_CLK 70 select ARMADA_XP_CLK
43 select MACH_ARMADA_370_XP 71 select CPU_PJ4B
72 select MACH_MVEBU_V7
44 select PINCTRL_ARMADA_XP 73 select PINCTRL_ARMADA_XP
45 help 74 help
46 Say 'Y' here if you want your kernel to support boards based 75 Say 'Y' here if you want your kernel to support boards based
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index d99846103bbb..2c1db29db2ca 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -3,7 +3,8 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
3 3
4AFLAGS_coherency_ll.o := -Wa,-march=armv7-a 4AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
5 5
6obj-y += coherency.o coherency_ll.o pmsu.o system-controller.o mvebu-soc-id.o 6obj-y += system-controller.o mvebu-soc-id.o
7obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o 7obj-$(CONFIG_MACH_MVEBU_V7) += board-v7.o
8obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o
8obj-$(CONFIG_SMP) += platsmp.o headsmp.o 9obj-$(CONFIG_SMP) += platsmp.o headsmp.o
9obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 10obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/board-v7.c
index 161cf2f54220..746134ecdfc2 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -31,7 +31,28 @@
31#include "coherency.h" 31#include "coherency.h"
32#include "mvebu-soc-id.h" 32#include "mvebu-soc-id.h"
33 33
34static void __init armada_370_xp_timer_and_clk_init(void) 34/*
35 * Early versions of Armada 375 SoC have a bug where the BootROM
36 * leaves an external data abort pending. The kernel is hit by this
37 * data abort as soon as it enters userspace, because it unmasks the
38 * data aborts at this moment. We register a custom abort handler
39 * below to ignore the first data abort to work around this
40 * problem.
41 */
42static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
43 struct pt_regs *regs)
44{
45 static int ignore_first;
46
47 if (!ignore_first && fsr == 0x1406) {
48 ignore_first = 1;
49 return 0;
50 }
51
52 return 1;
53}
54
55static void __init mvebu_timer_and_clk_init(void)
35{ 56{
36 of_clk_init(NULL); 57 of_clk_init(NULL);
37 clocksource_of_init(); 58 clocksource_of_init();
@@ -40,6 +61,10 @@ static void __init armada_370_xp_timer_and_clk_init(void)
40#ifdef CONFIG_CACHE_L2X0 61#ifdef CONFIG_CACHE_L2X0
41 l2x0_of_init(0, ~0UL); 62 l2x0_of_init(0, ~0UL);
42#endif 63#endif
64
65 if (of_machine_is_compatible("marvell,armada375"))
66 hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0,
67 "imprecise external abort");
43} 68}
44 69
45static void __init i2c_quirk(void) 70static void __init i2c_quirk(void)
@@ -70,7 +95,7 @@ static void __init i2c_quirk(void)
70 return; 95 return;
71} 96}
72 97
73static void __init armada_370_xp_dt_init(void) 98static void __init mvebu_dt_init(void)
74{ 99{
75 if (of_machine_is_compatible("plathome,openblocks-ax3-4")) 100 if (of_machine_is_compatible("plathome,openblocks-ax3-4"))
76 i2c_quirk(); 101 i2c_quirk();
@@ -82,10 +107,33 @@ static const char * const armada_370_xp_dt_compat[] = {
82 NULL, 107 NULL,
83}; 108};
84 109
85DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)") 110DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
86 .smp = smp_ops(armada_xp_smp_ops), 111 .smp = smp_ops(armada_xp_smp_ops),
87 .init_machine = armada_370_xp_dt_init, 112 .init_machine = mvebu_dt_init,
88 .init_time = armada_370_xp_timer_and_clk_init, 113 .init_time = mvebu_timer_and_clk_init,
89 .restart = mvebu_restart, 114 .restart = mvebu_restart,
90 .dt_compat = armada_370_xp_dt_compat, 115 .dt_compat = armada_370_xp_dt_compat,
91MACHINE_END 116MACHINE_END
117
118static const char * const armada_375_dt_compat[] = {
119 "marvell,armada375",
120 NULL,
121};
122
123DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
124 .init_time = mvebu_timer_and_clk_init,
125 .restart = mvebu_restart,
126 .dt_compat = armada_375_dt_compat,
127MACHINE_END
128
129static const char * const armada_38x_dt_compat[] = {
130 "marvell,armada380",
131 "marvell,armada385",
132 NULL,
133};
134
135DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)")
136 .init_time = mvebu_timer_and_clk_init,
137 .restart = mvebu_restart,
138 .dt_compat = armada_38x_dt_compat,
139MACHINE_END
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
index e6e300afe836..614ba6832ff3 100644
--- a/arch/arm/mach-mvebu/system-controller.c
+++ b/arch/arm/mach-mvebu/system-controller.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * System controller support for Armada 370 and XP platforms. 2 * System controller support for Armada 370, 375 and XP platforms.
3 * 3 *
4 * Copyright (C) 2012 Marvell 4 * Copyright (C) 2012 Marvell
5 * 5 *
@@ -11,7 +11,7 @@
11 * License version 2. This program is licensed "as is" without any 11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied. 12 * warranty of any kind, whether express or implied.
13 * 13 *
14 * The Armada 370 and Armada XP SoCs both have a range of 14 * The Armada 370, 375 and Armada XP SoCs have a range of
15 * miscellaneous registers, that do not belong to a particular device, 15 * miscellaneous registers, that do not belong to a particular device,
16 * but rather provide system-level features. This basic 16 * but rather provide system-level features. This basic
17 * system-controller driver provides a device tree binding for those 17 * system-controller driver provides a device tree binding for those
@@ -47,6 +47,13 @@ static const struct mvebu_system_controller armada_370_xp_system_controller = {
47 .system_soft_reset = 0x1, 47 .system_soft_reset = 0x1,
48}; 48};
49 49
50static const struct mvebu_system_controller armada_375_system_controller = {
51 .rstoutn_mask_offset = 0x54,
52 .system_soft_reset_offset = 0x58,
53 .rstoutn_mask_reset_out_en = 0x1,
54 .system_soft_reset = 0x1,
55};
56
50static const struct mvebu_system_controller orion_system_controller = { 57static const struct mvebu_system_controller orion_system_controller = {
51 .rstoutn_mask_offset = 0x108, 58 .rstoutn_mask_offset = 0x108,
52 .system_soft_reset_offset = 0x10c, 59 .system_soft_reset_offset = 0x10c,
@@ -61,6 +68,9 @@ static const struct of_device_id of_system_controller_table[] = {
61 }, { 68 }, {
62 .compatible = "marvell,armada-370-xp-system-controller", 69 .compatible = "marvell,armada-370-xp-system-controller",
63 .data = (void *) &armada_370_xp_system_controller, 70 .data = (void *) &armada_370_xp_system_controller,
71 }, {
72 .compatible = "marvell,armada-375-system-controller",
73 .data = (void *) &armada_375_system_controller,
64 }, 74 },
65 { /* end of list */ }, 75 { /* end of list */ },
66}; 76};