Skip to content

Commit

Permalink
ipmi: support I/O resources in OF driver
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Nate Case authored and torvalds committed May 15, 2008
1 parent 9089870 commit 3b7ec11
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

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;
Expand Down

0 comments on commit 3b7ec11

Please sign in to comment.