summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTony Truong <truong@codeaurora.org>2015-01-05 12:58:58 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:09:18 -0700
commitc27c02ee65b8686ccd23f49ab3ab83723bc6c47d (patch)
tree73ff610b0056f1e0e3984a9f84fbabb9bb230071 /include/linux
parent58763943bc12180855c16d8a59a43ddc587d0bc3 (diff)
msm: pcie: add SMMU support to calculate SID for PCIe EP
SMMU requires PCIe to provide a SID for each of its endpoint so that the endpoint can successful transaction on the bus. This change adds the support for PCIe bus driver to calculate a SID for its endpoint and give it to the SMMU driver. Change-Id: I52099bbfed0a38c75b0277b0f58f45f6e6559695 Signed-off-by: Tony Truong <truong@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/msm_pcie.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/msm_pcie.h b/include/linux/msm_pcie.h
index 259f4441c451..aba7fe20835e 100644
--- a/include/linux/msm_pcie.h
+++ b/include/linux/msm_pcie.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -155,4 +155,17 @@ int msm_pcie_shadow_control(struct pci_dev *dev, bool enable);
*/
int msm_pcie_debug_info(struct pci_dev *dev, u32 option, u32 base,
u32 offset, u32 mask, u32 value);
+
+/*
+ * msm_pcie_configure_sid - calculates the SID for a PCIe endpoint.
+ * @dev: device structure
+ * @sid: the calculated SID
+ * @domain: the domain number of the Root Complex
+ *
+ * This function calculates the SID for a PCIe endpoint device.
+ *
+ * Return: 0 on success, negative value on error
+ */
+int msm_pcie_configure_sid(struct device *dev, u32 *sid,
+ int *domain);
#endif