Commit graph

9 commits

Author SHA1 Message Date
Grant Likely 2462bacd03 irq_domain/microblaze: Convert microblaze to use irq_domains
This patch converts Microblaze to use the irq_domain remapper and get
away from hard coding the offset between hwirq number and the linux irq
number space.  This also paves the way for multiple interrupt controllers.

v2: Don't enable SPARSE_IRQ and keep NR_IRQS set to 33

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: John Williams <john.williams@petalogix.com>
Cc: John Linn <john.linn@xilinx.com>
2012-02-16 06:11:24 -07:00
Grant Likely 644bd95431 irq_domain: convert microblaze from irq_host to irq_domain
Trivial change, microblaze doesn't use irq remapping yet.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Thomas Gleixner <tglx@linutronix.de>
2012-02-14 14:06:49 -07:00
Michal Simek 18e3b1075b microblaze: Remove NO_IRQ from architecture
NO_IRQ shouldn't be used by any driver. All Microblaze
drivers are fixed that's why NO_IRQ can be removed.

Also fix pci-common.c which has references to NO_IRQ removed.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-05 08:34:31 +01:00
Michal Simek 6c7a2676f5 microblaze: Change NO_IRQ to 0
As has been discussed many times[1], Using NO_IRQ set to anything other
than 0 is bug waiting to happen since many drivers follow the pattern
"if (!irq)" for testing whether or not an irq has been set.

This patch changes the Microblaze NO_IRQ setting from -1 to 0 to bring
it in line with most of the rest of the kernel.  It also prepares for
Microblaze eventually supporting multiple interrupt controllers by
breaking the assumption that hwirq# == Linux IRQ#.  The Linux IRQ
number is just a cookie with no guarantee of a direct relationship
with the hardware irq arrangement.

At this point, Microblaze interrupt handling only supports only one
instance of one kind of interrupt controller (xilinx_intc).  This change
shouldn't affect any architecture code outside of the interrupt
controller driver and the irq_of mapping.

Updated to 3.2 and to use irq_data.hwirq by Rob Herring.
Tested and fixed by Michal Simek.

[1] http://lkml.org/lkml/2005/11/21/221

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2012-01-05 08:29:13 +01:00
Michal Simek caa66ce905 microblaze: Fix circular headers dependency when ftrace is enabled.
Remove compilation failure when ftrace in enabled.

Error log:
  CC      kernel/trace/power-traces.o
In file included from arch/microblaze/include/asm/irq.h:15,
                 from include/linux/irq.h:27,
                 from include/asm-generic/hardirq.h:12,
                 from arch/microblaze/include/asm/hardirq.h:15,
                 from include/linux/hardirq.h:7,
                 from include/linux/ftrace_event.h:7,
                 from include/trace/ftrace.h:19,
                 from include/trace/define_trace.h:96,
                 from include/trace/events/power.h:240,
                 from kernel/trace/power-traces.c:14:
include/linux/interrupt.h: In function '__raise_softirq_irqoff':
include/linux/interrupt.h:413: error: implicit declaration of function 'trace_softirq_raise'
In file included from include/trace/ftrace.h:554,
                 from include/trace/define_trace.h:96,
                 from include/trace/events/power.h:240,
                 from kernel/trace/power-traces.c:14:
include/trace/events/irq.h: In function 'ftrace_test_probe_irq_handler_entry':
include/trace/events/irq.h:37: error: implicit declaration of function 'check_trace_callback_type_irq_handler_entry'
include/trace/events/irq.h: In function 'ftrace_test_probe_irq_handler_exit':
include/trace/events/irq.h:67: error: implicit declaration of function 'check_trace_callback_type_irq_handler_exit'
include/trace/events/irq.h: In function 'ftrace_test_probe_softirq_entry':
include/trace/events/irq.h:112: error: implicit declaration of function 'check_trace_callback_type_softirq_entry'
include/trace/events/irq.h: In function 'ftrace_test_probe_softirq_exit':
include/trace/events/irq.h:126: error: implicit declaration of function 'check_trace_callback_type_softirq_exit'
include/trace/events/irq.h: In function 'ftrace_test_probe_softirq_raise':
include/trace/events/irq.h:140: error: implicit declaration of function 'check_trace_callback_type_softirq_raise'
make[5]: *** [kernel/trace/power-traces.o] Error 1
make[4]: *** [kernel/trace] Error 2
make[3]: *** [kernel] Error 2

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-03-10 10:39:51 +01:00
Grant Likely e387344499 of/irq: Move irq_of_parse_and_map() to common code
Merge common code between PowerPC and Microblaze.  SPARC implements
irq_of_parse_and_map(), but the implementation is different, so it
does not use this code.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
2010-06-28 12:41:33 -07:00
Michal Simek c6ba01a4c7 microblaze: Add irq_create_{of_,}mapping functions
Support function for PCI. We don't use any advance mapping mechanism
that's why implementation is simple.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:59:28 +01:00
Remis Lima Baima 0a58458341 microblaze: convert all simple headers to use asm-generic
All the simple microblaze header files were adapted to use their
asm-generic implementations. These files are more simple and were quite
straightforward to change.

fb.h, vga.h and parport.h previously did not exist, using
the generic version makes it possible to build more drivers
successfully in allyesonfig.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-07-06 10:26:55 +02:00
Michal Simek eedbdab99f microblaze_v8: Interrupt handling and timer support
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Reviewed-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
Acked-by: John Williams <john.williams@petalogix.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-03-27 14:25:49 +01:00