public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IPMI: Support I/O resources in OF driver
@ 2008-05-09  1:22 Corey Minyard
  0 siblings, 0 replies; only message in thread
From: Corey Minyard @ 2008-05-09  1:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel, Nate Case, OpenIPMI Developers

From: Nate Case <ncase@xes-inc.com>

The current OF probing assumes that the resource is IORESOURCE_MEM.
This checks for the IORESOURCE_IO flag and behaves appropriately.
An I/O resource can exist with an ipmi device node on a legacy ISA bus.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
 drivers/char/ipmi/ipmi_si_intf.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Seems reasonable to me, though I have no way to test this. -corey

Index: linux-2.6.25/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
--- linux-2.6.25.orig/drivers/char/ipmi/ipmi_si_intf.c
+++ linux-2.6.25/drivers/char/ipmi/ipmi_si_intf.c
@@ -2353,10 +2353,16 @@ static int __devinit ipmi_of_probe(struc
 
 	info->si_type		= (enum si_type) match->data;
 	info->addr_source	= "device-tree";
-	info->io_setup		= mem_setup;
 	info->irq_setup		= std_irq_setup;
 
-	info->io.addr_type	= IPMI_MEM_ADDR_SPACE;
+	if (resource.flags & IORESOURCE_IO) {
+		info->io_setup		= port_setup;
+		info->io.addr_type	= IPMI_IO_ADDR_SPACE;
+	} else {
+		info->io_setup		= mem_setup;
+		info->io.addr_type	= IPMI_MEM_ADDR_SPACE;
+	}
+
 	info->io.addr_data	= resource.start;
 
 	info->io.regsize	= regsize ? *regsize : DEFAULT_REGSIZE;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-09  1:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-09  1:22 [PATCH] IPMI: Support I/O resources in OF driver Corey Minyard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox