qcacmn: Do IPA version based DMA coherent mask setting

In case of IPA hw version less than 3.0, only 32 bit DMA
address can be handled as it is only 32 bit compliant.
Because of this, setting DMA coherent mask of 37 when
IPA hw version is less than 3.0, crash is happening.

Do IPA version based DMA coherent mask setting such that
when IPA hw version is less than 3.0, set DMA coherent mask
as 32 only.

Change-Id: I8dec7da47766985ab0590f885b29f345f153cd08
CRs-Fixed: 1114605
This commit is contained in:
Himanshu Agarwal
2017-01-23 18:09:44 +05:30
zatwierdzone przez qcabuildsw
rodzic 4bd194660d
commit 846cf37306
4 zmienionych plików z 98 dodań i 8 usunięć

Wyświetl plik

@@ -43,6 +43,9 @@ extern "C" {
#ifdef HIF_USB
#include <linux/usb.h>
#endif /* HIF_USB */
#ifdef IPA_OFFLOAD
#include <linux/ipa.h>
#endif
#define ENABLE_MBOX_DUMMY_SPACE_FEATURE 1
typedef struct htc_callbacks HTC_CALLBACKS;
@@ -104,6 +107,11 @@ typedef void *hif_handle_t;
#define TARGET_TYPE_QCA6290 21
#endif
#ifdef IPA_OFFLOAD
#define DMA_COHERENT_MASK_IPA_VER_3_AND_ABOVE 37
#define DMA_COHERENT_MASK_BELOW_IPA_VER_3 32
#endif
/* enum hif_ic_irq - enum defining integrated chip irq numbers
* defining irq nubers that can be used by external modules like datapath
*/
@@ -695,6 +703,20 @@ void hif_vote_link_down(struct hif_opaque_softc *);
void hif_vote_link_up(struct hif_opaque_softc *);
bool hif_can_suspend_link(struct hif_opaque_softc *);
#ifdef IPA_OFFLOAD
/**
* hif_get_ipa_hw_type() - get IPA hw type
*
* This API return the IPA hw type.
*
* Return: IPA hw type
*/
static inline
enum ipa_hw_type hif_get_ipa_hw_type(void)
{
return ipa_get_hw_type();
}
#endif
int hif_bus_resume(struct hif_opaque_softc *);
int hif_bus_suspend(struct hif_opaque_softc *);
int hif_bus_resume_noirq(struct hif_opaque_softc *);