diff options
| author | Sivaram Nair <sivaramn@nvidia.com> | 2018-05-29 14:43:48 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-30 14:56:54 -0400 |
| commit | eaccecaa9300a328e59313df5bf6a48df2e99bf9 (patch) | |
| tree | 7fefce66a605d2207eef019d5554c3c159229fc2 | |
| parent | 8d6f4baf6eddf433c6ea127b099b0b08aa3de2e3 (diff) | |
bpmp: ABI headers update
da786ae [abi] Add MRQ to configure FMONs
Jira BPMP-2140
Change-Id: I0cd6ada3a123543bf5c4e57e95b424e773b39229
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1733964
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Navneet Kumar <navneetk@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
| -rw-r--r-- | include/soc/tegra/bpmp_abi.h | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/include/soc/tegra/bpmp_abi.h b/include/soc/tegra/bpmp_abi.h index 537d959f1..8b8a6227f 100644 --- a/include/soc/tegra/bpmp_abi.h +++ b/include/soc/tegra/bpmp_abi.h | |||
| @@ -156,6 +156,7 @@ struct mrq_response { | |||
| 156 | #define MRQ_UPHY 69 | 156 | #define MRQ_UPHY 69 |
| 157 | #define MRQ_CPU_AUTO_CC3 70 | 157 | #define MRQ_CPU_AUTO_CC3 70 |
| 158 | #define MRQ_QUERY_FW_TAG 71 | 158 | #define MRQ_QUERY_FW_TAG 71 |
| 159 | #define MRQ_FMON 72 | ||
| 159 | 160 | ||
| 160 | /** @} */ | 161 | /** @} */ |
| 161 | 162 | ||
| @@ -187,6 +188,7 @@ struct mrq_response { | |||
| 187 | * @defgroup Strap Straps | 188 | * @defgroup Strap Straps |
| 188 | * @defgroup UPHY UPHY | 189 | * @defgroup UPHY UPHY |
| 189 | * @defgroup CC3 Auto-CC3 | 190 | * @defgroup CC3 Auto-CC3 |
| 191 | * @defgroup FMON FMON | ||
| 190 | * @} | 192 | * @} |
| 191 | */ | 193 | */ |
| 192 | 194 | ||
| @@ -2188,6 +2190,137 @@ struct mrq_uphy_response { | |||
| 2188 | /** @} */ | 2190 | /** @} */ |
| 2189 | 2191 | ||
| 2190 | /** | 2192 | /** |
| 2193 | * @ingroup MRQ_Codes | ||
| 2194 | * @def MRQ_FMON | ||
| 2195 | * @brief Perform a frequency monitor configuration operations | ||
| 2196 | * | ||
| 2197 | * * Platforms: T194 | ||
| 2198 | * * Initiators: CCPLEX | ||
| 2199 | * * Targets: BPMP | ||
| 2200 | * * Request Payload: @ref mrq_fmon_request | ||
| 2201 | * * Response Payload: @ref mrq_fmon_response | ||
| 2202 | * | ||
| 2203 | * @addtogroup FMON | ||
| 2204 | * @{ | ||
| 2205 | */ | ||
| 2206 | enum { | ||
| 2207 | /** | ||
| 2208 | * @brief Clamp FMON configuration to specified rate. | ||
| 2209 | * | ||
| 2210 | * The monitored clock must be running for clamp to succeed. If | ||
| 2211 | * clamped, FMON configuration is preserved when clock rate | ||
| 2212 | * and/or state is changed. | ||
| 2213 | */ | ||
| 2214 | CMD_FMON_GEAR_CLAMP = 1, | ||
| 2215 | /** | ||
| 2216 | * @brief Release clamped FMON configuration. | ||
| 2217 | * | ||
| 2218 | * Allow FMON configuration to follow monitored clock rate | ||
| 2219 | * and/or state changes. | ||
| 2220 | */ | ||
| 2221 | CMD_FMON_GEAR_FREE = 2, | ||
| 2222 | /** | ||
| 2223 | * @brief Return rate FMON is clamped at, or 0 if FMON is not | ||
| 2224 | * clamped. | ||
| 2225 | * | ||
| 2226 | * Inherently racy, since clamp state can be changed | ||
| 2227 | * concurrently. Useful for testing. | ||
| 2228 | */ | ||
| 2229 | CMD_FMON_GEAR_GET = 3, | ||
| 2230 | CMD_FMON_NUM, | ||
| 2231 | }; | ||
| 2232 | |||
| 2233 | struct cmd_fmon_gear_clamp_request { | ||
| 2234 | int32_t unused; | ||
| 2235 | int64_t rate; | ||
| 2236 | } __ABI_PACKED; | ||
| 2237 | |||
| 2238 | /** @private */ | ||
| 2239 | struct cmd_fmon_gear_clamp_response { | ||
| 2240 | EMPTY | ||
| 2241 | } __ABI_PACKED; | ||
| 2242 | |||
| 2243 | /** @private */ | ||
| 2244 | struct cmd_fmon_gear_free_request { | ||
| 2245 | EMPTY | ||
| 2246 | } __ABI_PACKED; | ||
| 2247 | |||
| 2248 | /** @private */ | ||
| 2249 | struct cmd_fmon_gear_free_response { | ||
| 2250 | EMPTY | ||
| 2251 | } __ABI_PACKED; | ||
| 2252 | |||
| 2253 | /** @private */ | ||
| 2254 | struct cmd_fmon_gear_get_request { | ||
| 2255 | EMPTY | ||
| 2256 | } __ABI_PACKED; | ||
| 2257 | |||
| 2258 | struct cmd_fmon_gear_get_response { | ||
| 2259 | int64_t rate; | ||
| 2260 | } __ABI_PACKED; | ||
| 2261 | |||
| 2262 | /** | ||
| 2263 | * @ingroup FMON | ||
| 2264 | * @brief Request with #MRQ_FMON | ||
| 2265 | * | ||
| 2266 | * Used by the sender of an #MRQ_FMON message to configure clock | ||
| 2267 | * frequency monitors. The FMON request is split into several | ||
| 2268 | * sub-commands. Some sub-commands require no additional data. | ||
| 2269 | * Others have a sub-command specific payload | ||
| 2270 | * | ||
| 2271 | * |sub-command |payload | | ||
| 2272 | * |----------------------------|-----------------------| | ||
| 2273 | * |CMD_FMON_GEAR_CLAMP |fmon_gear_clamp | | ||
| 2274 | * |CMD_FMON_GEAR_FREE |- | | ||
| 2275 | * |CMD_FMON_GEAR_GET |- | | ||
| 2276 | * | ||
| 2277 | */ | ||
| 2278 | |||
| 2279 | struct mrq_fmon_request { | ||
| 2280 | /** @brief Sub-command and clock id concatenated to 32-bit word. | ||
| 2281 | * - bits[31..24] is the sub-cmd. | ||
| 2282 | * - bits[23..0] is monitored clock id used to select target | ||
| 2283 | * FMON | ||
| 2284 | */ | ||
| 2285 | uint32_t cmd_and_id; | ||
| 2286 | |||
| 2287 | union { | ||
| 2288 | struct cmd_fmon_gear_clamp_request fmon_gear_clamp; | ||
| 2289 | /** @private */ | ||
| 2290 | struct cmd_fmon_gear_free_request fmon_gear_free; | ||
| 2291 | /** @private */ | ||
| 2292 | struct cmd_fmon_gear_get_request fmon_gear_get; | ||
| 2293 | } __UNION_ANON; | ||
| 2294 | } __ABI_PACKED; | ||
| 2295 | |||
| 2296 | /** | ||
| 2297 | * @ingroup FMON | ||
| 2298 | * @brief Response to MRQ_FMON | ||
| 2299 | * | ||
| 2300 | * Each sub-command supported by @ref mrq_fmon_request may | ||
| 2301 | * return sub-command-specific data as indicated below. | ||
| 2302 | * | ||
| 2303 | * |sub-command |payload | | ||
| 2304 | * |----------------------------|------------------------| | ||
| 2305 | * |CMD_FMON_GEAR_CLAMP |- | | ||
| 2306 | * |CMD_FMON_GEAR_FREE |- | | ||
| 2307 | * |CMD_FMON_GEAR_GET |fmon_gear_get | | ||
| 2308 | * | ||
| 2309 | */ | ||
| 2310 | |||
| 2311 | struct mrq_fmon_response { | ||
| 2312 | union { | ||
| 2313 | /** @private */ | ||
| 2314 | struct cmd_fmon_gear_clamp_response fmon_gear_clamp; | ||
| 2315 | /** @private */ | ||
| 2316 | struct cmd_fmon_gear_free_response fmon_gear_free; | ||
| 2317 | struct cmd_fmon_gear_get_response fmon_gear_get; | ||
| 2318 | } __UNION_ANON; | ||
| 2319 | } __ABI_PACKED; | ||
| 2320 | |||
| 2321 | /** @} */ | ||
| 2322 | |||
| 2323 | /** | ||
| 2191 | * @addtogroup Error_Codes | 2324 | * @addtogroup Error_Codes |
| 2192 | * Negative values for mrq_response::err generally indicate some | 2325 | * Negative values for mrq_response::err generally indicate some |
| 2193 | * error. The ABI defines the following error codes. Negating these | 2326 | * error. The ABI defines the following error codes. Negating these |
