Sfoglia il codice sorgente

qcacld-3.0: Update soc info by structure member

Update pld soc info by structure member to decouple between pld soc info
with platform soc info.

Change-Id: I0e62d4784d7bccfb2f08d3678e1c78e6baaa9ca9
CRs-Fixed: 2268191
Frank Liu 6 anni fa
parent
commit
0e7ac56180
2 ha cambiato i file con 29 aggiunte e 3 eliminazioni
  1. 9 1
      core/pld/src/pld_pcie.c
  2. 20 2
      core/pld/src/pld_snoc.c

+ 9 - 1
core/pld/src/pld_pcie.c

@@ -698,7 +698,15 @@ int pld_pcie_get_soc_info(struct device *dev, struct pld_soc_info *info)
 	if (ret)
 		return ret;
 
-	memcpy(info, &cnss_info, sizeof(*info));
+	info->v_addr = cnss_info.va;
+	info->p_addr = cnss_info.pa;
+	info->chip_id = cnss_info.chip_id;
+	info->chip_family = cnss_info.chip_family;
+	info->board_id = cnss_info.board_id;
+	info->soc_id = cnss_info.soc_id;
+	info->fw_version = cnss_info.fw_version;
+	strlcpy(info->fw_build_timestamp, cnss_info.fw_build_timestamp,
+		sizeof(info->fw_build_timestamp));
 
 	return 0;
 }

+ 20 - 2
core/pld/src/pld_snoc.c

@@ -432,7 +432,16 @@ int pld_snoc_get_soc_info(struct device *dev, struct pld_soc_info *info)
 	if (0 != ret)
 		return ret;
 
-	memcpy(info, &icnss_info, sizeof(*info));
+	info->v_addr = icnss_info.v_addr;
+	info->p_addr = icnss_info.p_addr;
+	info->chip_id = icnss_info.chip_id;
+	info->chip_family = icnss_info.chip_family;
+	info->board_id = icnss_info.board_id;
+	info->soc_id = icnss_info.soc_id;
+	info->fw_version = icnss_info.fw_version;
+	strlcpy(info->fw_build_timestamp, icnss_info.fw_build_timestamp,
+		sizeof(info->fw_build_timestamp));
+
 	return 0;
 }
 #else
@@ -448,7 +457,16 @@ int pld_snoc_get_soc_info(struct device *dev, struct pld_soc_info *info)
 	if (0 != ret)
 		return ret;
 
-	memcpy(info, &icnss_info, sizeof(*info));
+	info->v_addr = icnss_info.v_addr;
+	info->p_addr = icnss_info.p_addr;
+	info->chip_id = icnss_info.chip_id;
+	info->chip_family = icnss_info.chip_family;
+	info->board_id = icnss_info.board_id;
+	info->soc_id = icnss_info.soc_id;
+	info->fw_version = icnss_info.fw_version;
+	strlcpy(info->fw_build_timestamp, icnss_info.fw_build_timestamp,
+		sizeof(info->fw_build_timestamp));
+
 	return 0;
 }
 #endif