1 /* 2 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022 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 * DOC: This file contains definitions of Data Path configuration. 22 */ 23 24 #ifndef _CFG_IPA_H_ 25 #define _CFG_IPA_H_ 26 27 #include "cfg_define.h" 28 29 /* DP INI Declerations */ 30 /* 31 * IPA Offload configuration - Each bit enables a feature 32 * bit0 - IPA Enable 33 * bit1 - IPA Pre filter enable 34 * bit2 - IPv6 enable 35 * bit3 - IPA Resource Manager (RM) enable 36 * bit4 - IPA Clock scaling enable 37 */ 38 39 /* 40 * <ini> 41 * gIPAConfig - IPA configuration 42 * @Min: 0 43 * @Max: 0xFFFFFFFF 44 * @Default: 0 45 * 46 * This ini specifies the IPA configuration 47 * 48 * Related: N/A 49 * 50 * Supported Feature: IPA 51 * 52 * Usage: Internal 53 * 54 * </ini> 55 */ 56 #define CFG_DP_IPA_OFFLOAD_CONFIG \ 57 CFG_INI_UINT("gIPAConfig", \ 58 0, \ 59 0xFFFFFFFF, \ 60 0, \ 61 CFG_VALUE_OR_DEFAULT, "IPA offload configuration") 62 63 /* 64 * <ini> 65 * gIPADescSize - IPA descriptor size 66 * @Min: 800 67 * @Max: 8000 68 * @Default: 800 69 * 70 * This ini specifies the IPA descriptor size 71 * 72 * Related: N/A 73 * 74 * Supported Feature: IPA 75 * 76 * Usage: Internal 77 * 78 * </ini> 79 */ 80 #define CFG_DP_IPA_DESC_SIZE \ 81 CFG_INI_UINT("gIPADescSize", \ 82 800, \ 83 8000, \ 84 800, \ 85 CFG_VALUE_OR_DEFAULT, "IPA DESC SIZE") 86 87 /* 88 * <ini> 89 * gIPAHighBandwidthMbps - IPA high bw threshold 90 * @Min: 200 91 * @Max: 1000 92 * @Default: 400 93 * 94 * This ini specifies the IPA high bw threshold 95 * 96 * Related: N/A 97 * 98 * Supported Feature: IPA 99 * 100 * Usage: Internal 101 * 102 * </ini> 103 */ 104 #define CFG_DP_IPA_HIGH_BANDWIDTH_MBPS \ 105 CFG_INI_UINT("gIPAHighBandwidthMbps", \ 106 200, \ 107 1000, \ 108 400, \ 109 CFG_VALUE_OR_DEFAULT, "IPA high bw threshold") 110 111 /* 112 * <ini> 113 * gIPAMediumBandwidthMbps - IPA medium bw threshold 114 * @Min: 100 115 * @Max: 400 116 * @Default: 200 117 * 118 * This ini specifies the IPA medium bw threshold 119 * 120 * Related: N/A 121 * 122 * Supported Feature: IPA 123 * 124 * Usage: Internal 125 * 126 * </ini> 127 */ 128 #define CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS \ 129 CFG_INI_UINT("gIPAMediumBandwidthMbps", \ 130 100, \ 131 400, \ 132 200, \ 133 CFG_VALUE_OR_DEFAULT, "IPA medium bw threshold") 134 135 /* 136 * <ini> 137 * gIPALowBandwidthMbps - IPA low bw threshold 138 * @Min: 0 139 * @Max: 100 140 * @Default: 100 141 * 142 * This ini specifies the IPA low bw threshold 143 * 144 * Related: N/A 145 * 146 * Supported Feature: IPA 147 * 148 * Usage: Internal 149 * 150 * </ini> 151 */ 152 #define CFG_DP_IPA_LOW_BANDWIDTH_MBPS \ 153 CFG_INI_UINT("gIPALowBandwidthMbps", \ 154 0, \ 155 100, \ 156 100, \ 157 CFG_VALUE_OR_DEFAULT, "IPA low bw threshold") 158 159 /* 160 * <ini> 161 * gIPAForceVotingEnable - IPA force voting enable 162 * @Default: false 163 * 164 * This ini specifies to enable IPA force voting 165 * 166 * Related: N/A 167 * 168 * Supported Feature: IPA 169 * 170 * Usage: Internal 171 * 172 * </ini> 173 */ 174 #define CFG_DP_IPA_ENABLE_FORCE_VOTING \ 175 CFG_INI_BOOL("gIPAForceVotingEnable", \ 176 false, "Ctrl to enable force voting") 177 178 /* 179 * <ini> 180 * IpaUcTxBufCount - IPA tx buffer count 181 * @Min: 0 182 * @Max: 2048 183 * @Default: 512 184 * 185 * This ini specifies the IPA tx buffer count 186 * 187 * Related: N/A 188 * 189 * Supported Feature: IPA 190 * 191 * Usage: Internal 192 * 193 * </ini> 194 */ 195 #define CFG_DP_IPA_UC_TX_BUF_COUNT \ 196 CFG_INI_UINT("IpaUcTxBufCount", \ 197 0, \ 198 2048, \ 199 512, \ 200 CFG_VALUE_OR_DEFAULT, "IPA tx buffer count") 201 202 /* 203 * <ini> 204 * gIPAWds - IPA WDS Enable 205 * @Default: false 206 * 207 * This ini specifies to enable WDS for IPA 208 * 209 * Related: N/A 210 * 211 * Supported Feature: IPA 212 * 213 * Usage: Internal 214 * 215 * </ini> 216 */ 217 #define CFG_DP_IPA_WDS_STATUS \ 218 CFG_INI_BOOL("gIPAWds", \ 219 false, "Ctrl to enable WDS for EasyMesh") 220 221 /* 222 * <ini> 223 * gIPAVlanEnable - IPA vlan support enable 224 * @Default: false 225 * 226 * This ini specifies to enable IPA vlan support 227 * 228 * Related: N/A 229 * 230 * Supported Feature: IPA 231 * 232 * Usage: Internal 233 * 234 * </ini> 235 */ 236 #define CFG_DP_IPA_ENABLE_VLAN_SUPPORT \ 237 CFG_INI_BOOL("gIPAVlanEnable", \ 238 false, "Ctrl to enable vlan support with IPA Offload") 239 240 #define CFG_IPA \ 241 CFG(CFG_DP_IPA_OFFLOAD_CONFIG) \ 242 CFG(CFG_DP_IPA_DESC_SIZE) \ 243 CFG(CFG_DP_IPA_HIGH_BANDWIDTH_MBPS) \ 244 CFG(CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS) \ 245 CFG(CFG_DP_IPA_LOW_BANDWIDTH_MBPS) \ 246 CFG(CFG_DP_IPA_ENABLE_FORCE_VOTING) \ 247 CFG(CFG_DP_IPA_UC_TX_BUF_COUNT) \ 248 CFG(CFG_DP_IPA_WDS_STATUS) \ 249 CFG(CFG_DP_IPA_ENABLE_VLAN_SUPPORT) 250 #endif /* _CFG_IPA_H_ */ 251