PCI: tegra264: Fix build issues using conftest

The Tegra264 PCIe drivers don't build for kernels that don't have:

1. The structure mrq_pcie_request_req defined
2. The function pci_epc_deinit_notify() present

This is currently being handling by building a dummy driver for kernels
that don't have these. To simplify this, use conftest to detect if the
above are present and modify the Tegra264 PCIe driver accordingly if
they are not present. By using conftest we can remove the Makefile
variable 'NV_OOT_PCIE_T264_SOC_SKIP_BUILD' and ccflag
'DNV_CONFIG_PCIE_TEGRA_DMA_DISABLE'.

Finally, the PCIe drivers are always built as modules so simplify the
Makefile and remove the usage of 'CONFIG_TEGRA_OOT_MODULE'.

Bug 4911768

Change-Id: Id282497b8607a732b5e6c90e1e7c1436589a0b5f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3245592
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2024-10-21 12:00:10 +01:00
parent cb233ff6f5
commit 23e3912ef7
11 changed files with 52 additions and 86 deletions

View File

@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
/* SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION. All rights reserved. */
#ifndef TEGRA_PCIE_DMA_H
#define TEGRA_PCIE_DMA_H
@@ -33,11 +31,6 @@
#define TEGRA264_PCIE_DMA_MSI_REMOTE_VEC 5
#endif
#ifndef NV_CONFIG_PCIE_TEGRA_DMA_DISABLE
/** Enable generic PCIe DMA driver */
#define CONFIG_PCIE_TEGRA_DMA 1
#endif
/**
* @brief typedef to define various values for xfer status passed for dma_complete_t or
* <a href="#tegra-pcie-dma-submit-xfer">(tegra_pcie_dma_submit_xfer())</a>
@@ -222,7 +215,6 @@ struct tegra_pcie_dma_xfer_info {
void *priv;
};
#ifdef CONFIG_PCIE_TEGRA_DMA
#ifdef DOXYGEN_ICD
/**
* @dir
@@ -403,31 +395,5 @@ bool tegra_pcie_dma_stop(void *cookie);
* - DMA HW is stopped.
*/
tegra_pcie_dma_status_t tegra_pcie_dma_deinit(void **cookie);
#else
static inline tegra_pcie_dma_status_t
tegra_pcie_dma_initialize(struct tegra_pcie_dma_init_info *info, void **cookie) {
return -EOPNOTSUPP;
}
static inline tegra_pcie_dma_status_t tegra_pcie_dma_set_msi(void *cookie, u64 msi_addr,
u32 msi_data) {
return -EOPNOTSUPP;
}
static inline tegra_pcie_dma_status_t
tegra_pcie_dma_submit_xfer(void *cookie, struct tegra_pcie_dma_xfer_info *tx_info) {
return -EOPNOTSUPP;
}
static inline bool tegra_pcie_dma_stop(void *cookie)
{
return -EOPNOTSUPP;
}
static inline tegra_pcie_dma_status_t tegra_pcie_dma_deinit(void **cookie)
{
return -EOPNOTSUPP;
}
#endif
#endif //TEGRA_PCIE_DMA_H