Re: [PATCH 2/2] ubi: open volumes define in device tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 18 June 2016 at 16:17, Hauke Mehrtens <hauke@xxxxxxxxxx> wrote:
> 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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>
>   *

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux