@@ -410,3 +410,16 @@ int scm_is_call_available(u32 svc_id, u32 cmd_id)
return ret_val;
}
EXPORT_SYMBOL(scm_is_call_available);
+
+#define GET_FEAT_VERSION_CMD 3
+int scm_get_feat_version(u32 feat)
+{
+ if (scm_is_call_available(SCM_SVC_INFO, GET_FEAT_VERSION_CMD)) {
+ u32 version;
+ if (!scm_call(SCM_SVC_INFO, GET_FEAT_VERSION_CMD, &feat,
+ sizeof(feat), &version, sizeof(version)))
+ return version;
+ }
+ return 0;
+}
+EXPORT_SYMBOL(scm_get_feat_version);
@@ -26,5 +26,6 @@ extern s32 scm_call_atomic2(u32 svc, u32 cmd, u32 arg1, u32 arg2);
extern u32 scm_get_version(void);
extern int scm_is_call_available(u32 svc_id, u32 cmd_id);
+extern int scm_get_feat_version(u32 feat);
#endif
Some users of SCM need to detect features and also detect if those features have certain versions available. Add this API. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> --- arch/arm/mach-qcom/scm.c | 13 +++++++++++++ arch/arm/mach-qcom/scm.h | 1 + 2 files changed, 14 insertions(+)