aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/irq.h
blob: 2fd04f10cc266b86d6a88c786278c18fd2a604fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright 2004-2009 Analog Devices Inc.
 *                2003 HuTao
 *                2002 Arcturus Networks Inc. (www.arcturusnetworks.com
 *                       Ted Ma <mated@sympatico.ca>
 *
 * Licensed under the GPL-2
 */

#ifndef _BFIN_IRQ_H_
#define _BFIN_IRQ_H_

#include <linux/irqflags.h>

/* IRQs that may be used by external irq_chip controllers */
#define NR_SPARE_IRQS	32

#include <mach/anomaly.h>

/* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */
#include <mach/irq.h>

/*
 * pm save bfin pint registers
 */
struct adi_pm_pint_save {
	u32 assign;
	u32 edge_set;
	u32 invert_set;
};

#if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE)
# define NOP_PAD_ANOMALY_05000244 "nop; nop;"
#else
# define NOP_PAD_ANOMALY_05000244
#endif

#define idle_with_irq_disabled() \
	__asm__ __volatile__( \
		NOP_PAD_ANOMALY_05000244 \
		".align 8;" \
		"sti %0;" \
		"idle;" \
		: \
		: "d" (bfin_irq_flags) \
	)

#include <asm-generic/irq.h>

#endif				/* _BFIN_IRQ_H_ */