lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250211212928.GA1188800-robh@kernel.org>
Date: Tue, 11 Feb 2025 15:29:28 -0600
From: Rob Herring <robh@...nel.org>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@....com>
Cc: miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
	krzk+dt@...nel.org, conor+dt@...nel.org,
	linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, git@....com, amitrkcian2002@...il.com
Subject: Re: [PATCH v12 1/3] dt-bindings: mtd: Describe MTD partitions
 concatenation

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@...000 {
>                             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@...000 {
>                             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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ