Re: [PATCH v12 1/3] dt-bindings: mtd: Describe MTD partitions concatenation

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

 



On Wed, Feb 05, 2025 at 07:07:28PM +0530, Amit Kumar Mahapatra wrote:
> The AMD QSPI controller supports an advanced connection modes called
> Stacked mode which allow the controller to treat two different flashes
> as one storage.
> 
> In Stacked connection mode flashes share the same SPI bus, but different CS
> line, controller driver asserts the CS of the flash to which it needs to
> communicate. Stacked mode is a software abstraction rather than a
> controller feature or capability. At any given time, the controller
> communicates with one of the two connected flash devices, as determined by
> the requested address and data length. If an operation starts on one flash
> and ends on the other, the mtd layer needs to split it into two separate
> operations and adjust the data length accordingly. For more information on
> the modes please feel free to go through the controller flash interface
> below [1].
> 
> Introduce new DT property to specify which partitions are concatenated to
> each other.
> 
>     flash@0 {
>             reg = <0>;
>             partitions {
>                     compatible = "fixed-partitions";
>                     part-concat = <&flash0_part1>, <&flash1_part0>;
> 
>                     flash0_part0: part0@0 {
>                             label = "part0_0";
>                             reg = <0x0 0x800000>;
>                     };
> 
>                     flash0_part1: part1@800000 {
>                             label = "part0_1";
>                             reg = <0x800000 0x800000>;
>                     };
>             };
>     };
> 
>     flash@1 {
>             reg = <1>;
>             partitions {
>                     compatible = "fixed-partitions";
> 
>                     flash1_part0: part1@0 {
>                             label = "part1_0";
>                             reg = <0x0 0x800000>;
>                     };
> 
>                     flash1_part1: part1@800000 {
>                             label = "part1_1";
>                             reg = <0x800000 0x800000>;
>                     };
>             };
>     };
> 
> The partitions that gets created are
> part0_0
> part1_1
> part0_1-part1_0-concat

'part-concat' doesn't work if you have multiple sets of partitions you 
want to concatenate.

I think you need something like 'prev-partition' or 'next-partition' in 
the partition nodes to create a linked list of partitions. Hopefully, 
you don't need both properties, but you do have to scan everything to 
figure out which ones are concatenated or not. For example, no property 
can mean not concatenated or last partition if you use 'next-partition'. 

Rob




[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