From c27c02ee65b8686ccd23f49ab3ab83723bc6c47d Mon Sep 17 00:00:00 2001 From: Tony Truong Date: Mon, 5 Jan 2015 12:58:58 -0800 Subject: 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 --- include/linux/msm_pcie.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include/linux') 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 -- cgit v1.2.3