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

Commit 44266215 authored by David S. Miller's avatar David S. Miller
Browse files

sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().



This allows more OF layer code to be shared between powerpc and
sparc.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2481d766
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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
+11 −0
Original line number Diff line number Diff line
@@ -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);
+11 −0
Original line number Diff line number Diff line
@@ -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);