Setting up repository
[linux-libre-firmware.git] / ath9k_htc / sboot / magpie_1_1 / sboot / athos / src / xtos / int-initlevel.S
1 // int-initlevel.S  -  Routines used to pull-in interrupt dispatch code
2 //      in the tiny-rt LSP.
3 // $Id: //depot/rel/Cottonwood/Xtensa/OS/xtos/int-initlevel.S#3 $
4
5 // Copyright (c) 2006-2010 Tensilica Inc.
6 //
7 // Permission is hereby granted, free of charge, to any person obtaining
8 // a copy of this software and associated documentation files (the
9 // "Software"), to deal in the Software without restriction, including
10 // without limitation the rights to use, copy, modify, merge, publish,
11 // distribute, sublicense, and/or sell copies of the Software, and to
12 // permit persons to whom the Software is furnished to do so, subject to
13 // the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included
16 // in all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
26
27 // To assemble this template file, define a macro called _INTERRUPT_LEVEL
28 // to be the interrupt level of the vector.  We use the same template for both
29 // high-level and medium-level interrupts, but not debug level.
30
31
32 #include <xtensa/coreasm.h>
33 #include "xtos-internal.h"
34
35
36 #if XCHAL_HAVE_INTERRUPTS && (_INTERRUPT_LEVEL <= XCHAL_NUM_INTLEVELS) && (_INTERRUPT_LEVEL != XCHAL_DEBUGLEVEL)
37
38         //  Nothing to do at runtime.  This function only has effect
39         //  at link-time.
40         //
41         .text
42         .global LABEL(_xtos_dispatch_level,_interrupts)
43         .align 4
44 LABEL(_xtos_dispatch_level,_interrupts):
45         abi_entry
46         abi_return
47         .size   LABEL(_xtos_dispatch_level,_interrupts), . - LABEL(_xtos_dispatch_level,_interrupts)
48
49         //  This reference is what does the work of pulling-in the
50         //  relevant interrupt vector at the specified level.
51         //  This is only needed in the tiny-rt LSP.
52         //
53 # if _INTERRUPT_LEVEL == 1
54         .global _need_level1int_
55 # else
56         .global LABEL(_Level,Vector)
57 # endif
58
59 #endif /* XCHAL_HAVE_INTERRUPTS */