From 575809e6e3bd881386dfde0855beb2aecdfbcfa6 Mon Sep 17 00:00:00 2001 From: Santosh Mardi Date: Wed, 14 Oct 2020 14:42:39 +0530 Subject: [PATCH] Firmware: arm_scmi: Add #ifdef guards for vendor extensions Surround vendor extensions with #ifdef directive to make them available only for QGKI builds. Change-Id: Ibea4847739e97e4ffd9ea97223c20f14aa53a967 Signed-off-by: Santosh Mardi --- drivers/firmware/Kconfig | 2 +- include/linux/scmi_protocol.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index 01d0e92bd07c..e92975bc8d31 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -30,7 +30,7 @@ config ARM_SCMI_PROTOCOL config QTI_SCMI_MEMLAT_PROTOCOL tristate "Qualcomm Technologies, Inc. SCMI MEMLAT vendor Protocol" depends on ARM || ARM64 || COMPILE_TEST - depends on ARM_SCMI_PROTOCOL && QCOM_RIMPS + depends on ARM_SCMI_PROTOCOL && QCOM_RIMPS && QGKI help System Control and Management Interface (SCMI) memlat vendor protocol this protocol provides interface to communicate with micro controller diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index eb1fc6cb703d..63c5a8edcd20 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -207,6 +207,7 @@ struct scmi_reset_ops { int (*deassert)(const struct scmi_handle *handle, u32 domain); }; +#ifdef CONFIG_QTI_SCMI_MEMLAT_PROTOCOL /** * struct scmi_memlat_vendor_ops - represents the various operations provided * by SCMI HW Memlat Protocol @@ -263,7 +264,7 @@ struct scmi_memlat_vendor_ops { int (*set_log_level)(const struct scmi_handle *handle, u32 val); int (*get_data)(const struct scmi_handle *handle, u8 *buf); }; - +#endif /** * struct scmi_handle - Handle returned to ARM SCMI clients for usage. @@ -294,7 +295,9 @@ struct scmi_handle { struct scmi_power_ops *power_ops; struct scmi_sensor_ops *sensor_ops; struct scmi_reset_ops *reset_ops; +#ifdef CONFIG_QTI_SCMI_MEMLAT_PROTOCOL struct scmi_memlat_vendor_ops *memlat_ops; +#endif /* for protocol internal use */ void *perf_priv; void *clk_priv; @@ -311,7 +314,9 @@ enum scmi_std_protocol { SCMI_PROTOCOL_CLOCK = 0x14, SCMI_PROTOCOL_SENSOR = 0x15, SCMI_PROTOCOL_RESET = 0x16, +#ifdef CONFIG_QTI_SCMI_MEMLAT_PROTOCOL SCMI_PROTOCOL_MEMLAT = 0x80, +#endif }; struct scmi_device {