Re: [PATCH 2/2] ubi: open volumes define in device tree
From: Ezequiel Garcia <hidden>
Date: 2016-06-24 18:45:45
On 18 June 2016 at 16:17, Hauke Mehrtens [off-list ref] wrote:
quoted hunk
This makes it possible to define a volume to open in device tree. This is helpful when a root file system is on a ubi layer. Without this patch it is only possible to device with with kernel command line parameters. Signed-off-by: Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org> --- Documentation/devicetree/bindings/mtd/ubi.txt | 22 +++++++++++++++++ drivers/mtd/ubi/build.c | 34 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+)diff --git a/Documentation/devicetree/bindings/mtd/ubi.txt b/Documentation/devicetree/bindings/mtd/ubi.txt index 5fcd47e..f87a7d8 100644 --- a/Documentation/devicetree/bindings/mtd/ubi.txt +++ b/Documentation/devicetree/bindings/mtd/ubi.txt@@ -13,6 +13,16 @@ Describe of a UBI layer in device tree. which have to be assigned to the newly created UBI device (assigned automatically by default) +Partitions on a UBI layer can be defined: + + - compatible: "ubi,volume" + - name: name of the ubi volume to open + - ubi-mode: mode of the ubi volume to open value: + UBI_READONLY: 1 + UBI_READWRITE: 2 + UBI_EXCLUSIVE: 3 + UBI_METAONLY: 4 + Example: partitions {@@ -29,5 +39,17 @@ partitions { label = "system_sw"; reg = <0x1c0000 0xc800000>; compatible = "ubi,device"; + + rootfsA@0 { + compatible = "ubi,volume"; + name = "rootfsA"; + ubi-mode = <1>; + }; + + data_vol@0 { + compatible = "ubi,volume"; + name = "data_vol"; + ubi-mode = <2>; + }; }; };diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 16baeb5..1c22533 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c@@ -1,6 +1,7 @@ /* * Copyright (c) International Business Machines Corp., 2006 * Copyright (c) Nokia Corporation, 2007 + * Copyright (c) 2016 Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org> *
A tangential comment for this and other patches. There's no need to add your copyright when you are submitting small contributions. -- Ezequiel García, VanguardiaSur www.vanguardiasur.com.ar -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html