[PATCH] of: Have of_device_add call platform_device_add rather than device_add

Grant Likely grant.likely at secretlab.ca
Tue Nov 27 02:28:48 EST 2012


On Thu, 22 Nov 2012 10:30:20 -0700, Jason Gunthorpe <jgunthorpe at obsidianresearch.com> wrote:
> On Thu, Nov 22, 2012 at 03:36:21PM +0000, Grant Likely wrote:
> 
> > Hmm... I've not tried it with assigned-address. I tried with two sibling
> > platform devices using just the 'reg' property. That the kernel will
> > complain about. For powerpc-only, the patch I posted allows the device
> > to get registered anyway even though the range incorrectly overlaps.
> 
> My second example was done with the reg property..
> 
>                 gpio0: gpio at 10100 {
>                         compatible = "marvell,orion-gpio";
>                         #gpio-cells = <2>;
>                         gpio-controller;
>                         reg = <0x10100 0x40>;
>                 }
>                 chip_cfg at 0 {
>                         compatible = "orc,chip_config";
>                         // Doubles up on gpio0
>                         reg = <0x10100 0x4>;
>                 };
> 
> 
> f1010100-f101013f : /internal at f1000000/gpio at 10100
>   f1010100-f1010103 : /internal at f1000000/chip_cfg at 0
> 
> What did you try? Maybe order matters?

(Sorry for not replying to my own mail; I'm doing this offline and my
sent mail doesn't show)

Looks like it is by design. With my dummy devices I see this:

10200c00-102023ff : /amba/overlap at 10200c00
  10201000-10201fff : /amba/dummy at 10201000
    10201400-10201bff : /amba/overlap at 10201400

All three of those devices are siblings in the device tree.

g.


More information about the devicetree-discuss mailing list