diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 728740ae2282..766f91048ee9 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -745,7 +745,14 @@ end: bool hif_needs_bmi(struct hif_opaque_softc *hif_ctx) { struct hif_softc *hif_sc = HIF_GET_SOFTC(hif_ctx); - return hif_sc->bus_type != QDF_BUS_TYPE_SNOC; + + if (hif_sc->bus_type == QDF_BUS_TYPE_SNOC) + return false; + + if (hif_sc->target_info.target_type == TARGET_TYPE_QCA8074) + return false; + + return true; } /** diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 8e44418a5137..bcb30f6894f1 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -1956,7 +1956,7 @@ int hif_pci_bus_configure(struct hif_softc *hif_sc) { int status = 0; struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(hif_sc); - + struct hif_opaque_softc *hif_osc = GET_HIF_OPAQUE_HDL(hif_sc); hif_ce_prepare_config(hif_sc); /* initialize sleep state adjust variables */ @@ -2011,15 +2011,16 @@ int hif_pci_bus_configure(struct hif_softc *hif_sc) if (status) goto disable_wlan; -#ifndef QCA_WIFI_QCA8074_VP - status = hif_set_hia(hif_sc); - if (status) - goto unconfig_ce; + /* QCA_WIFI_QCA8074_VP:Should not be executed on 8074 VP platform */ + if (hif_needs_bmi(hif_osc)) { + status = hif_set_hia(hif_sc); + if (status) + goto unconfig_ce; - HIF_INFO_MED("%s: hif_set_hia done", __func__); + HIF_INFO_MED("%s: hif_set_hia done", __func__); - hif_register_bmi_callbacks(hif_sc); -#endif + hif_register_bmi_callbacks(hif_sc); + } status = hif_configure_irq(hif_sc); if (status < 0) diff --git a/hif/src/snoc/if_ahb.c b/hif/src/snoc/if_ahb.c index fb380a3d6747..e97647e1dcf3 100644 --- a/hif/src/snoc/if_ahb.c +++ b/hif/src/snoc/if_ahb.c @@ -498,26 +498,28 @@ QDF_STATUS hif_ahb_enable_bus(struct hif_softc *ol_sc, hif_register_tbl_attach(ol_sc, hif_type); hif_target_register_tbl_attach(ol_sc, target_type); -#ifndef QCA_WIFI_QCA8074_VP - if (hif_ahb_enable_radio(sc, pdev, id) != 0) { - HIF_INFO("error in enabling soc\n"); - return -EIO; - } + /* QCA_WIFI_QCA8074_VP:Should not be executed on 8074 VP platform */ + if (tgt_info->target_type != TARGET_TYPE_QCA8074) { + if (hif_ahb_enable_radio(sc, pdev, id) != 0) { + HIF_INFO("error in enabling soc\n"); + return -EIO; + } - if (hif_target_sync_ahb(ol_sc) < 0) { - ret = -EIO; - goto err_target_sync; + if (hif_target_sync_ahb(ol_sc) < 0) { + ret = -EIO; + goto err_target_sync; + } } -#endif HIF_TRACE("%s: X - hif_type = 0x%x, target_type = 0x%x", __func__, hif_type, target_type); return QDF_STATUS_SUCCESS; -#ifndef QCA_WIFI_QCA8074_VP err_target_sync: - HIF_INFO("Error: Disabling target\n"); - hif_ahb_disable_bus(ol_sc); -#endif + /* QCA_WIFI_QCA8074_VP:Should not be executed on 8074 VP platform */ + if (tgt_info->target_type != TARGET_TYPE_QCA8074) { + HIF_INFO("Error: Disabling target\n"); + hif_ahb_disable_bus(ol_sc); + } err_cleanup1: return ret; }