From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 9/16] Supporting of PCI bus for Celleb
Date: Sat, 18 Nov 2006 09:20:51 +1100 [thread overview]
Message-ID: <1163802051.5826.41.camel@localhost.localdomain> (raw)
In-Reply-To: <200611171040.kAHAeYGG017561@toshiba.co.jp>
> 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.
prev parent reply other threads:[~2006-11-17 22:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-15 9:45 [PATCH 9/16] Supporting of PCI bus for Celleb Ishizaki Kou
2006-11-15 18:43 ` Christoph Hellwig
2006-11-15 23:40 ` Benjamin Herrenschmidt
2006-11-17 10:40 ` Ishizaki Kou
2006-11-17 22:08 ` Arnd Bergmann
2006-11-17 22:20 ` Benjamin Herrenschmidt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1163802051.5826.41.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=kou.ishizaki@toshiba.co.jp \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).