R: [PATCH] mtd: parsers: ofpart: limit parsing of deprecated DT syntax
ansuelsmth at gmail.com
ansuelsmth at gmail.com
Tue Mar 2 19:38:23 GMT 2021
> From: Rafał Miłecki <rafal at milecki.pl>
>
> For backward compatibility ofpart still supports the old syntax like:
> spi-flash at 0 {
> compatible = "jedec,spi-nor";
> reg = <0x0>;
>
> partition at 0 {
> label = "bootloader";
> reg = <0x0 0x100000>;
> };
> };
> (without "partitions" subnode).
>
> There is no reason however to support nested partitions without a clear
> "compatible" string like:
> partitions {
> compatible = "fixed-partitions";
> #address-cells = <1>;
> #size-cells = <1>;
>
> partition at 0 {
> label = "bootloader";
> reg = <0x0 0x100000>;
>
> partition at 0 {
> label = "config";
> reg = <0x80000 0x80000>;
> };
> };
> };
> (we never officially supported or documented that).
>
> Make sure ofpart doesn't attempt to parse above.
>
I have one question.
>From what I can see in the new code, in this example "something"
partition won't be parsed with the fixed-partition parser. Correct?
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition at 0 {
label = "bootloader";
reg = <0x0 0x100000>;
compatible = "random-parser";
partition at 0 {
label = "something";
reg = <0x0 0x100>;
};
};
};
More information about the linux-mtd
mailing list