[PATCH] mtd/powernv_flash: Enable partition support

Timothy Pearson tpearson at raptorengineering.com
Thu Mar 29 15:25:48 PDT 2018


On 03/29/2018 05:11 PM, Rafał Miłecki wrote:
> On 29 March 2018 at 23:43, Timothy Pearson
> <tpearson at raptorengineering.com> wrote:
>> Will resend with Signed-off-by.
>>
>> Before this patch, the driver was not picking up the OF-provided
>> partition list.  It seemed specifically designed to register only one
>> large partition covering the entire PNOR; mtd_device_register() does not
>> run parsing of any type AFAIK.
> 
> Please don't top post.

Whoops!  I have to interface with other entities that need top posting
and slipped up here.  Sorry about that!

> This is how mtd_device_register is defined:
> #define mtd_device_register(master, parts, nr_parts) \
>         mtd_device_parse_register(master, NULL, NULL, parts, nr_parts)
> 
> So your patch seems to be replacing
> mtd_device_parse_register(&data->mtd, NULL, NULL, NULL, 0);
> with
> mtd_device_parse_register(&data->mtd, part_probes, NULL, NULL, 0);
> 
> I still claim that all it does is replacing list of default parsers:
> "cmdlinepart", "ofpart", NULL
> with a custom list:
> "ofpart", NULL
> 
> I don't think you need that. Probably the only change you really need is to add:
> mtd_set_of_node(&data->mtd, dev->of_node);

It's possible; I'm not as familiar with the MTD subsystem as I should
be.  That being said, in this application there is no chance of
partition information being passed via kernel command line, so the right
thing to do from a design perspective is lock the parser to ofpart only.

If you need me to remove that part of the patch I will do so.

Thanks!

-- 
Timothy Pearson
Raptor Engineering
+1 (415) 727-8645 (direct line)
+1 (512) 690-0200 (switchboard)
https://www.raptorengineering.com



More information about the linux-mtd mailing list