Skip to content

Commit 5b4e5be

Browse files
committed
Merge branch 'pci/controller/tegra'
- Export irq_domain_free_irqs() to allow PCI/MSI drivers that tear down MSI domains to be built as modules (Aaron Kling) - Export tegra_cpuidle_pcie_irqs_in_use(), which disables Tegra CC6 while PCI IRQs are in use, so pci-tegra can be built as a module (Aaron Kling) - Allow pci-tegra to be built as a module (Aaron Kling) * pci/controller/tegra: PCI: tegra: Allow building as a module cpuidle: tegra: Export tegra_cpuidle_pcie_irqs_in_use() irqdomain: Export irq_domain_free_irqs()
2 parents 751776f + aac5ba6 commit 5b4e5be

4 files changed

Lines changed: 7 additions & 32 deletions

File tree

drivers/cpuidle/cpuidle-tegra.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ void tegra_cpuidle_pcie_irqs_in_use(void)
336336
pr_info("disabling CC6 state, since PCIe IRQs are in use\n");
337337
tegra_cpuidle_disable_state(TEGRA_CC6);
338338
}
339+
EXPORT_SYMBOL_GPL(tegra_cpuidle_pcie_irqs_in_use);
339340

340341
static void tegra_cpuidle_setup_tegra114_c7_state(void)
341342
{

drivers/pci/controller/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ config PCI_HYPERV_INTERFACE
248248
driver.
249249

250250
config PCI_TEGRA
251-
bool "NVIDIA Tegra PCIe controller"
251+
tristate "NVIDIA Tegra PCIe controller"
252252
depends on ARCH_TEGRA || COMPILE_TEST
253253
depends on PCI_MSI
254254
select IRQ_MSI_LIB

drivers/pci/controller/pci-tegra.c

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,12 +2545,6 @@ static const struct seq_operations tegra_pcie_ports_sops = {
25452545

25462546
DEFINE_SEQ_ATTRIBUTE(tegra_pcie_ports);
25472547

2548-
static void tegra_pcie_debugfs_exit(struct tegra_pcie *pcie)
2549-
{
2550-
debugfs_remove_recursive(pcie->debugfs);
2551-
pcie->debugfs = NULL;
2552-
}
2553-
25542548
static void tegra_pcie_debugfs_init(struct tegra_pcie *pcie)
25552549
{
25562550
pcie->debugfs = debugfs_create_dir("pcie", NULL);
@@ -2624,29 +2618,6 @@ static int tegra_pcie_probe(struct platform_device *pdev)
26242618
return err;
26252619
}
26262620

2627-
static void tegra_pcie_remove(struct platform_device *pdev)
2628-
{
2629-
struct tegra_pcie *pcie = platform_get_drvdata(pdev);
2630-
struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
2631-
struct tegra_pcie_port *port, *tmp;
2632-
2633-
if (IS_ENABLED(CONFIG_DEBUG_FS))
2634-
tegra_pcie_debugfs_exit(pcie);
2635-
2636-
pci_stop_root_bus(host->bus);
2637-
pci_remove_root_bus(host->bus);
2638-
pm_runtime_put_sync(pcie->dev);
2639-
pm_runtime_disable(pcie->dev);
2640-
2641-
if (IS_ENABLED(CONFIG_PCI_MSI))
2642-
tegra_pcie_msi_teardown(pcie);
2643-
2644-
tegra_pcie_put_resources(pcie);
2645-
2646-
list_for_each_entry_safe(port, tmp, &pcie->ports, list)
2647-
tegra_pcie_port_free(port);
2648-
}
2649-
26502621
static int tegra_pcie_pm_suspend(struct device *dev)
26512622
{
26522623
struct tegra_pcie *pcie = dev_get_drvdata(dev);
@@ -2750,6 +2721,8 @@ static struct platform_driver tegra_pcie_driver = {
27502721
.pm = &tegra_pcie_pm_ops,
27512722
},
27522723
.probe = tegra_pcie_probe,
2753-
.remove = tegra_pcie_remove,
27542724
};
2755-
module_platform_driver(tegra_pcie_driver);
2725+
builtin_platform_driver(tegra_pcie_driver);
2726+
MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
2727+
MODULE_DESCRIPTION("NVIDIA PCI host controller driver");
2728+
MODULE_LICENSE("GPL");

kernel/irq/irqdomain.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,7 @@ void irq_domain_free_irqs(unsigned int virq, unsigned int nr_irqs)
19011901
irq_domain_free_irq_data(virq, nr_irqs);
19021902
irq_free_descs(virq, nr_irqs);
19031903
}
1904+
EXPORT_SYMBOL_GPL(irq_domain_free_irqs);
19041905

19051906
static void irq_domain_free_one_irq(struct irq_domain *domain, unsigned int virq)
19061907
{

0 commit comments

Comments
 (0)