aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-02-17 09:23:22 -0500
committerJason Cooper <jason@lakedaemon.net>2014-02-21 19:41:09 -0500
commitdf863de19fc5a7b3a982a8204f9e2e8bb6e2d96d (patch)
tree4a40bbbc9277fac827b1fddaaf442d8e5bfc698b
parent798ec443ad30f1366ae6bff909eec77e8debffb4 (diff)
ARM: mvebu: add Armada 375 support to the system-controller driver
The system controller block in the Armada 375 has different register offsets for the system reset and other related functions. Therefore, this commit introduces the new "armada-375-system-controller" compatible string to identify the Armada 375 variant of the system controller. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--Documentation/devicetree/bindings/arm/mvebu-system-controller.txt3
-rw-r--r--arch/arm/mach-mvebu/system-controller.c14
2 files changed, 14 insertions, 3 deletions
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/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};