aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/bus
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-11-21 11:00:03 -0500
committerJason Cooper <jason@lakedaemon.net>2014-11-30 11:40:10 -0500
commita0e89c02da974838053a3604025e43600dc6ac45 (patch)
tree082f2ce8417738b0241d14c873ee2395b07e2084 /Documentation/devicetree/bindings/bus
parentf9a49ab53a269fda39ae57063bd336b4bd62fa76 (diff)
bus: mvebu-mbus: suspend/resume support
This commit extends the mvebu-mbus driver to provide suspend/resume support. Since mvebu-mbus is not a platform_driver, the syscore_ops mechanism is used to get ->suspend() and ->resume() hooks called into the driver. In those hooks, we save and restore the MBus windows state, to make sure after resume all Mbus windows are properly restored. Note that while the state of some windows could be gathered by looking again at the Device Tree (for statically described windows), it is not the case of dynamically described windows such as the PCIe memory and I/O windows. Therefore, we take the simple approach of saving and restoring the registers for all MBus windows. In addition, the commit extends the Device Tree binding of the MBus controller, to control the MBus bridge registers (which define which parts of the physical address space is routed to MBus windows vs. normal RAM memory). Those registers must be saved and restored during suspend/resume. The Device Tree binding extension is made is a backward compatible fashion, but of course, suspend/resume will not work without the Device Tree update. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Link: https://lkml.kernel.org/r/1416585613-2113-7-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'Documentation/devicetree/bindings/bus')
-rw-r--r--Documentation/devicetree/bindings/bus/mvebu-mbus.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
index 5fa44f52a0b8..5e16c3ccb061 100644
--- a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
+++ b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
@@ -48,9 +48,12 @@ Required properties:
48- compatible: Should be set to "marvell,mbus-controller". 48- compatible: Should be set to "marvell,mbus-controller".
49 49
50- reg: Device's register space. 50- reg: Device's register space.
51 Two entries are expected (see the examples below): 51 Two or three entries are expected (see the examples below):
52 the first one controls the devices decoding window and 52 the first one controls the devices decoding window,
53 the second one controls the SDRAM decoding window. 53 the second one controls the SDRAM decoding window and
54 the third controls the MBus bridge (only with the
55 marvell,armada370-mbus and marvell,armadaxp-mbus
56 compatible strings)
54 57
55Example: 58Example:
56 59
@@ -67,7 +70,7 @@ Example:
67 70
68 mbusc: mbus-controller@20000 { 71 mbusc: mbus-controller@20000 {
69 compatible = "marvell,mbus-controller"; 72 compatible = "marvell,mbus-controller";
70 reg = <0x20000 0x100>, <0x20180 0x20>; 73 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
71 }; 74 };
72 75
73 /* more children ...*/ 76 /* more children ...*/
@@ -126,7 +129,7 @@ are skipped.
126 129
127 mbusc: mbus-controller@20000 { 130 mbusc: mbus-controller@20000 {
128 compatible = "marvell,mbus-controller"; 131 compatible = "marvell,mbus-controller";
129 reg = <0x20000 0x100>, <0x20180 0x20>; 132 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
130 }; 133 };
131 134
132 /* more children ...*/ 135 /* more children ...*/
@@ -170,7 +173,7 @@ Using this macro, the above example would be:
170 173
171 mbusc: mbus-controller@20000 { 174 mbusc: mbus-controller@20000 {
172 compatible = "marvell,mbus-controller"; 175 compatible = "marvell,mbus-controller";
173 reg = <0x20000 0x100>, <0x20180 0x20>; 176 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
174 }; 177 };
175 178
176 /* other children */ 179 /* other children */
@@ -266,7 +269,7 @@ See the example below, where a more complete device tree is shown:
266 ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; 269 ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
267 270
268 mbusc: mbus-controller@20000 { 271 mbusc: mbus-controller@20000 {
269 reg = <0x20000 0x100>, <0x20180 0x20>; 272 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
270 }; 273 };
271 274
272 interrupt-controller@20000 { 275 interrupt-controller@20000 {