On Fri, 2004-02-20 at 17:30, Linus Torvalds wrote:
> On Fri, 20 Feb 2004, Benjamin Herrenschmidt wrote:
> > 
> > A while ago, I've advertised making this API a set of function
> > pointers attached to the struct device inherited from the bus
> > parent, so the core code just set one for the root PCIs and
> > everybody inherits them.... But of course, since x86 isn't
> > affected, nobody cared ;)
> 
> Well, in all fairness, that _is_ what "platform_data" is supposed to be. A
> platform-specific pointer to whatever data structure that platform needs
> to have to do the device ops. Platforms that don't need the function 
> pointers wouldn't have any function pointers there, while others would 
> have not just the function pointers, but could have some other 
> bus-dependent data too.

Yes, but we don't have a hook for actually filling this pointer, do we ?

We should have a way, when creating a device, to fill it properly, like

platform_device_setup(struct device *new_dev, struct device *parent)

That would allow me to deal with the hierarchy thing (inheriting by
default the DMA stuff from the parent typically).

Now, the question is where is the best place to call this "hook" ?

> (And this is what at least HP-PA does, as does ARM...)
> 
> So it's definitely not unsuitable for this. It does seem like USB jumped 
> the gun a bit, though.

Yes. I also remember a time where the dma mask for the DMA API was all
broken too (would not be possible to map the PCI one on top of it),
but I think that got fixed. 





-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to