Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 3 | * License. See the file COPYING in the main directory of this archive |
| 4 | * for more details. |
| 5 | * |
| 6 | * Changed by HuTao Apr18, 2003 |
| 7 | * |
| 8 | * Copyright was missing when I got the code so took from MIPS arch ...MaTed--- |
| 9 | * Copyright (C) 1994 by Waldorf GMBH, written by Ralf Baechle |
| 10 | * Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 by Ralf Baechle |
| 11 | * |
| 12 | * Adapted for BlackFin (ADI) by Ted Ma <mated@sympatico.ca> |
| 13 | * Copyright (c) 2002 Arcturus Networks Inc. (www.arcturusnetworks.com) |
| 14 | * Copyright (c) 2002 Lineo, Inc. <mattw@lineo.com> |
| 15 | */ |
| 16 | |
| 17 | #ifndef _BFIN_IRQ_H_ |
| 18 | #define _BFIN_IRQ_H_ |
| 19 | |
Mike Frysinger | 8f86001 | 2009-06-08 12:49:48 -0400 | [diff] [blame] | 20 | #include <linux/irqflags.h> |
| 21 | |
| 22 | /* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */ |
Bryan Wu | 639f657 | 2008-08-27 10:51:02 +0800 | [diff] [blame] | 23 | #include <mach/irq.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 24 | |
Mike Frysinger | 8f86001 | 2009-06-08 12:49:48 -0400 | [diff] [blame] | 25 | /* Xenomai IPIPE helpers */ |
| 26 | #define local_irq_restore_hw(x) local_irq_restore(x) |
| 27 | #define local_irq_save_hw(x) local_irq_save(x) |
| 28 | #define local_irq_enable_hw(x) local_irq_enable(x) |
| 29 | #define local_irq_disable_hw(x) local_irq_disable(x) |
| 30 | #define irqs_disabled_hw(x) irqs_disabled(x) |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 31 | |
| 32 | #if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE) |
| 33 | # define NOP_PAD_ANOMALY_05000244 "nop; nop;" |
| 34 | #else |
| 35 | # define NOP_PAD_ANOMALY_05000244 |
| 36 | #endif |
| 37 | |
| 38 | #define idle_with_irq_disabled() \ |
| 39 | __asm__ __volatile__( \ |
| 40 | NOP_PAD_ANOMALY_05000244 \ |
| 41 | ".align 8;" \ |
| 42 | "sti %0;" \ |
| 43 | "idle;" \ |
| 44 | : \ |
| 45 | : "d" (bfin_irq_flags) \ |
| 46 | ) |
| 47 | |
Mike Frysinger | d5ce528 | 2009-06-13 11:32:34 -0400 | [diff] [blame^] | 48 | #include <asm-generic/irq.h> |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 49 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 50 | #endif /* _BFIN_IRQ_H_ */ |