diff options
author | Nate Case <ncase@xes-inc.com> | 2008-05-14 19:05:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-14 22:11:14 -0400 |
commit | 3b7ec117bf6c98f5a845311c4ca5ca020a3d7689 (patch) | |
tree | 20509c705b20582f5c8eb82c1262b69681e44856 /drivers/char | |
parent | 90898709dfca860d9550c85f0924007f4c0467ea (diff) |
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>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 5a5455585c1d..192688344ed2 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2352,10 +2352,16 @@ static int __devinit ipmi_of_probe(struct of_device *dev, | |||
2352 | 2352 | ||
2353 | info->si_type = (enum si_type) match->data; | 2353 | info->si_type = (enum si_type) match->data; |
2354 | info->addr_source = "device-tree"; | 2354 | info->addr_source = "device-tree"; |
2355 | info->io_setup = mem_setup; | ||
2356 | info->irq_setup = std_irq_setup; | 2355 | info->irq_setup = std_irq_setup; |
2357 | 2356 | ||
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 | |||
2359 | info->io.addr_data = resource.start; | 2365 | info->io.addr_data = resource.start; |
2360 | 2366 | ||
2361 | info->io.regsize = regsize ? *regsize : DEFAULT_REGSIZE; | 2367 | info->io.regsize = regsize ? *regsize : DEFAULT_REGSIZE; |