summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTony Truong <truong@codeaurora.org>2016-05-18 12:29:03 -0700
committerKyle Yan <kyan@codeaurora.org>2016-06-15 16:12:55 -0700
commit01415b8c98dfaccd7d35cfe9b538be2c95156693 (patch)
tree01bd7b9a80f020dee8be81449c36fdf1cd803c11 /include
parent2d4fdc7bde4678f4b51203411edba0e1cdb46a36 (diff)
msm: pcie: add stubs for !CONFIG_PCI_MSM
When the MSM PCI-e driver isn't enabled, other code that might rely on some of its exported interfaces will fail to build. Add some stubs for this scenario to allow other drivers to build independently of CONFIG_PCI_MSM. Change-Id: Ib0f6d0ecfa992e2b8aaae9ab6cea3a2e441f65dd Signed-off-by: Tony Truong <truong@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/msm_pcie.h50
1 files changed, 48 insertions, 2 deletions
diff --git a/include/linux/msm_pcie.h b/include/linux/msm_pcie.h
index aba7fe20835e..c9c467ff7428 100644
--- a/include/linux/msm_pcie.h
+++ b/include/linux/msm_pcie.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2016, 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
@@ -59,6 +59,7 @@ struct msm_pcie_register_event {
u32 options;
};
+#ifdef CONFIG_PCI_MSM
/**
* msm_pcie_pm_control - control the power state of a PCIe link.
* @pm_opt: power management operation
@@ -168,4 +169,49 @@ int msm_pcie_debug_info(struct pci_dev *dev, u32 option, u32 base,
*/
int msm_pcie_configure_sid(struct device *dev, u32 *sid,
int *domain);
-#endif
+#else /* !CONFIG_PCI_MSM */
+static inline int msm_pcie_pm_control(enum msm_pcie_pm_opt pm_opt, u32 busnr,
+ void *user, void *data, u32 options)
+{
+ return -ENODEV;
+}
+
+static inline int msm_pcie_register_event(struct msm_pcie_register_event *reg)
+{
+ return -ENODEV;
+}
+
+static inline int msm_pcie_deregister_event(struct msm_pcie_register_event *reg)
+{
+ return -ENODEV;
+}
+
+static inline int msm_pcie_recover_config(struct pci_dev *dev)
+{
+ return -ENODEV;
+}
+
+static inline int msm_pcie_enumerate(u32 rc_idx)
+{
+ return -ENODEV;
+}
+
+static inline int msm_pcie_shadow_control(struct pci_dev *dev, bool enable)
+{
+ return -ENODEV;
+}
+
+static inline int msm_pcie_debug_info(struct pci_dev *dev, u32 option, u32 base,
+ u32 offset, u32 mask, u32 value)
+{
+ return -ENODEV;
+}
+
+static inline int msm_pcie_configure_sid(struct device *dev, u32 *sid,
+ int *domain)
+{
+ return -ENODEV;
+}
+#endif /* CONFIG_PCI_MSM */
+
+#endif /* __MSM_PCIE_H */