blob: ec5583d6111cc4a6f98d6c9c1e8e07d669db9aba [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
12#define NR_IRQS 32
Remis Lima Baima0a584582009-06-18 19:55:33 +020013#include <asm-generic/irq.h>
Michal Simekeedbdab2009-03-27 14:25:49 +010014
15#include <linux/interrupt.h>
16
Michal Simekc6ba01a2010-01-14 15:16:31 +010017/* This type is the placeholder for a hardware interrupt number. It has to
18 * be big enough to enclose whatever representation is used by a given
19 * platform.
20 */
21typedef unsigned long irq_hw_number_t;
22
Michal Simekeedbdab2009-03-27 14:25:49 +010023extern unsigned int nr_irq;
24
25#define NO_IRQ (-1)
26
Michal Simekeedbdab2009-03-27 14:25:49 +010027struct pt_regs;
28extern void do_IRQ(struct pt_regs *regs);
29
Michal Simekeedbdab2009-03-27 14:25:49 +010030/** FIXME - not implement
31 * irq_dispose_mapping - Unmap an interrupt
32 * @virq: linux virq number of the interrupt to unmap
33 */
34static inline void irq_dispose_mapping(unsigned int virq)
35{
36 return;
37}
38
Michal Simekc6ba01a2010-01-14 15:16:31 +010039struct irq_host;
40
41/**
42 * irq_create_mapping - Map a hardware interrupt into linux virq space
43 * @host: host owning this hardware interrupt or NULL for default host
44 * @hwirq: hardware irq number in that host space
45 *
46 * Only one mapping per hardware interrupt is permitted. Returns a linux
47 * virq number.
48 * If the sense/trigger is to be specified, set_irq_type() should be called
49 * on the number returned from that call.
50 */
51extern unsigned int irq_create_mapping(struct irq_host *host,
52 irq_hw_number_t hwirq);
53
Michal Simekeedbdab2009-03-27 14:25:49 +010054#endif /* _ASM_MICROBLAZE_IRQ_H */