From: Kumar Gala <galak@kernel.crashing.org>
To: Greg KH <greg@kroah.com>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: what's a platform device?
Date: Thu, 23 Feb 2006 01:04:22 -0600 [thread overview]
Message-ID: <8B3A62DF-6991-4C46-A294-6DF314D24AF4@kernel.crashing.org> (raw)
In-Reply-To: <20060223051312.GA14534@kroah.com>
>> Yes, the FPGA is a pci device.
>>
>> Not sure I follow exactly what you mean by the fact that platform
>> devices dont know about mmio regions. They know about struct
>> resource and iomem_resource & ioport_resource.
>
> Yes, as they have no "bus" to attach too. That's why they are there,
> they are for devices with no bus, but are merely "raw" memory mapped
> devices.
I'm not sure I follow this. How is PCI different? How would "kumar"
bus be different?
>> I think I might be missing something fundamental here. In
>> implementing my own bus_type, I'll end up introducing my own struct
>> foobar_device which looked pretty much like struct platform_device.
>> Then I'll need a set of functions to assign resources, etc.
>>
>> I got no issue implementing my own bus_type, but I clearly feel like
>> I'm missing something here (just not sure what it is :)
>
> I guess I look at your FPGA as a PCI "bridge" chip, that bridges
> between
> the PCI bus, and your "kumar" bus (for lack of a better name). Your
> devices hang off of that bus, which is attached to the FPGA, which is
> attached to the pci bridge, and so on. If you use the platform
> bus, you
> break that link.
>
> Does that make sense?
This makes sense, but you seem to be talking about hierarchy more the
functionality. I agree in your description of hierarchy.
I was looking at it from a functional point of view, maybe more from
the device view then from the bus. I need a struct device type that
contains resources, a name, an id. I'll do matching based on name.
From a functional point of view platform does all this.
Based on your description would you say that a platform_device's
parent device should always be platform_bus? [I'm getting at the fact
that we allow pdev->dev.parent to be set by the caller of
platform_device_add].
Hmm, as I think about this further, I think that its more coincidence
that the functionality for the "kumar" bus is equivalent to that of
the "platform" bus.
> Russell probably has other thoughts about this.
Hopefully he'll provide his thoughts :)
- kumar
next prev parent reply other threads:[~2006-02-23 7:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-22 21:47 Kumar Gala
2006-02-23 4:39 ` Greg KH
2006-02-23 4:55 ` Kumar Gala
2006-02-23 5:13 ` Greg KH
2006-02-23 7:04 ` Kumar Gala [this message]
2006-02-23 19:30 ` Kumar Gala
2006-02-24 1:42 ` Greg KH
2006-02-27 22:25 ` Kumar Gala
2006-03-02 15:39 ` Russell King
2006-02-23 9:33 ` Russell King
2006-02-23 16:13 ` Kumar Gala
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=8B3A62DF-6991-4C46-A294-6DF314D24AF4@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®