Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112981
b: refs/heads/master
c: 4426621
h: refs/heads/master
i:
  112979: 4968701
v: v3
  • Loading branch information
David S. Miller committed Aug 25, 2008
1 parent 67f68b1 commit 483e0ae
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2481d76615d5e15340ccfb0243fe8779766dfc6e
refs/heads/master: 44266215e3c8209613cea014721015113b7cd2d9
8 changes: 8 additions & 0 deletions trunk/arch/sparc/include/asm/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ static inline void of_node_put(struct device_node *node)
{
}

/* These routines are here to provide compatibility with how powerpc
* handles IRQ mapping for OF device nodes. We precompute and permanently
* register them in the of_device objects, whereas powerpc computes them
* on request.
*/
extern int irq_of_parse_and_map(struct device_node *node, int index);
#define irq_dispose_mapping(irq) do { } while (0)

/*
* NB: This is here while we transition from using asm/prom.h
* to linux/of.h
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/sparc/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ struct of_device *of_find_device_by_node(struct device_node *dp)
}
EXPORT_SYMBOL(of_find_device_by_node);

int irq_of_parse_and_map(struct device_node *node, int index)
{
struct of_device *op = of_find_device_by_node(node);

if (!op || index >= op->num_irqs)
return 0xffffffff;

return op->irqs[index];
}
EXPORT_SYMBOL(irq_of_parse_and_map);

#ifdef CONFIG_PCI
struct bus_type ebus_bus_type;
EXPORT_SYMBOL(ebus_bus_type);
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/sparc64/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ struct of_device *of_find_device_by_node(struct device_node *dp)
}
EXPORT_SYMBOL(of_find_device_by_node);

int irq_of_parse_and_map(struct device_node *node, int index)
{
struct of_device *op = of_find_device_by_node(node);

if (!op || index >= op->num_irqs)
return 0xffffffff;

return op->irqs[index];
}
EXPORT_SYMBOL(irq_of_parse_and_map);

#ifdef CONFIG_PCI
struct bus_type ebus_bus_type;
EXPORT_SYMBOL(ebus_bus_type);
Expand Down

0 comments on commit 483e0ae

Please sign in to comment.