Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1 | /* -*- linux-c -*- |
Philippe Gerum | 9bd50df | 2009-03-04 16:52:38 +0800 | [diff] [blame] | 2 | * include/asm-blackfin/ipipe_base.h |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2007 Philippe Gerum. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, |
| 9 | * USA; either version 2 of the License, or (at your option) any later |
| 10 | * version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef __ASM_BLACKFIN_IPIPE_BASE_H |
| 23 | #define __ASM_BLACKFIN_IPIPE_BASE_H |
| 24 | |
| 25 | #ifdef CONFIG_IPIPE |
| 26 | |
Philippe Gerum | 5b5da4c | 2011-03-17 02:12:48 -0400 | [diff] [blame] | 27 | #include <asm/bitsperlong.h> |
| 28 | #include <mach/irq.h> |
| 29 | |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 30 | #define IPIPE_NR_XIRQS NR_IRQS |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 31 | |
Philippe Gerum | 9bd50df | 2009-03-04 16:52:38 +0800 | [diff] [blame] | 32 | /* Blackfin-specific, per-cpu pipeline status */ |
| 33 | #define IPIPE_SYNCDEFER_FLAG 15 |
| 34 | #define IPIPE_SYNCDEFER_MASK (1L << IPIPE_SYNCDEFER_MASK) |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 35 | |
| 36 | /* Blackfin traps -- i.e. exception vector numbers */ |
| 37 | #define IPIPE_NR_FAULTS 52 /* We leave a gap after VEC_ILL_RES. */ |
| 38 | /* Pseudo-vectors used for kernel events */ |
| 39 | #define IPIPE_FIRST_EVENT IPIPE_NR_FAULTS |
| 40 | #define IPIPE_EVENT_SYSCALL (IPIPE_FIRST_EVENT) |
| 41 | #define IPIPE_EVENT_SCHEDULE (IPIPE_FIRST_EVENT + 1) |
| 42 | #define IPIPE_EVENT_SIGWAKE (IPIPE_FIRST_EVENT + 2) |
| 43 | #define IPIPE_EVENT_SETSCHED (IPIPE_FIRST_EVENT + 3) |
| 44 | #define IPIPE_EVENT_INIT (IPIPE_FIRST_EVENT + 4) |
| 45 | #define IPIPE_EVENT_EXIT (IPIPE_FIRST_EVENT + 5) |
| 46 | #define IPIPE_EVENT_CLEANUP (IPIPE_FIRST_EVENT + 6) |
Philippe Gerum | 5b5da4c | 2011-03-17 02:12:48 -0400 | [diff] [blame] | 47 | #define IPIPE_EVENT_RETURN (IPIPE_FIRST_EVENT + 7) |
| 48 | #define IPIPE_LAST_EVENT IPIPE_EVENT_RETURN |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 49 | #define IPIPE_NR_EVENTS (IPIPE_LAST_EVENT + 1) |
| 50 | |
| 51 | #define IPIPE_TIMER_IRQ IRQ_CORETMR |
| 52 | |
Philippe Gerum | 5b5da4c | 2011-03-17 02:12:48 -0400 | [diff] [blame] | 53 | #define __IPIPE_FEATURE_SYSINFO_V2 1 |
| 54 | |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 55 | #ifndef __ASSEMBLY__ |
| 56 | |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 57 | extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */ |
| 58 | |
Philippe Gerum | d2685fb | 2009-10-27 22:05:31 +0100 | [diff] [blame] | 59 | void __ipipe_stall_root(void); |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 60 | |
Philippe Gerum | d2685fb | 2009-10-27 22:05:31 +0100 | [diff] [blame] | 61 | unsigned long __ipipe_test_and_stall_root(void); |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 62 | |
Philippe Gerum | d2685fb | 2009-10-27 22:05:31 +0100 | [diff] [blame] | 63 | unsigned long __ipipe_test_root(void); |
| 64 | |
| 65 | void __ipipe_lock_root(void); |
| 66 | |
| 67 | void __ipipe_unlock_root(void); |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 68 | |
| 69 | #endif /* !__ASSEMBLY__ */ |
| 70 | |
Philippe Gerum | 5b5da4c | 2011-03-17 02:12:48 -0400 | [diff] [blame] | 71 | #define __IPIPE_FEATURE_SYSINFO_V2 1 |
| 72 | |
Yi Li | 6a01f23 | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 73 | #endif /* CONFIG_IPIPE */ |
| 74 | |
| 75 | #endif /* !__ASM_BLACKFIN_IPIPE_BASE_H */ |