diff options
| author | Skylar Chang <chiaweic@codeaurora.org> | 2017-09-12 11:48:06 -0700 |
|---|---|---|
| committer | Skylar Chang <chiaweic@codeaurora.org> | 2017-09-13 11:29:18 -0700 |
| commit | 54225e4364179354db9876a307aa07b298d88e3f (patch) | |
| tree | eeb3d1c6d41d3dbe50dadb7a1238d70a98a2336c /include/linux | |
| parent | e9ecb016e68997206e23a3c77debe613661ccd78 (diff) | |
msm: ipa: Add new API to check for ipa uC readiness
Adding new API for IPA clients to check for IPA
uC ready before bringing up IPA uC offload data path.
CRs-Fixed: 2030217
Change-Id: I0328658cba829cacc89b7c0b8edf7e52aa16e45c
Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ipa_uc_offload.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/include/linux/ipa_uc_offload.h b/include/linux/ipa_uc_offload.h index 0277e87a2570..85d0ce92e6f6 100644 --- a/include/linux/ipa_uc_offload.h +++ b/include/linux/ipa_uc_offload.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -163,6 +163,20 @@ struct ipa_perf_profile { u32 max_supported_bw_mbps; }; +/** + * struct ipa_uc_ready_params - uC ready CB parameters + * @is_uC_ready: uC loaded or not + * @priv : callback cookie + * @notify: callback + * @proto: uC offload protocol type + */ +struct ipa_uc_ready_params { + bool is_uC_ready; + void *priv; + ipa_uc_ready_cb notify; + enum ipa_uc_offload_proto proto; +}; + #if defined CONFIG_IPA || defined CONFIG_IPA3 /** @@ -223,6 +237,19 @@ int ipa_uc_offload_disconn_pipes(u32 clnt_hdl); */ int ipa_set_perf_profile(struct ipa_perf_profile *profile); + +/* + * To register uC ready callback if uC not ready + * and also check uC readiness + * if uC not ready only, register callback + */ +int ipa_uc_offload_reg_rdyCB(struct ipa_uc_ready_params *param); + +/* + * To de-register uC ready callback + */ +void ipa_uc_offload_dereg_rdyCB(enum ipa_uc_offload_proto proto); + #else /* (CONFIG_IPA || CONFIG_IPA3) */ static inline int ipa_uc_offload_reg_intf( @@ -254,6 +281,15 @@ static inline int ipa_set_perf_profile(struct ipa_perf_profile *profile) return -EPERM; } +static inline int ipa_uc_offload_reg_rdyCB(struct ipa_uc_ready_params *param) +{ + return -EPERM; +} + +static void ipa_uc_offload_dereg_rdyCB(enum ipa_uc_offload_proto proto) +{ +} + #endif /* CONFIG_IPA3 */ #endif /* _IPA_UC_OFFLOAD_H_ */ |
