1 2 /* 3 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 21 22 23 24 25 26 27 28 29 30 #ifndef _CE_SRC_DESC_H_ 31 #define _CE_SRC_DESC_H_ 32 #if !defined(__ASSEMBLER__) 33 #endif 34 35 #define NUM_OF_DWORDS_CE_SRC_DESC 4 36 37 38 struct ce_src_desc { 39 uint32_t src_buffer_low : 32; 40 uint32_t src_buffer_high : 8, 41 toeplitz_en : 1, 42 src_swap : 1, 43 dest_swap : 1, 44 gather : 1, 45 ce_res_0 : 4, 46 length : 16; 47 uint32_t fw_metadata : 16, 48 ce_res_1 : 16; 49 uint32_t ce_res_2 : 20, 50 ring_id : 8, 51 looping_count : 4; 52 }; 53 54 55 56 57 #define CE_SRC_DESC_SRC_BUFFER_LOW_OFFSET 0x00000000 58 #define CE_SRC_DESC_SRC_BUFFER_LOW_LSB 0 59 #define CE_SRC_DESC_SRC_BUFFER_LOW_MSB 31 60 #define CE_SRC_DESC_SRC_BUFFER_LOW_MASK 0xffffffff 61 62 63 64 65 #define CE_SRC_DESC_SRC_BUFFER_HIGH_OFFSET 0x00000004 66 #define CE_SRC_DESC_SRC_BUFFER_HIGH_LSB 0 67 #define CE_SRC_DESC_SRC_BUFFER_HIGH_MSB 7 68 #define CE_SRC_DESC_SRC_BUFFER_HIGH_MASK 0x000000ff 69 70 71 72 73 #define CE_SRC_DESC_TOEPLITZ_EN_OFFSET 0x00000004 74 #define CE_SRC_DESC_TOEPLITZ_EN_LSB 8 75 #define CE_SRC_DESC_TOEPLITZ_EN_MSB 8 76 #define CE_SRC_DESC_TOEPLITZ_EN_MASK 0x00000100 77 78 79 80 81 #define CE_SRC_DESC_SRC_SWAP_OFFSET 0x00000004 82 #define CE_SRC_DESC_SRC_SWAP_LSB 9 83 #define CE_SRC_DESC_SRC_SWAP_MSB 9 84 #define CE_SRC_DESC_SRC_SWAP_MASK 0x00000200 85 86 87 88 89 #define CE_SRC_DESC_DEST_SWAP_OFFSET 0x00000004 90 #define CE_SRC_DESC_DEST_SWAP_LSB 10 91 #define CE_SRC_DESC_DEST_SWAP_MSB 10 92 #define CE_SRC_DESC_DEST_SWAP_MASK 0x00000400 93 94 95 96 97 #define CE_SRC_DESC_GATHER_OFFSET 0x00000004 98 #define CE_SRC_DESC_GATHER_LSB 11 99 #define CE_SRC_DESC_GATHER_MSB 11 100 #define CE_SRC_DESC_GATHER_MASK 0x00000800 101 102 103 104 105 #define CE_SRC_DESC_CE_RES_0_OFFSET 0x00000004 106 #define CE_SRC_DESC_CE_RES_0_LSB 12 107 #define CE_SRC_DESC_CE_RES_0_MSB 15 108 #define CE_SRC_DESC_CE_RES_0_MASK 0x0000f000 109 110 111 112 113 #define CE_SRC_DESC_LENGTH_OFFSET 0x00000004 114 #define CE_SRC_DESC_LENGTH_LSB 16 115 #define CE_SRC_DESC_LENGTH_MSB 31 116 #define CE_SRC_DESC_LENGTH_MASK 0xffff0000 117 118 119 120 121 #define CE_SRC_DESC_FW_METADATA_OFFSET 0x00000008 122 #define CE_SRC_DESC_FW_METADATA_LSB 0 123 #define CE_SRC_DESC_FW_METADATA_MSB 15 124 #define CE_SRC_DESC_FW_METADATA_MASK 0x0000ffff 125 126 127 128 129 #define CE_SRC_DESC_CE_RES_1_OFFSET 0x00000008 130 #define CE_SRC_DESC_CE_RES_1_LSB 16 131 #define CE_SRC_DESC_CE_RES_1_MSB 31 132 #define CE_SRC_DESC_CE_RES_1_MASK 0xffff0000 133 134 135 136 137 #define CE_SRC_DESC_CE_RES_2_OFFSET 0x0000000c 138 #define CE_SRC_DESC_CE_RES_2_LSB 0 139 #define CE_SRC_DESC_CE_RES_2_MSB 19 140 #define CE_SRC_DESC_CE_RES_2_MASK 0x000fffff 141 142 143 144 145 #define CE_SRC_DESC_RING_ID_OFFSET 0x0000000c 146 #define CE_SRC_DESC_RING_ID_LSB 20 147 #define CE_SRC_DESC_RING_ID_MSB 27 148 #define CE_SRC_DESC_RING_ID_MASK 0x0ff00000 149 150 151 152 153 #define CE_SRC_DESC_LOOPING_COUNT_OFFSET 0x0000000c 154 #define CE_SRC_DESC_LOOPING_COUNT_LSB 28 155 #define CE_SRC_DESC_LOOPING_COUNT_MSB 31 156 #define CE_SRC_DESC_LOOPING_COUNT_MASK 0xf0000000 157 158 159 160 #endif 161