blob: b116a825de7714606eac624182dcacd93d05e64b [file] [log] [blame]
Michal Simekeedbdab2009-03-27 14:25:49 +01001/*
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
Michal Simek6c7a2672011-12-09 10:45:20 +010012
13/*
14 * Linux IRQ# is currently offset by one to map to the hardware
15 * irq number. So hardware IRQ0 maps to Linux irq 1.
16 */
17#define NO_IRQ_OFFSET 1
18#define IRQ_OFFSET NO_IRQ_OFFSET
19#define NR_IRQS (32 + IRQ_OFFSET)
Remis Lima Baima0a584582009-06-18 19:55:33 +020020#include <asm-generic/irq.h>
Michal Simekeedbdab2009-03-27 14:25:49 +010021
Michal Simekc6ba01a2010-01-14 15:16:31 +010022/* This type is the placeholder for a hardware interrupt number. It has to
23 * be big enough to enclose whatever representation is used by a given
24 * platform.
25 */
26typedef unsigned long irq_hw_number_t;
27
Michal Simekeedbdab2009-03-27 14:25:49 +010028extern unsigned int nr_irq;
29
Michal Simek6c7a2672011-12-09 10:45:20 +010030#define NO_IRQ 0
Michal Simekeedbdab2009-03-27 14:25:49 +010031
Michal Simekeedbdab2009-03-27 14:25:49 +010032struct pt_regs;
33extern void do_IRQ(struct pt_regs *regs);
34
Michal Simekeedbdab2009-03-27 14:25:49 +010035/** FIXME - not implement
36 * irq_dispose_mapping - Unmap an interrupt
37 * @virq: linux virq number of the interrupt to unmap
38 */
39static inline void irq_dispose_mapping(unsigned int virq)
40{
41 return;
42}
43
Michal Simekc6ba01a2010-01-14 15:16:31 +010044struct irq_host;
45
46/**
47 * irq_create_mapping - Map a hardware interrupt into linux virq space
48 * @host: host owning this hardware interrupt or NULL for default host
49 * @hwirq: hardware irq number in that host space
50 *
51 * Only one mapping per hardware interrupt is permitted. Returns a linux
52 * virq number.
53 * If the sense/trigger is to be specified, set_irq_type() should be called
54 * on the number returned from that call.
55 */
56extern unsigned int irq_create_mapping(struct irq_host *host,
57 irq_hw_number_t hwirq);
58
Michal Simekeedbdab2009-03-27 14:25:49 +010059#endif /* _ASM_MICROBLAZE_IRQ_H */