All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Add some irq definitins required by OF
@ 2010-10-14 21:02 David Daney
  2010-10-15  1:27 ` Grant Likely
  0 siblings, 1 reply; 6+ messages in thread
From: David Daney @ 2010-10-14 21:02 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: David Daney, Grant Likely

Using the forthcoming open firmware (OF) on mips patches, requires
that several interrupt related definitions be added.

In the future we may want to allow some sort of override for
irq_create_mapping, but for now it is just supplies an identity
mapping.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
 arch/mips/include/asm/irq.h |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h
index dea4aed..f109e67 100644
--- a/arch/mips/include/asm/irq.h
+++ b/arch/mips/include/asm/irq.h
@@ -16,6 +16,39 @@
 
 #include <irq.h>
 
+#define NO_IRQ UINT_MAX
+
+/*
+ * This type is the placeholder for a hardware interrupt number. It
+ * has to be big enough to enclose whatever representation is used by
+ * a given platform.
+ */
+typedef unsigned long irq_hw_number_t;
+
+static inline void irq_dispose_mapping(unsigned int virq)
+{
+	return;
+}
+
+struct irq_host;
+
+/**
+ * irq_create_mapping - Map a hardware interrupt into linux virq space
+ * @host: host owning this hardware interrupt or NULL for default host
+ * @hwirq: hardware irq number in that host space
+ *
+ * Only one mapping per hardware interrupt is permitted. Returns a linux
+ * virq number.
+ * If the sense/trigger is to be specified, set_irq_type() should be called
+ * on the number returned from that call.
+ */
+static inline unsigned int irq_create_mapping(struct irq_host *host,
+					      irq_hw_number_t hwirq)
+{
+	/* For now, an identity mapping. */
+	return (unsigned int)hwirq;
+}
+
 #ifdef CONFIG_I8259
 static inline int irq_canonicalize(int irq)
 {
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-27  8:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 21:02 [PATCH] MIPS: Add some irq definitins required by OF David Daney
2010-10-15  1:27 ` Grant Likely
2010-10-15 19:50   ` David Daney
2010-10-15 19:55     ` Grant Likely
2010-10-26 22:18   ` David Daney
2010-10-27  8:10     ` Grant Likely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.