mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Documentation: state: mention SD/eMMC devices
@ 2017-12-11 14:49 Sascha Hauer
  2017-12-11 15:00 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2017-12-11 14:49 UTC (permalink / raw)
  To: Barebox List

The state framework also has support for SD/eMMC devices, so mention
them in the documentation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 Documentation/user/state.rst | 46 ++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 44 insertions(+), 2 deletions(-)

diff --git a/Documentation/user/state.rst b/Documentation/user/state.rst
index 7d6c5770d5..af55d0837d 100644
--- a/Documentation/user/state.rst
+++ b/Documentation/user/state.rst
@@ -39,8 +39,8 @@ Backends (e.g. Supported Memory Types)
 
 Some non-volatile memory is need for storing a *state* variable set:
 
-- all kinds of NOR flash memories
-- all kinds of NAND flash memories
+- Disk like devices: SD, (e)MMC, ATA
+- all kinds of NAND and NOR flash memories (mtd)
 - MRAM
 - EEPROM
 - all kind of SRAMs (backup battery assumed)
@@ -531,6 +531,48 @@ content, its backend-type and *state* variable layout.
 		};
 	};
 
+SD/eMMC and ATA
+###############
+
+The following devicetree node entry defines some kind of SD/eMMC memory and
+a partition at a specific offset inside it to be used as the backend for the
+*state* variable set. Note that currently there is no support for on-disk
+partition tables. Instead, a ofpart partition description must be used. You
+have to make sure that this partition does not conflict with any other partiion
+in the partition table.
+
+.. code-block:: text
+
+	backend_state_sd: part@100000 {
+		label = "state";
+		reg = <0x100000 0x20000>;
+	};
+
+With this 'backend' definition its possible to define the *state* variable set
+content, its backend-type and *state* variable layout.
+
+.. code-block:: text
+
+	aliases {
+		state = &state_sd;
+	};
+
+	state_sd: state_memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "barebox,state";
+		magic = <0xab67421f>;
+		backend-type = "raw";
+		backend = <&backend_state_sd>;
+		backend-stridesize = <0x40>;
+
+		variable {
+			reg = <0x0 0x1>;
+			type ="uint8";
+			default = <0x1>;
+		};
+	};
+
 SRAM
 ####
 
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Documentation: state: mention SD/eMMC devices
  2017-12-11 14:49 [PATCH] Documentation: state: mention SD/eMMC devices Sascha Hauer
@ 2017-12-11 15:00 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-12-11 15:00 UTC (permalink / raw)
  To: Barebox List

On Mon, Dec 11, 2017 at 03:49:36PM +0100, Sascha Hauer wrote:
> The state framework also has support for SD/eMMC devices, so mention
> them in the documentation.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  Documentation/user/state.rst | 46 ++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 44 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/user/state.rst b/Documentation/user/state.rst
> index 7d6c5770d5..af55d0837d 100644
> --- a/Documentation/user/state.rst
> +++ b/Documentation/user/state.rst
> @@ -39,8 +39,8 @@ Backends (e.g. Supported Memory Types)
>  
>  Some non-volatile memory is need for storing a *state* variable set:
>  
> -- all kinds of NOR flash memories
> -- all kinds of NAND flash memories
> +- Disk like devices: SD, (e)MMC, ATA
> +- all kinds of NAND and NOR flash memories (mtd)
>  - MRAM
>  - EEPROM
>  - all kind of SRAMs (backup battery assumed)
> @@ -531,6 +531,48 @@ content, its backend-type and *state* variable layout.
>  		};
>  	};
>  
> +SD/eMMC and ATA
> +###############
> +
> +The following devicetree node entry defines some kind of SD/eMMC memory and
> +a partition at a specific offset inside it to be used as the backend for the
> +*state* variable set. Note that currently there is no support for on-disk
> +partition tables. Instead, a ofpart partition description must be used. You
> +have to make sure that this partition does not conflict with any other partiion

Just bought the missing 't' in partition.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-11 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11 14:49 [PATCH] Documentation: state: mention SD/eMMC devices Sascha Hauer
2017-12-11 15:00 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox