Skip to content

Commit 3b7ec11

Browse files
Nate Casetorvalds
authored andcommitted
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: Nate Case <ncase@xes-inc.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9089870 commit 3b7ec11

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,10 +2352,16 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
23522352

23532353
info->si_type = (enum si_type) match->data;
23542354
info->addr_source = "device-tree";
2355-
info->io_setup = mem_setup;
23562355
info->irq_setup = std_irq_setup;
23572356

2358-
info->io.addr_type = IPMI_MEM_ADDR_SPACE;
2357+
if (resource.flags & IORESOURCE_IO) {
2358+
info->io_setup = port_setup;
2359+
info->io.addr_type = IPMI_IO_ADDR_SPACE;
2360+
} else {
2361+
info->io_setup = mem_setup;
2362+
info->io.addr_type = IPMI_MEM_ADDR_SPACE;
2363+
}
2364+
23592365
info->io.addr_data = resource.start;
23602366

23612367
info->io.regsize = regsize ? *regsize : DEFAULT_REGSIZE;

0 commit comments

Comments
 (0)