mvebu new SoCs for v3.15

- mvebu
     - initial support for Armada 375, 380, and 385
 
 Depends:
  - tags/mvebu-soc-3.15 (resolves delete/rename hidden conflict)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTCEYEAAoJEP45WPkGe8ZnOcwP/01XcyweSLF5N2eIAoIN7jJC
 NGE/MAV0loUbMGoIIHIvjcphLyok2XBGeLZSp8hc3oknAk/w7rmV6C/chvlo7Dcr
 lP773QI0CoFFj/QcJOlCifI+TZeNlT8ffWBn/PjzPiGPyA3VGU+E9dUoMSeJOfDH
 nE4XLIDEoQfjNtGScmmOT3tWYs4MeJ5UOUP32ZFxQXOgzPmoIqMLLASVHfQTmSVS
 QG7zIyfwEKT5FvAAc7cvo8Z+x6y1SR2ZGLPT8l0Cfd8i8hzk+rbxOJrnvMccSU/e
 ASwwKxlGtw+lDjwk9+pKVaoBzls7KifBA5iQLkoU+5/mv8J2zIdtBZWSxCB1/N85
 jnFGCsQCYDiMv8+JqoBaAl0OXO5q+n42rQa/IMm+quxvTn4FDWn7rUwsgjCJeTH2
 0f1+1glFEvFGeKd6oxy60i7JBirnCWWkLthQf6rmW2UAF5Zv2tUgNs5i4r23ulor
 gZH0q5VEPVdecdlG4BtIUoGHJpm7bBw9VRS6sviVXM0RZuT0k4pgCR0wOO1Es14Q
 uROkkjOWuONAZLfcUO3Y6AevSfvrB8paforGpoUj6mZtvDbfEsgy7REt2bGYoEaL
 dKlzQP7CWIP8Jl9ENXj4IpJOXEkWTmkHLS4pc0NZBTFpw2AqbtZXFP8qvYWE6Qt/
 dXPcA3o+Ru166LvNSPi1
 =LIE3
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-soc-3xx-3.15' of git://git.infradead.org/linux-mvebu into next/soc

Merge "mvebu new SoCs for v3.15" from Jason Cooper:

 - mvebu
    - initial support for Armada 375, 380, and 385

Depends:
 - tags/mvebu-soc-3.15 (resolves delete/rename hidden conflict)

* tag 'mvebu-soc-3xx-3.15' of git://git.infradead.org/linux-mvebu:
  Documentation: arm: update Marvell documentation about Armada 375/38x
  ARM: mvebu: add initial support for the Armada 380/385 SOCs
  ARM: mvebu: add workaround for data abort issue on Armada 375
  ARM: mvebu: add initial support for the Armada 375 SOCs
  ARM: mvebu: add Armada 375 support to the system-controller driver
  ARM: mvebu: make CPU_PJ4B selection a per-SoC choice
  ARM: mvebu: rename DT machine structure for Armada 370/XP
  ARM: mvebu: rename armada-370-xp.c to board-v7.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2014-02-25 18:34:42 +01:00
commit 88dbede1da
8 changed files with 133 additions and 15 deletions

View File

@ -83,14 +83,24 @@ EBU Armada family
88F6710 88F6710
88F6707 88F6707
88F6W11 88F6W11
Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
Armada 375 Flavors:
88F6720
Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf
Armada 380/385 Flavors:
88F6810
88F6820
88F6828
Armada XP Flavors: Armada XP Flavors:
MV78230 MV78230
MV78260 MV78260
MV78460 MV78460
NOTE: not to be confused with the non-SMP 78xx0 SoCs NOTE: not to be confused with the non-SMP 78xx0 SoCs
Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
No public datasheet available. No public datasheet available.
Core: Sheeva ARMv7 compatible Core: Sheeva ARMv7 compatible

View File

@ -0,0 +1,9 @@
Marvell Armada 375 Platforms Device Tree Bindings
-------------------------------------------------
Boards with a SoC of the Marvell Armada 375 family shall have the
following property:
Required root node property:
compatible: must contain "marvell,armada375"

View File

@ -0,0 +1,10 @@
Marvell Armada 38x Platforms Device Tree Bindings
-------------------------------------------------
Boards with a SoC of the Marvell Armada 38x family shall have the
following property:
Required root node property:
- compatible: must contain either "marvell,armada380" or
"marvell,armada385" depending on the variant of the SoC being used.

View File

@ -1,12 +1,13 @@
MVEBU System Controller MVEBU System Controller
----------------------- -----------------------
MVEBU (Marvell SOCs: Armada 370/XP, Dove, mv78xx0, Kirkwood, Orion5x) MVEBU (Marvell SOCs: Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x)
Required properties: Required properties:
- compatible: one of: - compatible: one of:
- "marvell,orion-system-controller" - "marvell,orion-system-controller"
- "marvell,armada-370-xp-system-controller" - "marvell,armada-370-xp-system-controller"
- "marvell,armada-375-system-controller"
- reg: Should contain system controller registers location and length. - reg: Should contain system controller registers location and length.
Example: Example:

View File

@ -21,26 +21,55 @@ if ARCH_MVEBU
menu "Marvell SOC with device tree" menu "Marvell SOC with device tree"
config MACH_ARMADA_370_XP config MACH_MVEBU_V7
bool bool
select ARMADA_370_XP_TIMER select ARMADA_370_XP_TIMER
select HAVE_SMP select HAVE_SMP
select CACHE_L2X0 select CACHE_L2X0
select CPU_PJ4B
config MACH_ARMADA_370 config MACH_ARMADA_370
bool "Marvell Armada 370 boards" bool "Marvell Armada 370 boards"
select ARMADA_370_CLK select ARMADA_370_CLK
select MACH_ARMADA_370_XP select CPU_PJ4B
select MACH_MVEBU_V7
select PINCTRL_ARMADA_370 select PINCTRL_ARMADA_370
help help
Say 'Y' here if you want your kernel to support boards based Say 'Y' here if you want your kernel to support boards based
on the Marvell Armada 370 SoC with device tree. on the Marvell Armada 370 SoC with device tree.
config MACH_ARMADA_375
bool "Marvell Armada 375 boards"
select ARM_ERRATA_720789
select ARM_ERRATA_753970
select ARM_GIC
select ARMADA_375_CLK
select CPU_V7
select MACH_MVEBU_V7
select NEON
select PINCTRL_ARMADA_375
help
Say 'Y' here if you want your kernel to support boards based
on the Marvell Armada 375 SoC with device tree.
config MACH_ARMADA_38X
bool "Marvell Armada 380/385 boards"
select ARM_ERRATA_720789
select ARM_ERRATA_753970
select ARM_GIC
select ARMADA_38X_CLK
select CPU_V7
select MACH_MVEBU_V7
select NEON
select PINCTRL_ARMADA_38X
help
Say 'Y' here if you want your kernel to support boards based
on the Marvell Armada 380/385 SoC with device tree.
config MACH_ARMADA_XP config MACH_ARMADA_XP
bool "Marvell Armada XP boards" bool "Marvell Armada XP boards"
select ARMADA_XP_CLK select ARMADA_XP_CLK
select MACH_ARMADA_370_XP select CPU_PJ4B
select MACH_MVEBU_V7
select PINCTRL_ARMADA_XP select PINCTRL_ARMADA_XP
help help
Say 'Y' here if you want your kernel to support boards based Say 'Y' here if you want your kernel to support boards based

View File

@ -3,7 +3,8 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
AFLAGS_coherency_ll.o := -Wa,-march=armv7-a AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
obj-y += coherency.o coherency_ll.o pmsu.o system-controller.o mvebu-soc-id.o obj-y += system-controller.o mvebu-soc-id.o
obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o obj-$(CONFIG_MACH_MVEBU_V7) += board-v7.o
obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o
obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o

View File

@ -31,7 +31,28 @@
#include "coherency.h" #include "coherency.h"
#include "mvebu-soc-id.h" #include "mvebu-soc-id.h"
static void __init armada_370_xp_timer_and_clk_init(void) /*
* Early versions of Armada 375 SoC have a bug where the BootROM
* leaves an external data abort pending. The kernel is hit by this
* data abort as soon as it enters userspace, because it unmasks the
* data aborts at this moment. We register a custom abort handler
* below to ignore the first data abort to work around this
* problem.
*/
static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
static int ignore_first;
if (!ignore_first && fsr == 0x1406) {
ignore_first = 1;
return 0;
}
return 1;
}
static void __init mvebu_timer_and_clk_init(void)
{ {
of_clk_init(NULL); of_clk_init(NULL);
clocksource_of_init(); clocksource_of_init();
@ -40,6 +61,10 @@ static void __init armada_370_xp_timer_and_clk_init(void)
#ifdef CONFIG_CACHE_L2X0 #ifdef CONFIG_CACHE_L2X0
l2x0_of_init(0, ~0UL); l2x0_of_init(0, ~0UL);
#endif #endif
if (of_machine_is_compatible("marvell,armada375"))
hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0,
"imprecise external abort");
} }
static void __init i2c_quirk(void) static void __init i2c_quirk(void)
@ -70,7 +95,7 @@ static void __init i2c_quirk(void)
return; return;
} }
static void __init armada_370_xp_dt_init(void) static void __init mvebu_dt_init(void)
{ {
if (of_machine_is_compatible("plathome,openblocks-ax3-4")) if (of_machine_is_compatible("plathome,openblocks-ax3-4"))
i2c_quirk(); i2c_quirk();
@ -82,10 +107,33 @@ static const char * const armada_370_xp_dt_compat[] = {
NULL, NULL,
}; };
DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)") DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
.smp = smp_ops(armada_xp_smp_ops), .smp = smp_ops(armada_xp_smp_ops),
.init_machine = armada_370_xp_dt_init, .init_machine = mvebu_dt_init,
.init_time = armada_370_xp_timer_and_clk_init, .init_time = mvebu_timer_and_clk_init,
.restart = mvebu_restart, .restart = mvebu_restart,
.dt_compat = armada_370_xp_dt_compat, .dt_compat = armada_370_xp_dt_compat,
MACHINE_END MACHINE_END
static const char * const armada_375_dt_compat[] = {
"marvell,armada375",
NULL,
};
DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
.init_time = mvebu_timer_and_clk_init,
.restart = mvebu_restart,
.dt_compat = armada_375_dt_compat,
MACHINE_END
static const char * const armada_38x_dt_compat[] = {
"marvell,armada380",
"marvell,armada385",
NULL,
};
DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)")
.init_time = mvebu_timer_and_clk_init,
.restart = mvebu_restart,
.dt_compat = armada_38x_dt_compat,
MACHINE_END

View File

@ -1,5 +1,5 @@
/* /*
* System controller support for Armada 370 and XP platforms. * System controller support for Armada 370, 375 and XP platforms.
* *
* Copyright (C) 2012 Marvell * Copyright (C) 2012 Marvell
* *
@ -11,7 +11,7 @@
* License version 2. This program is licensed "as is" without any * License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied. * warranty of any kind, whether express or implied.
* *
* The Armada 370 and Armada XP SoCs both have a range of * The Armada 370, 375 and Armada XP SoCs have a range of
* miscellaneous registers, that do not belong to a particular device, * miscellaneous registers, that do not belong to a particular device,
* but rather provide system-level features. This basic * but rather provide system-level features. This basic
* system-controller driver provides a device tree binding for those * 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 = {
.system_soft_reset = 0x1, .system_soft_reset = 0x1,
}; };
static const struct mvebu_system_controller armada_375_system_controller = {
.rstoutn_mask_offset = 0x54,
.system_soft_reset_offset = 0x58,
.rstoutn_mask_reset_out_en = 0x1,
.system_soft_reset = 0x1,
};
static const struct mvebu_system_controller orion_system_controller = { static const struct mvebu_system_controller orion_system_controller = {
.rstoutn_mask_offset = 0x108, .rstoutn_mask_offset = 0x108,
.system_soft_reset_offset = 0x10c, .system_soft_reset_offset = 0x10c,
@ -61,6 +68,9 @@ static const struct of_device_id of_system_controller_table[] = {
}, { }, {
.compatible = "marvell,armada-370-xp-system-controller", .compatible = "marvell,armada-370-xp-system-controller",
.data = (void *) &armada_370_xp_system_controller, .data = (void *) &armada_370_xp_system_controller,
}, {
.compatible = "marvell,armada-375-system-controller",
.data = (void *) &armada_375_system_controller,
}, },
{ /* end of list */ }, { /* end of list */ },
}; };