Explorar el Código

msm: ipa3: Adding version check while accessing register

Added version check to access COAL_MASTER_CFG register, as this
is needed for 5.5 and above target.

Change-Id: Ic5a50bb8e5cf02609e8a01478d1e6419dc8e3c62
Signed-off-by: Raghavendar rao l <[email protected]>
Raghavendar rao l hace 2 años
padre
commit
77aecb8a97
Se han modificado 1 ficheros con 10 adiciones y 8 borrados
  1. 10 8
      drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

+ 10 - 8
drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

@@ -7533,15 +7533,17 @@ int ipa3_init_hw(void)
 	}
 
 	/* Configure COAL_MASTER_CFG */
-	memset(&master_cfg, 0, sizeof(master_cfg));
-	ipahal_read_reg_fields(IPA_COAL_MASTER_CFG, &master_cfg);
-	master_cfg.coal_ipv4_id_ignore = ipa3_ctx->coal_ipv4_id_ignore;
-	ipahal_write_reg_fields(IPA_COAL_MASTER_CFG, &master_cfg);
+	if(ipa3_ctx->ipa_hw_type >= IPA_HW_v5_5) {
+		memset(&master_cfg, 0, sizeof(master_cfg));
+		ipahal_read_reg_fields(IPA_COAL_MASTER_CFG, &master_cfg);
+		master_cfg.coal_ipv4_id_ignore = ipa3_ctx->coal_ipv4_id_ignore;
+		ipahal_write_reg_fields(IPA_COAL_MASTER_CFG, &master_cfg);
 
-	IPADBG(
-		": coal-ipv4-id-ignore = %s\n",
-		master_cfg.coal_ipv4_id_ignore ?
-		"True" : "False");
+		IPADBG(
+			": coal-ipv4-id-ignore = %s\n",
+			master_cfg.coal_ipv4_id_ignore ?
+			"True" : "False");
+	}
 
 	ipa_comp_cfg();