diff options
| author | Max Filippov <jcmvbkbc@gmail.com> | 2016-03-14 00:54:16 -0400 |
|---|---|---|
| committer | Chris Zankel <chris@zankel.net> | 2016-03-17 17:17:04 -0400 |
| commit | 9da8320bb97768e35f2e64fa7642015271d672eb (patch) | |
| tree | 04d5a8f22b56702aae55e15ec190952220cc143a | |
| parent | 2c684d892bb2ee31cc48f4a8b91e86a0f15e82f9 (diff) | |
xtensa: add test_kc705_hifi variant
This variant has HiFi3 coprocessor and is used in sample audio-enabled
configuration.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
3 files changed, 1048 insertions, 0 deletions
diff --git a/arch/xtensa/variants/test_kc705_hifi/include/variant/core.h b/arch/xtensa/variants/test_kc705_hifi/include/variant/core.h new file mode 100644 index 000000000000..4a2222979f86 --- /dev/null +++ b/arch/xtensa/variants/test_kc705_hifi/include/variant/core.h | |||
| @@ -0,0 +1,531 @@ | |||
| 1 | /* | ||
| 2 | * xtensa/config/core-isa.h -- HAL definitions that are dependent on Xtensa | ||
| 3 | * processor CORE configuration | ||
| 4 | * | ||
| 5 | * See <xtensa/config/core.h>, which includes this file, for more details. | ||
| 6 | */ | ||
| 7 | |||
| 8 | /* Xtensa processor core configuration information. | ||
| 9 | |||
| 10 | Copyright (c) 1999-2014 Tensilica Inc. | ||
| 11 | |||
| 12 | Permission is hereby granted, free of charge, to any person obtaining | ||
| 13 | a copy of this software and associated documentation files (the | ||
| 14 | "Software"), to deal in the Software without restriction, including | ||
| 15 | without limitation the rights to use, copy, modify, merge, publish, | ||
| 16 | distribute, sublicense, and/or sell copies of the Software, and to | ||
| 17 | permit persons to whom the Software is furnished to do so, subject to | ||
| 18 | the following conditions: | ||
| 19 | |||
| 20 | The above copyright notice and this permission notice shall be included | ||
| 21 | in all copies or substantial portions of the Software. | ||
| 22 | |||
| 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
| 26 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
| 27 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
| 28 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| 29 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
| 30 | |||
| 31 | #ifndef _XTENSA_CORE_CONFIGURATION_H | ||
| 32 | #define _XTENSA_CORE_CONFIGURATION_H | ||
| 33 | |||
| 34 | |||
| 35 | /**************************************************************************** | ||
| 36 | Parameters Useful for Any Code, USER or PRIVILEGED | ||
| 37 | ****************************************************************************/ | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Note: Macros of the form XCHAL_HAVE_*** have a value of 1 if the option is | ||
| 41 | * configured, and a value of 0 otherwise. These macros are always defined. | ||
| 42 | */ | ||
| 43 | |||
| 44 | |||
| 45 | /*---------------------------------------------------------------------- | ||
| 46 | ISA | ||
| 47 | ----------------------------------------------------------------------*/ | ||
| 48 | |||
| 49 | #define XCHAL_HAVE_BE 0 /* big-endian byte ordering */ | ||
| 50 | #define XCHAL_HAVE_WINDOWED 1 /* windowed registers option */ | ||
| 51 | #define XCHAL_NUM_AREGS 32 /* num of physical addr regs */ | ||
| 52 | #define XCHAL_NUM_AREGS_LOG2 5 /* log2(XCHAL_NUM_AREGS) */ | ||
| 53 | #define XCHAL_MAX_INSTRUCTION_SIZE 8 /* max instr bytes (3..8) */ | ||
| 54 | #define XCHAL_HAVE_DEBUG 1 /* debug option */ | ||
| 55 | #define XCHAL_HAVE_DENSITY 1 /* 16-bit instructions */ | ||
| 56 | #define XCHAL_HAVE_LOOPS 1 /* zero-overhead loops */ | ||
| 57 | #define XCHAL_LOOP_BUFFER_SIZE 0 /* zero-ov. loop instr buffer size */ | ||
| 58 | #define XCHAL_HAVE_NSA 1 /* NSA/NSAU instructions */ | ||
| 59 | #define XCHAL_HAVE_MINMAX 1 /* MIN/MAX instructions */ | ||
| 60 | #define XCHAL_HAVE_SEXT 1 /* SEXT instruction */ | ||
| 61 | #define XCHAL_HAVE_CLAMPS 1 /* CLAMPS instruction */ | ||
| 62 | #define XCHAL_HAVE_MUL16 1 /* MUL16S/MUL16U instructions */ | ||
| 63 | #define XCHAL_HAVE_MUL32 1 /* MULL instruction */ | ||
| 64 | #define XCHAL_HAVE_MUL32_HIGH 1 /* MULUH/MULSH instructions */ | ||
| 65 | #define XCHAL_HAVE_DIV32 1 /* QUOS/QUOU/REMS/REMU instructions */ | ||
| 66 | #define XCHAL_HAVE_L32R 1 /* L32R instruction */ | ||
| 67 | #define XCHAL_HAVE_ABSOLUTE_LITERALS 0 /* non-PC-rel (extended) L32R */ | ||
| 68 | #define XCHAL_HAVE_CONST16 0 /* CONST16 instruction */ | ||
| 69 | #define XCHAL_HAVE_ADDX 1 /* ADDX#/SUBX# instructions */ | ||
| 70 | #define XCHAL_HAVE_WIDE_BRANCHES 0 /* B*.W18 or B*.W15 instr's */ | ||
| 71 | #define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* B[EQ/EQZ/NE/NEZ]T instr's */ | ||
| 72 | #define XCHAL_HAVE_CALL4AND12 1 /* (obsolete option) */ | ||
| 73 | #define XCHAL_HAVE_ABS 1 /* ABS instruction */ | ||
| 74 | /*#define XCHAL_HAVE_POPC 0*/ /* POPC instruction */ | ||
| 75 | /*#define XCHAL_HAVE_CRC 0*/ /* CRC instruction */ | ||
| 76 | #define XCHAL_HAVE_RELEASE_SYNC 1 /* L32AI/S32RI instructions */ | ||
| 77 | #define XCHAL_HAVE_S32C1I 1 /* S32C1I instruction */ | ||
| 78 | #define XCHAL_HAVE_SPECULATION 0 /* speculation */ | ||
| 79 | #define XCHAL_HAVE_FULL_RESET 1 /* all regs/state reset */ | ||
| 80 | #define XCHAL_NUM_CONTEXTS 1 /* */ | ||
| 81 | #define XCHAL_NUM_MISC_REGS 2 /* num of scratch regs (0..4) */ | ||
| 82 | #define XCHAL_HAVE_TAP_MASTER 0 /* JTAG TAP control instr's */ | ||
| 83 | #define XCHAL_HAVE_PRID 1 /* processor ID register */ | ||
| 84 | #define XCHAL_HAVE_EXTERN_REGS 1 /* WER/RER instructions */ | ||
| 85 | #define XCHAL_HAVE_MX 0 /* MX core (Tensilica internal) */ | ||
| 86 | #define XCHAL_HAVE_MP_INTERRUPTS 0 /* interrupt distributor port */ | ||
| 87 | #define XCHAL_HAVE_MP_RUNSTALL 0 /* core RunStall control port */ | ||
| 88 | #define XCHAL_HAVE_PSO 0 /* Power Shut-Off */ | ||
| 89 | #define XCHAL_HAVE_PSO_CDM 0 /* core/debug/mem pwr domains */ | ||
| 90 | #define XCHAL_HAVE_PSO_FULL_RETENTION 0 /* all regs preserved on PSO */ | ||
| 91 | #define XCHAL_HAVE_THREADPTR 1 /* THREADPTR register */ | ||
| 92 | #define XCHAL_HAVE_BOOLEANS 1 /* boolean registers */ | ||
| 93 | #define XCHAL_HAVE_CP 1 /* CPENABLE reg (coprocessor) */ | ||
| 94 | #define XCHAL_CP_MAXCFG 8 /* max allowed cp id plus one */ | ||
| 95 | #define XCHAL_HAVE_MAC16 1 /* MAC16 package */ | ||
| 96 | #define XCHAL_HAVE_VECTORFPU2005 0 /* vector floating-point pkg */ | ||
| 97 | #define XCHAL_HAVE_FP 0 /* single prec floating point */ | ||
| 98 | #define XCHAL_HAVE_FP_DIV 0 /* FP with DIV instructions */ | ||
| 99 | #define XCHAL_HAVE_FP_RECIP 0 /* FP with RECIP instructions */ | ||
| 100 | #define XCHAL_HAVE_FP_SQRT 0 /* FP with SQRT instructions */ | ||
| 101 | #define XCHAL_HAVE_FP_RSQRT 0 /* FP with RSQRT instructions */ | ||
| 102 | #define XCHAL_HAVE_DFP 0 /* double precision FP pkg */ | ||
| 103 | #define XCHAL_HAVE_DFP_DIV 0 /* DFP with DIV instructions */ | ||
| 104 | #define XCHAL_HAVE_DFP_RECIP 0 /* DFP with RECIP instructions*/ | ||
| 105 | #define XCHAL_HAVE_DFP_SQRT 0 /* DFP with SQRT instructions */ | ||
| 106 | #define XCHAL_HAVE_DFP_RSQRT 0 /* DFP with RSQRT instructions*/ | ||
| 107 | #define XCHAL_HAVE_DFP_accel 0 /* double precision FP acceleration pkg */ | ||
| 108 | #define XCHAL_HAVE_VECTRA1 0 /* Vectra I pkg */ | ||
| 109 | #define XCHAL_HAVE_VECTRALX 0 /* Vectra LX pkg */ | ||
| 110 | #define XCHAL_HAVE_HIFIPRO 0 /* HiFiPro Audio Engine pkg */ | ||
| 111 | #define XCHAL_HAVE_HIFI3 1 /* HiFi3 Audio Engine pkg */ | ||
| 112 | #define XCHAL_HAVE_HIFI2 0 /* HiFi2 Audio Engine pkg */ | ||
| 113 | #define XCHAL_HAVE_HIFI2EP 0 /* HiFi2EP */ | ||
| 114 | #define XCHAL_HAVE_HIFI_MINI 0 | ||
| 115 | #define XCHAL_HAVE_CONNXD2 0 /* ConnX D2 pkg */ | ||
| 116 | #define XCHAL_HAVE_BBE16 0 /* ConnX BBE16 pkg */ | ||
| 117 | #define XCHAL_HAVE_BBE16_RSQRT 0 /* BBE16 & vector recip sqrt */ | ||
| 118 | #define XCHAL_HAVE_BBE16_VECDIV 0 /* BBE16 & vector divide */ | ||
| 119 | #define XCHAL_HAVE_BBE16_DESPREAD 0 /* BBE16 & despread */ | ||
| 120 | #define XCHAL_HAVE_BBENEP 0 /* ConnX BBENEP pkgs */ | ||
| 121 | #define XCHAL_HAVE_BSP3 0 /* ConnX BSP3 pkg */ | ||
| 122 | #define XCHAL_HAVE_BSP3_TRANSPOSE 0 /* BSP3 & transpose32x32 */ | ||
| 123 | #define XCHAL_HAVE_SSP16 0 /* ConnX SSP16 pkg */ | ||
| 124 | #define XCHAL_HAVE_SSP16_VITERBI 0 /* SSP16 & viterbi */ | ||
| 125 | #define XCHAL_HAVE_TURBO16 0 /* ConnX Turbo16 pkg */ | ||
| 126 | #define XCHAL_HAVE_BBP16 0 /* ConnX BBP16 pkg */ | ||
| 127 | #define XCHAL_HAVE_FLIX3 0 /* basic 3-way FLIX option */ | ||
| 128 | |||
| 129 | |||
| 130 | /*---------------------------------------------------------------------- | ||
| 131 | MISC | ||
| 132 | ----------------------------------------------------------------------*/ | ||
| 133 | |||
| 134 | #define XCHAL_NUM_LOADSTORE_UNITS 1 /* load/store units */ | ||
| 135 | #define XCHAL_NUM_WRITEBUFFER_ENTRIES 8 /* size of write buffer */ | ||
| 136 | #define XCHAL_INST_FETCH_WIDTH 8 /* instr-fetch width in bytes */ | ||
| 137 | #define XCHAL_DATA_WIDTH 8 /* data width in bytes */ | ||
| 138 | #define XCHAL_DATA_PIPE_DELAY 1 /* d-side pipeline delay | ||
| 139 | (1 = 5-stage, 2 = 7-stage) */ | ||
| 140 | /* In T1050, applies to selected core load and store instructions (see ISA): */ | ||
| 141 | #define XCHAL_UNALIGNED_LOAD_EXCEPTION 1 /* unaligned loads cause exc. */ | ||
| 142 | #define XCHAL_UNALIGNED_STORE_EXCEPTION 1 /* unaligned stores cause exc.*/ | ||
| 143 | #define XCHAL_UNALIGNED_LOAD_HW 0 /* unaligned loads work in hw */ | ||
| 144 | #define XCHAL_UNALIGNED_STORE_HW 0 /* unaligned stores work in hw*/ | ||
| 145 | |||
| 146 | #define XCHAL_SW_VERSION 1000004 /* sw version of this header */ | ||
| 147 | |||
| 148 | #define XCHAL_CORE_ID "test_kc705_hifi" /* alphanum core name | ||
| 149 | (CoreID) set in the Xtensa | ||
| 150 | Processor Generator */ | ||
| 151 | |||
| 152 | #define XCHAL_BUILD_UNIQUE_ID 0x0004983D /* 22-bit sw build ID */ | ||
| 153 | |||
| 154 | /* | ||
| 155 | * These definitions describe the hardware targeted by this software. | ||
| 156 | */ | ||
| 157 | #define XCHAL_HW_CONFIGID0 0xC1B3FFFE /* ConfigID hi 32 bits*/ | ||
| 158 | #define XCHAL_HW_CONFIGID1 0x1904983D /* ConfigID lo 32 bits*/ | ||
| 159 | #define XCHAL_HW_VERSION_NAME "LX5.0.4" /* full version name */ | ||
| 160 | #define XCHAL_HW_VERSION_MAJOR 2500 /* major ver# of targeted hw */ | ||
| 161 | #define XCHAL_HW_VERSION_MINOR 4 /* minor ver# of targeted hw */ | ||
| 162 | #define XCHAL_HW_VERSION 250004 /* major*100+minor */ | ||
| 163 | #define XCHAL_HW_REL_LX5 1 | ||
| 164 | #define XCHAL_HW_REL_LX5_0 1 | ||
| 165 | #define XCHAL_HW_REL_LX5_0_4 1 | ||
| 166 | #define XCHAL_HW_CONFIGID_RELIABLE 1 | ||
| 167 | /* If software targets a *range* of hardware versions, these are the bounds: */ | ||
| 168 | #define XCHAL_HW_MIN_VERSION_MAJOR 2500 /* major v of earliest tgt hw */ | ||
| 169 | #define XCHAL_HW_MIN_VERSION_MINOR 4 /* minor v of earliest tgt hw */ | ||
| 170 | #define XCHAL_HW_MIN_VERSION 250004 /* earliest targeted hw */ | ||
| 171 | |||
