qcacld-3.0: Add API to get SOC information in PLD for PCIe
Add API to call platform driver function in order to get SOC related
information for in PLD for PCIe.
Change-Id: Ieec098575b874e6d15ae45ef6000767ade7d459f
CRs-fixed: 1082183
diff --git a/core/pld/src/pld_pcie.c b/core/pld/src/pld_pcie.c
index 66dada9..dcc9b5c 100644
--- a/core/pld/src/pld_pcie.c
+++ b/core/pld/src/pld_pcie.c
@@ -495,6 +495,32 @@
}
/**
+ * pld_pcie_get_soc_info() - Get SOC information
+ * @info: buffer to SOC information
+ *
+ * Return SOC info to the buffer.
+ *
+ * Return: 0 for success
+ * Non zero failure code for errors
+ */
+int pld_pcie_get_soc_info(struct device *dev, struct pld_soc_info *info)
+{
+ int ret = 0;
+ struct cnss_soc_info cnss_info;
+
+ if (info == NULL)
+ return -ENODEV;
+
+ ret = cnss_get_soc_info(dev, &cnss_info);
+ if (ret)
+ return ret;
+
+ memcpy(info, &cnss_info, sizeof(*info));
+
+ return 0;
+}
+
+/**
* pld_pcie_set_driver_status() - Set driver status
* @status: driver status
*