[PATCH 9/16] Supporting of PCI bus for Celleb

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Nov 18 09:20:51 EST 2006


>  We think that a new bus type should be defined for IOIFs, as they are 
> not PCI, not virtual buses. We did't have enough time to examine what 
> kind of method is the best, implement to kernel and then modify device 
> drivers..

It mostly depends on wether you need specific methods for devices in
there or you can just use some generic platform bus type. The later is
the approach we have taken with the Axon chip in the new blades. We
basically register everything under the IOIFs as of_platform_device and
use standard OF device-tree matching to attach drivers.

>  Thank you. kzalloc is safer and simpler.
>  This function is now called from setup_arch only. The codes assumes 
> some future cases. As struct ioif includes pointer to iommu_table, this 
> will be used like pci_dn. (with more member variables.. we think.)
>  The name will be struct ioif_dn? (and will include pointer to struct 
> device_node)

You don't need to use pci_dn anymore for DMA mappings with the code I've
merged in powerpc.git. There is a generic extension to struct device
providing dma mappings ops for any device.

That's how I handle DMA with of_platform_device on Axon for example.

Now, you can still use your own bus type if you want (it's actually
fairly simple to add a bus type to linux), if you feel like you need
additional specific informations per device than what of_platform_device
covers.

In that case, I would suggest laying it out on top of of_device, like
of_platform_device itself does, or like macio_device (you can see the
later in drivers/macintosh/macio_asic).

That way, you keep an open firmware based matching
(name/type/compatible).

Ben.





More information about the Linuxppc-dev mailing list