[PATCH (v6) 1/2] mtd: brcmnand: Add brcm,bcm63268-nand device tree binding
Simon Arlott
simon at fire.lp0.eu
Wed Dec 2 12:34:38 PST 2015
On 02/12/15 20:21, Brian Norris wrote:
> Hi Simon,
>
> On Wed, Dec 02, 2015 at 08:12:32PM +0000, Simon Arlott wrote:
>> On 02/12/15 20:00, Brian Norris wrote:
>> > On Wed, Dec 02, 2015 at 07:41:07PM +0000, Simon Arlott wrote:
>> >> I've created a bcm963268part driver so there won't need to be any
>> >> partitions in DT for bcm63268.
>> >
>> > Just curious, do you plan to submit this driver? We're working on
>>
>> Yes, it's just the most recent one I've been working on. I still have
>> USBH and IUDMA to submit
>>
>> > matching up partition parsers to flash devices via device tree
>> > of_match_table's, so you could do something like this:
>> >
>> > nand0: nandcs at 0 {
>> > compatible = "brcm,nandcs";
>> > ...
>> >
>> > partitions {
>> > compatible = "brcm,bcm963268-partitions";
>> > ...
>> > };
>> > };
>>
>> I modified brcmnand to look for a machine matching "brcm,bcm963268", but
>
> Like this?
>
> http://patchwork.ozlabs.org/patch/473180/
>
> I'd like to avoid that (hence the "Rejected" status).
I exported default_mtd_part_types, copied it, and then added to it:
+ for (i = 0; i < nr_types; i++)
+ part_types[i] = default_mtd_part_types[i];
+
+ /* Add partition type based on machine */
+ if (of_machine_is_compatible("brcm,bcm963268"))
+ part_types[i++] = "bcm963268part";
+ else
+ part_types[i++] = NULL;
+
+ part_types[i++] = NULL;
>> that way is ok with me. Presumably "ofpart" defers to another matching
>> partition parser?
>
> Yes, "ofpart" is for specifying the entire partition table in the device
> tree as subnodes of either the flash node or of the flash's "partitions"
> subnode. It's not the most flexible, but it does work generically.
>
>> Is there a patch for that method of parser detection available?
>
> I have something working here, but I haven't had time to finish cleaning
> it up and submitting it. There's an older patch that works similarly,
> though it has some deficiencies:
>
> http://patchwork.ozlabs.org/patch/475988/
>
> The main difference between that and my (yet-to-be-submitted) proposal
> is that I'd like parsers to opt in by adding a proper of_match_table
> with non-Linux-specific DT bindings, and then we can drop the
> "linux,..." naming and make it a reasonably generic property.
I'll submit my parser without any means of using it, let me know if you
want me to work on a patch for a match table.
> Regards,
> Brian
>
--
Simon Arlott
More information about the linux-mtd
mailing list