[PATCH v12 3/3] mtd: Add driver for concatenating devices
Miquel Raynal
miquel.raynal at bootlin.com
Wed Mar 19 01:21:19 PDT 2025
On 19/03/2025 at 06:17:50 GMT, "Mahapatra, Amit Kumar" <amit.kumar-mahapatra at amd.com> wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> Hello Miquel,
>
>> -----Original Message-----
>> From: Miquel Raynal <miquel.raynal at bootlin.com>
>> Sent: Tuesday, March 18, 2025 9:23 PM
>> To: Mahapatra, Amit Kumar <amit.kumar-mahapatra at amd.com>
>> Cc: richard at nod.at; vigneshr at ti.com; robh at kernel.org; krzk+dt at kernel.org;
>> conor+dt at kernel.org; linux-mtd at lists.infradead.org; devicetree at vger.kernel.org;
>> linux-kernel at vger.kernel.org; git (AMD-Xilinx) <git at amd.com>;
>> amitrkcian2002 at gmail.com; Bernhard Frauendienst <kernel at nospam.obeliks.de>
>> Subject: Re: [PATCH v12 3/3] mtd: Add driver for concatenating devices
>>
>> On 05/02/2025 at 19:07:30 +0530, Amit Kumar Mahapatra <amit.kumar-
>> mahapatra at amd.com> wrote:
>>
>> > Introducing CONFIG_VIRT_CONCAT to separate the legacy flow from the
>> > new
>>
>> CONFIG_MTD_VIRT_CONCAT
>>
>> > approach, where individual partitions within a concatenated partition
>> > are not registered, as they are likely not needed by the user.
>>
>> I am not a big fan of this choice. We had issues with hiding things to the user in the
>> first place. Could we find a way to expose both the original mtd devices as well as
>> the virtually concatenated partitions?
>
> Sure, I think that can be done, but I took this approach to hide the
> original devices because Boris mentioned in [1] that we are creating
> the original partitions even though the user probably doesn't need
> them. I believe he is right, as I can't think of any use case where
> the user would require the individual devices instead of the
> concatenated device.
>
> [1] https://lore.kernel.org/linux-mtd/20191209113506.41341ed4@collabora.com/
He was suggesting not to create the intermediate partitions, and I agree
it is not super relevant, but the flash devices themselves are relevant.
In this example:
concatenate = <&part2>, <&part3>;
flash at 0 {
part1 { }
part2 { }
};
flash at 0 {
part3 { }
part4 { }
};
part1, part2, part3, part4 are partitions, at least part1 and part4
should appear like mtd devices.
Boris was suggesting to not expose part2 and part3 individually when
concatenating them, I'm fine with that.
What I am saying, is that flash at 0 and flash at 1 shall be represented by
two mtd devices and not hidden/skipped.
Thanks,
Miquèl
More information about the linux-mtd
mailing list