Jelajahi Sumber

cnss2: Set TME-Lite support flag for Peach

Peach supports TME-Lite to validate FW image. TME-Lite supported
FW image format is different from currently used FW images and it
requires different way of downloading in MHI layer. Set TME-Lite
supported flag in MHI controller for Peach to inform MHI about
FW image format.

Change-Id: I615570914c9cec297aa422ce683b4d1c6c75ea1c
CRs-Fixed: 3364546
Naman Padhiar 2 tahun lalu
induk
melakukan
5c7494ce4a
1 mengubah file dengan 17 tambahan dan 0 penghapusan
  1. 17 0
      cnss2/pci.c

+ 17 - 0
cnss2/pci.c

@@ -6119,6 +6119,21 @@ exit:
 	return ret;
 }
 
+static bool cnss_is_tme_supported(struct cnss_pci_data *pci_priv)
+{
+	if (!pci_priv) {
+		cnss_pr_dbg("pci_priv is NULL");
+		return false;
+	}
+
+	switch (pci_priv->device_id) {
+	case PEACH_DEVICE_ID:
+		return true;
+	default:
+		return false;
+	}
+}
+
 static int cnss_pci_register_mhi(struct cnss_pci_data *pci_priv)
 {
 	int ret = 0;
@@ -6197,6 +6212,8 @@ static int cnss_pci_register_mhi(struct cnss_pci_data *pci_priv)
 	     plat_priv->device_version.major_version == 1))
 		cnss_mhi_config = &cnss_mhi_config_no_satellite;
 
+	mhi_ctrl->tme_supported_image = cnss_is_tme_supported(pci_priv);
+
 	ret = mhi_register_controller(mhi_ctrl, cnss_mhi_config);
 	if (ret) {
 		cnss_pr_err("Failed to register to MHI bus, err = %d\n", ret);