diff --git a/hif/inc/hif.h b/hif/inc/hif.h index 889c8ab639..39368e673b 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -760,6 +760,22 @@ enum ipa_hw_type hif_get_ipa_hw_type(void) { return ipa_get_hw_type(); } + +/** + * hif_get_ipa_present() - get IPA hw status + * + * This API return the IPA hw status. + * + * Return: true if IPA is present or false otherwise + */ +static inline +bool hif_get_ipa_present(void) +{ + if (ipa_uc_reg_rdyCB(NULL) != -EPERM) + return true; + else + return false; +} #endif int hif_bus_resume(struct hif_opaque_softc *hif_ctx); /** diff --git a/hif/src/snoc/if_snoc.c b/hif/src/snoc/if_snoc.c index 5fa389b077..1a76ef82f9 100644 --- a/hif/src/snoc/if_snoc.c +++ b/hif/src/snoc/if_snoc.c @@ -241,6 +241,10 @@ static int hif_set_dma_coherent_mask(struct device *dev) { uint8_t addr_bits; + if (false == hif_get_ipa_present()) + return qdf_set_dma_coherent_mask(dev, + DMA_COHERENT_MASK_IPA_VER_3_AND_ABOVE); + if (hif_get_ipa_hw_type() < IPA_HW_v3_0) addr_bits = DMA_COHERENT_MASK_BELOW_IPA_VER_3; else