Michal Simek | eedbdab | 2009-03-27 14:25:49 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. |
| 3 | * |
| 4 | * This file is subject to the terms and conditions of the GNU General Public |
| 5 | * License. See the file "COPYING" in the main directory of this archive |
| 6 | * for more details. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _ASM_MICROBLAZE_IRQ_H |
| 10 | #define _ASM_MICROBLAZE_IRQ_H |
| 11 | |
| 12 | #define NR_IRQS 32 |
Remis Lima Baima | 0a58458 | 2009-06-18 19:55:33 +0200 | [diff] [blame] | 13 | #include <asm-generic/irq.h> |
Michal Simek | eedbdab | 2009-03-27 14:25:49 +0100 | [diff] [blame] | 14 | |
Michal Simek | c6ba01a | 2010-01-14 15:16:31 +0100 | [diff] [blame] | 15 | /* This type is the placeholder for a hardware interrupt number. It has to |
| 16 | * be big enough to enclose whatever representation is used by a given |
| 17 | * platform. |
| 18 | */ |
| 19 | typedef unsigned long irq_hw_number_t; |
| 20 | |
Michal Simek | eedbdab | 2009-03-27 14:25:49 +0100 | [diff] [blame] | 21 | extern unsigned int nr_irq; |
| 22 | |
| 23 | #define NO_IRQ (-1) |
| 24 | |
Michal Simek | eedbdab | 2009-03-27 14:25:49 +0100 | [diff] [blame] | 25 | struct pt_regs; |
| 26 | extern void do_IRQ(struct pt_regs *regs); |
| 27 | |
Michal Simek | eedbdab | 2009-03-27 14:25:49 +0100 | [diff] [blame] | 28 | /** FIXME - not implement |
| 29 | * irq_dispose_mapping - Unmap an interrupt |
| 30 | * @virq: linux virq number of the interrupt to unmap |
| 31 | */ |
| 32 | static inline void irq_dispose_mapping(unsigned int virq) |
| 33 | { |
| 34 | return; |
| 35 | } |
| 36 | |
Michal Simek | c6ba01a | 2010-01-14 15:16:31 +0100 | [diff] [blame] | 37 | struct irq_host; |
| 38 | |
| 39 | /** |
| 40 | * irq_create_mapping - Map a hardware interrupt into linux virq space |
| 41 | * @host: host owning this hardware interrupt or NULL for default host |
| 42 | * @hwirq: hardware irq number in that host space |
| 43 | * |
| 44 | * Only one mapping per hardware interrupt is permitted. Returns a linux |
| 45 | * virq number. |
| 46 | * If the sense/trigger is to be specified, set_irq_type() should be called |
| 47 | * on the number returned from that call. |
| 48 | */ |
| 49 | extern unsigned int irq_create_mapping(struct irq_host *host, |
| 50 | irq_hw_number_t hwirq); |
| 51 | |
Michal Simek | eedbdab | 2009-03-27 14:25:49 +0100 | [diff] [blame] | 52 | #endif /* _ASM_MICROBLAZE_IRQ_H */ |