Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b7ec117 authored by Nate Case's avatar Nate Case Committed by Linus Torvalds
Browse files

ipmi: support I/O resources in OF driver



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: default avatarNate Case <ncase@xes-inc.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 90898709
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2352,10 +2352,16 @@ static int __devinit ipmi_of_probe(struct of_device *dev,

	info->si_type		= (enum si_type) match->data;
	info->addr_source	= "device-tree";
	info->io_setup		= mem_setup;
	info->irq_setup		= std_irq_setup;

	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;