Re: [PATCH] pasemi: electra IDE/pata_platform glue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2007-05-13 at 02:48 +0200, Arnd Bergmann wrote:
> On Sunday 13 May 2007, Alan Cox wrote:
> > > Why not provide a proper pata_of.c driver based on ata_generic? That
> > > will help the next person that has a builtin ata controller and wants
> > > to get it running as an of_device.
> > 
> > Easier to use pata_platform I would think ? Just create the OF device and
> > bind it to pata_platform.
> 
> Not sure I understand what you mean. pata_platform expects a platform_device,
> which cannot be cast from an of_device.

Note that in the long run, we might have less problem with that sort of
thing.

First, every device now has an OF node optionally attached to it (since
I introduced dev_sysdata). This of_device doesn't really bring much more
than OF type/name/compatible properties based probing.

Then, the plans I have in mind for the future of that stuff are around
the idea of registering "constructors" based on bus matches and device
matches respectively.

The kernel will then walk the whole OF device-tree at boot, and will
instanciate devices using those constructors, passing them the struct
device of whatever was the parent.

Thus we could easily have platforms registers constructors for specific
devices that build a platform device off an OF node. We can have a
generic constructor that builds the PCI devices, etc... and we can have
bus constructors to generate of_device's for things where they are
useful, like plb4/5 on 4xx etc...

On top of that, I want to add some resource management to of_device and
maybe kill things like ebus, vio, etc... device if possible (that is if
the only difference to the base OF device can be resolved at
construction time).

Anyway, still only thoughts but that gives you an idea to where I'm
heading.

Ben.
 

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux