summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-03-21 13:57:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-31 18:43:53 +0200
commit99020ca016f5569a14ef7571384a0205f13522e8 (patch)
tree35181d160941f21dad895366b550cf9c598a5bd7 /Documentation
parent12960a57841d5e6ea04fd523611e15a9a4170c89 (diff)
downloadbarebox-99020ca016f5569a14ef7571384a0205f13522e8.tar.gz
barebox-99020ca016f5569a14ef7571384a0205f13522e8.tar.xz
state: Make pointing to the backend using a phandle the only supported method
All other methods are broken for some time already: When starting the kernel the state code rewrites the state node in the device tree and replaced the "backend" property with a phandle - even when the target can't be described as a phandle. Since using phandles is the nicest way to point to the storage device anyway remove the other methods. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/barebox/barebox,state.rst27
1 files changed, 20 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/barebox/barebox,state.rst b/Documentation/devicetree/bindings/barebox/barebox,state.rst
index 438cc434a2..e9daa65f1a 100644
--- a/Documentation/devicetree/bindings/barebox/barebox,state.rst
+++ b/Documentation/devicetree/bindings/barebox/barebox,state.rst
@@ -29,7 +29,8 @@ Required properties:
* ``compatible``: should be ``barebox,state``;
* ``magic``: A 32bit number used as a magic to identify the state
-* ``backend``: describes where the data for this state is stored
+* ``backend``: contains a phandle to the device/partition which holds the
+ actual state data.
* ``backend-type``: should be ``raw`` or ``dtb``.
Optional properties:
@@ -77,19 +78,31 @@ Example::
magic = <0x27031977>;
compatible = "barebox,state";
backend-type = "raw";
- backend = &eeprom, "partname:state";
+ backend = &state_part;
foo {
- reg = <0x00 0x4>;
- type = "uint32";
+ reg = <0x00 0x4>;
+ type = "uint32";
default = <0x0>;
};
bar {
- reg = <0x10 0x4>;
- type = "enum32";
+ reg = <0x10 0x4>;
+ type = "enum32";
names = "baz", "qux";
- default = <1>;
+ default = <1>;
+ };
+ };
+
+ &nand_flash {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ state_part: state@10000 {
+ label = "state";
+ reg = <0x10000 0x10000>;
+ };
};
};