qcacld-3.0: add PLD API to support SMMU-S1 unmap in moselle

Add PLD API to support SMMU-S1 unmap in moselle platforms.

Change-Id: Ief6b39f30b2f56b00ca0ec2ade42f599f32baa68
CRs-Fixed: 2883862
Šī revīzija ir iekļauta:
Vevek Venkatesan
2021-03-04 13:17:59 +05:30
revīziju iesūtīja snandini
vecāks 42e586e43e
revīzija 261b2befa0
2 mainīti faili ar 23 papildinājumiem un 2 dzēšanām

Parādīt failu

@@ -2016,7 +2016,7 @@ int pld_smmu_unmap(struct device *dev,
case PLD_BUS_TYPE_PCIE_FW_SIM:
case PLD_BUS_TYPE_SNOC_FW_SIM:
case PLD_BUS_TYPE_IPCI:
pr_err("Not supported on type %d\n", type);
ret = pld_ipci_smmu_unmap(dev, iova_addr, size);
break;
default:
pr_err("Invalid device type %d\n", type);

Parādīt failu

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -120,6 +120,12 @@ static inline int pld_ipci_smmu_map(struct device *dev, phys_addr_t paddr,
return 0;
}
static inline int pld_ipci_smmu_unmap(struct device *dev,
uint32_t iova_addr, size_t size)
{
return 0;
}
static inline int pld_ipci_force_wake_request(struct device *dev)
{
return 0;
@@ -257,6 +263,21 @@ static inline int pld_ipci_smmu_map(struct device *dev, phys_addr_t paddr,
return icnss_smmu_map(dev, paddr, iova_addr, size);
}
#ifdef CONFIG_SMMU_S1_UNMAP
static inline int pld_ipci_smmu_unmap(struct device *dev,
uint32_t iova_addr, size_t size)
{
return icnss_smmu_unmap(dev, iova_addr, size);
}
#else
static inline int pld_ipci_smmu_unmap(struct device *dev,
uint32_t iova_addr, size_t size)
{
return 0;
}
#endif
static inline int pld_ipci_force_wake_request(struct device *dev)
{
return icnss_force_wake_request(dev);