mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacmn: Implement run-time check for 8074 target for emulation
Target 8074 changes for emulation platform (VP/M2M/SOC) are under compilation switch which does not allow single meta to run for legacy platforms and Hawkeye emulation platform. Change compile time switch to run time check for target. Keep all emulation related changes under QCA8074_VP switch which needs to be always enabled. It helps to identify emulation specific changes. All emulation changes are enabled for target type 8074. CRs-Fixed: 1082545 Change-Id: Id0bab52735154db086b56ecd751578dba75a311a
This commit is contained in:
parent
c1a9fe647a
commit
815c6d8a62
3 changed files with 32 additions and 22 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue