carl9170: Update to latest upstream
[linux-libre-firmware.git] / ath9k_htc / target_firmware / magpie_fw_dev / target / inc / xtensa / config / tie.h
1 /*
2  * Copyright (c) 2013 Tensilica Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  */
23 /*
24  * tie.h -- compile-time HAL definitions dependent on CORE & TIE configuration
25  *
26  *  NOTE:  This header file is not meant to be included directly.
27  */
28
29 /*
30  * This header file describes this specific Xtensa processor's TIE extensions
31  * that extend basic Xtensa core functionality.  It is customized to this
32  * Xtensa processor configuration.
33  */
34
35 #ifndef _XTENSA_CORE_TIE_H
36 #define _XTENSA_CORE_TIE_H
37
38 #define XCHAL_CP_NUM                    0       /* number of coprocessors */
39 #define XCHAL_CP_MAX                    0       /* max CP ID + 1 (0 if none) */
40 #define XCHAL_CP_MASK                   0x00    /* bitmask of all CPs by ID */
41 #define XCHAL_CP_PORT_MASK              0x00    /* bitmask of only port CPs */
42
43 /*  Save area for non-coprocessor optional and custom (TIE) state:  */
44 #define XCHAL_NCP_SA_SIZE               4
45 #define XCHAL_NCP_SA_ALIGN              4
46
47 /*  Total save area for optional and custom state (NCP + CPn):  */
48 #define XCHAL_TOTAL_SA_SIZE             16      /* with 16-byte align padding */
49 #define XCHAL_TOTAL_SA_ALIGN            4       /* actual minimum alignment */
50
51 /*
52  * Detailed contents of save areas.
53  * NOTE:  caller must define the XCHAL_SA_{UREG,SREG,REGF} macros (they
54  * are not defined here) before expanding the XCHAL_SA_xxx_LIST macros.
55  *
56  * XCHAL_SA_SREG(dbnum,offset,size,contentsz,align,name,sregnum,bitmask,x,x)
57  * XCHAL_SA_UREG(dbnum,offset,size,contentsz,align,name,uregnum,bitmask,x,x)
58  * XCHAL_SA_REGF(dbnum,offset,size,contentsz,align,name,index,span,x,x,
59  *               basename,regf_name,regf_numentries)
60  */
61
62 #define XCHAL_SA_NCP_NUM        1
63 #define XCHAL_SA_NCP_LIST       \
64   XCHAL_SA_SREG(0x020C,   0, 4, 4, 4,      scompare1, 12,0xFFFFFFFF,0,0)
65
66 /* Byte length of instruction from its first nibble (op0 field), per FLIX.  */
67 #define XCHAL_OP0_FORMAT_LENGTHS        3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3
68
69 #endif /*_XTENSA_CORE_TIE_H*/