qcacmn: Use dma_iommu_mapping only if ENABLE_SMMU_S1_TRANSLATION defined
In standard linux kernel, dma_iommu_mapping is not defined for arm64, while in qualcomm linux kernel, dma_iommu_mapping is defined for arm and arm64. To fix build error in standard linux kernel, use struct dma_iommu_mapping only when ENABLE_SMMU_S1_TRANSLATION is defined. Change-Id: Ib02073163f2a38c47f864c6592fe2470046868ce CRs-Fixed: 2496729
This commit is contained in:
@@ -63,7 +63,9 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_ARM_SMMU
|
#ifdef CONFIG_ARM_SMMU
|
||||||
#include <pld_common.h>
|
#include <pld_common.h>
|
||||||
|
#ifdef ENABLE_SMMU_S1_TRANSLATION
|
||||||
#include <asm/dma-iommu.h>
|
#include <asm/dma-iommu.h>
|
||||||
|
#endif
|
||||||
#include <linux/iommu.h>
|
#include <linux/iommu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -210,7 +212,7 @@ static inline bool __qdf_mem_smmu_s1_enabled(qdf_device_t osdev)
|
|||||||
return osdev->smmu_s1_enabled;
|
return osdev->smmu_s1_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ARM_SMMU
|
#if defined(CONFIG_ARM_SMMU) && defined(ENABLE_SMMU_S1_TRANSLATION)
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
|
||||||
/**
|
/**
|
||||||
* __qdf_dev_get_domain() - get iommu domain from osdev
|
* __qdf_dev_get_domain() - get iommu domain from osdev
|
||||||
|
@@ -265,8 +265,10 @@ struct __qdf_device {
|
|||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
|
||||||
struct iommu_domain *domain;
|
struct iommu_domain *domain;
|
||||||
#else
|
#else
|
||||||
|
#ifdef ENABLE_SMMU_S1_TRANSLATION
|
||||||
struct dma_iommu_mapping *iommu_mapping;
|
struct dma_iommu_mapping *iommu_mapping;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
typedef struct __qdf_device *__qdf_device_t;
|
typedef struct __qdf_device *__qdf_device_t;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user