aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/host/pci-dra7xx.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 81b3949a26db..19223ed2e619 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -15,7 +15,7 @@
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/irqdomain.h> 16#include <linux/irqdomain.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/module.h> 18#include <linux/init.h>
19#include <linux/of_gpio.h> 19#include <linux/of_gpio.h>
20#include <linux/pci.h> 20#include <linux/pci.h>
21#include <linux/phy/phy.h> 21#include <linux/phy/phy.h>
@@ -443,25 +443,6 @@ err_phy:
443 return ret; 443 return ret;
444} 444}
445 445
446static int __exit dra7xx_pcie_remove(struct platform_device *pdev)
447{
448 struct dra7xx_pcie *dra7xx = platform_get_drvdata(pdev);
449 struct pcie_port *pp = &dra7xx->pp;
450 struct device *dev = &pdev->dev;
451 int count = dra7xx->phy_count;
452
453 if (pp->irq_domain)
454 irq_domain_remove(pp->irq_domain);
455 pm_runtime_put(dev);
456 pm_runtime_disable(dev);
457 while (count--) {
458 phy_power_off(dra7xx->phy[count]);
459 phy_exit(dra7xx->phy[count]);
460 }
461
462 return 0;
463}
464
465#ifdef CONFIG_PM_SLEEP 446#ifdef CONFIG_PM_SLEEP
466static int dra7xx_pcie_suspend(struct device *dev) 447static int dra7xx_pcie_suspend(struct device *dev)
467{ 448{
@@ -545,19 +526,13 @@ static const struct of_device_id of_dra7xx_pcie_match[] = {
545 { .compatible = "ti,dra7-pcie", }, 526 { .compatible = "ti,dra7-pcie", },
546 {}, 527 {},
547}; 528};
548MODULE_DEVICE_TABLE(of, of_dra7xx_pcie_match);
549 529
550static struct platform_driver dra7xx_pcie_driver = { 530static struct platform_driver dra7xx_pcie_driver = {
551 .remove = __exit_p(dra7xx_pcie_remove),
552 .driver = { 531 .driver = {
553 .name = "dra7-pcie", 532 .name = "dra7-pcie",
554 .of_match_table = of_dra7xx_pcie_match, 533 .of_match_table = of_dra7xx_pcie_match,
534 .suppress_bind_attrs = true,
555 .pm = &dra7xx_pcie_pm_ops, 535 .pm = &dra7xx_pcie_pm_ops,
556 }, 536 },
557}; 537};
558 538builtin_platform_driver_probe(dra7xx_pcie_driver, dra7xx_pcie_probe);
559module_platform_driver_probe(dra7xx_pcie_driver, dra7xx_pcie_probe);
560
561MODULE_AUTHOR("Kishon Vijay Abraham I <kishon@ti.com>");
562MODULE_DESCRIPTION("TI PCIe controller driver");
563MODULE_LICENSE("GPL v2");