msm: pcie: update PCIe RC and MSI driver to compile as GKI modules

Add required changes so that PCIe root complex and MSI driver
will compile as GKI modules.

Change-Id: Ic34098be2af217dc4ff004817625be90c5dbfd3f
Signed-off-by: Tony Truong <truong@codeaurora.org>
This commit is contained in:
Tony Truong 2020-01-21 16:54:35 -08:00 • committed by Hemant Kumar
commit da0e7ccfa4
2 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.*/
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.*/
#include <linux/interrupt.h>
#include <linux/iommu.h>
@ -321,6 +321,7 @@ int msm_msi_init(struct device *dev)
struct msm_msi *msi;
struct device_node *of_node;
const __be32 *prop_val;
struct of_phandle_args irq;
if (!dev->of_node) {
dev_err(dev, "MSI: missing DT node\n");
@ -369,7 +370,9 @@ int msm_msi_init(struct device *dev)
goto err;
}
msi->nr_irqs = of_irq_count(msi->of_node);
while (of_irq_parse_one(msi->of_node, msi->nr_irqs, &irq) == 0)
msi->nr_irqs++;
if (!msi->nr_irqs) {
dev_err(msi->dev, "MSI: found no MSI interrupts\n");
ret = -ENODEV;

View file

@ -7278,3 +7278,6 @@ int msm_pcie_shadow_control(struct pci_dev *dev, bool enable)
return ret;
}
EXPORT_SYMBOL(msm_pcie_shadow_control);
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. PCIe RC driver");
MODULE_LICENSE("GPL v2");