|
@@ -598,3 +598,39 @@ int cnss_bus_update_time_sync_period(struct cnss_plat_data *plat_priv,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+#if IS_ENABLED(CONFIG_MHI_BUS_MISC)
|
|
|
+void cnss_bus_disable_mhi_satellite_cfg(struct cnss_plat_data *plat_priv)
|
|
|
+{
|
|
|
+ struct cnss_pci_data *pci_priv;
|
|
|
+
|
|
|
+ pci_priv = plat_priv->bus_priv;
|
|
|
+ if (!pci_priv) {
|
|
|
+ cnss_pr_err("mhi satellite could not be disabled since pci_priv is NULL\n");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (plat_priv->bus_type) {
|
|
|
+ case CNSS_BUS_PCI:
|
|
|
+ /* MHI satellite configuration is only for KIWI V2 and
|
|
|
+ * that too only in DRV mode.
|
|
|
+ */
|
|
|
+ if (plat_priv->device_id == KIWI_DEVICE_ID &&
|
|
|
+ plat_priv->device_version.major_version == FW_V2_NUMBER) {
|
|
|
+ cnss_pr_dbg("Remove MHI satellite configuration\n");
|
|
|
+ return cnss_mhi_controller_set_base(pci_priv, 0);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ cnss_pr_dbg("Unsupported bus type: %d, ignore disable mhi satellite cfg\n",
|
|
|
+ plat_priv->bus_type);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ return;
|
|
|
+}
|
|
|
+#else
|
|
|
+void cnss_bus_disable_mhi_satellite_cfg(struct cnss_plat_data *pci_priv)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif
|