* [DRIVER MODEL] Allow overlapping resources for platform devices
@ 2005-11-28 16:15 Kumar Gala
2005-11-28 18:05 ` Russell King
0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2005-11-28 16:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: Russell King, Greg KH, linux-kernel
There are cases in which a device's memory mapped registers overlap
with another device's memory mapped registers. On several PowerPC
devices this occurs for the MDIO bus, whose registers tended to overlap
with one of the ethernet controllers.
By switching from request_resource to insert_resource we can register
the MDIO bus as a proper platform device and not hack around how we
handle its memory mapped registers.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit 32fa7cc4cb3ef6aed2d4ef06befa6686f6b7568a
tree 6f932a12c9663a9fc4705f31039c52159f14c59e
parent a20eafe40e6ae9d3db96918c9512c577b9a5814c
author Kumar Gala <galak@kernel.crashing.org> Mon, 28 Nov 2005 10:14:09 -0600
committer Kumar Gala <galak@kernel.crashing.org> Mon, 28 Nov 2005 10:14:09 -0600
drivers/base/platform.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 8827daf..1091af1 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -257,7 +257,7 @@ int platform_device_add(struct platform_
p = &ioport_resource;
}
- if (p && request_resource(p, r)) {
+ if (p && insert_resource(p, r)) {
printk(KERN_ERR
"%s: failed to claim resource %d\n",
pdev->dev.bus_id, i);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DRIVER MODEL] Allow overlapping resources for platform devices
2005-11-28 16:15 [DRIVER MODEL] Allow overlapping resources for platform devices Kumar Gala
@ 2005-11-28 18:05 ` Russell King
2005-11-28 18:40 ` Kumar Gala
0 siblings, 1 reply; 4+ messages in thread
From: Russell King @ 2005-11-28 18:05 UTC (permalink / raw)
To: Kumar Gala; +Cc: Andrew Morton, Greg KH, linux-kernel
On Mon, Nov 28, 2005 at 10:15:39AM -0600, Kumar Gala wrote:
> There are cases in which a device's memory mapped registers overlap
> with another device's memory mapped registers. On several PowerPC
> devices this occurs for the MDIO bus, whose registers tended to overlap
> with one of the ethernet controllers.
Hrm, shouldn't the MDIO device be registered by the ethernet driver then?
The MDIO device is a child of the ethernet device - and this also brings
up the question about PM ordering - should the MDIO device be suspended
before or after the ethernet device.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DRIVER MODEL] Allow overlapping resources for platform devices
2005-11-28 18:05 ` Russell King
@ 2005-11-28 18:40 ` Kumar Gala
2005-11-28 21:05 ` Russell King
0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2005-11-28 18:40 UTC (permalink / raw)
To: Russell King; +Cc: Andrew Morton, Greg KH, linux-kernel, afleming
On Mon, 28 Nov 2005, Russell King wrote:
> On Mon, Nov 28, 2005 at 10:15:39AM -0600, Kumar Gala wrote:
> > There are cases in which a device's memory mapped registers overlap
> > with another device's memory mapped registers. On several PowerPC
> > devices this occurs for the MDIO bus, whose registers tended to overlap
> > with one of the ethernet controllers.
>
> Hrm, shouldn't the MDIO device be registered by the ethernet driver then?
> The MDIO device is a child of the ethernet device - and this also brings
> up the question about PM ordering - should the MDIO device be suspended
> before or after the ethernet device.
Well the MDIO device actually is conceptually separate from the ethernet
controller that shares register space with it. For example, we may have a
processor with 4 ethernet controllers on it. We use the register set in
controller 1 to get to the MDIO "device" for all four controllers.
Hopefully, Andy can provide further details about order issues and how the
current PHY layer interacts with the ethernet controller.
However, the issue still exists that the MDIO devices registers live
inside another devices register space.
- kumar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DRIVER MODEL] Allow overlapping resources for platform devices
2005-11-28 18:40 ` Kumar Gala
@ 2005-11-28 21:05 ` Russell King
0 siblings, 0 replies; 4+ messages in thread
From: Russell King @ 2005-11-28 21:05 UTC (permalink / raw)
To: Kumar Gala; +Cc: Andrew Morton, Greg KH, linux-kernel, afleming
On Mon, Nov 28, 2005 at 12:40:25PM -0600, Kumar Gala wrote:
> Well the MDIO device actually is conceptually separate from the ethernet
> controller that shares register space with it. For example, we may have a
> processor with 4 ethernet controllers on it. We use the register set in
> controller 1 to get to the MDIO "device" for all four controllers.
>
> Hopefully, Andy can provide further details about order issues and how the
> current PHY layer interacts with the ethernet controller.
>
> However, the issue still exists that the MDIO devices registers live
> inside another devices register space.
Thanks for clearing that up - I see why you need this now.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-11-28 21:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-28 16:15 [DRIVER MODEL] Allow overlapping resources for platform devices Kumar Gala
2005-11-28 18:05 ` Russell King
2005-11-28 18:40 ` Kumar Gala
2005-11-28 21:05 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome