aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/host/pci-host-generic.c
diff options
context:
space:
mode:
authorRodrigo Vivi <[email protected]>2018-07-23 09:13:12 -0700
committerRodrigo Vivi <[email protected]>2018-07-23 09:13:12 -0700
commitc74a7469f97c0f40b46e82ee979f9fb1bb6e847c (patch)
treef2690a1a916b73ef94657fbf0e0141ae57701825 /drivers/pci/host/pci-host-generic.c
parent6f15a7de86c8cf2dc09fc9e6d07047efa40ef809 (diff)
parent500775074f88d9cf5416bed2ca19592812d62c41 (diff)
Merge drm/drm-next into drm-intel-next-queued
We need a backmerge to get DP_DPCD_REV_14 before we push other i915 changes to dinq that could break compilation. Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'drivers/pci/host/pci-host-generic.c')
-rw-r--r--drivers/pci/host/pci-host-generic.c99
1 files changed, 0 insertions, 99 deletions
diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
deleted file mode 100644
index 45319ee3b484..000000000000
--- a/drivers/pci/host/pci-host-generic.c
+++ /dev/null
@@ -1,99 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Simple, generic PCI host controller driver targetting firmware-initialised
- * systems and virtual machines (e.g. the PCI emulation provided by kvmtool).
- *
- * Copyright (C) 2014 ARM Limited
- *
- * Author: Will Deacon <[email protected]>
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/of_address.h>
-#include <linux/of_pci.h>
-#include <linux/pci-ecam.h>
-#include <linux/platform_device.h>
-
-static struct pci_ecam_ops gen_pci_cfg_cam_bus_ops = {
- .bus_shift = 16,
- .pci_ops = {
- .map_bus = pci_ecam_map_bus,
- .read = pci_generic_config_read,
- .write = pci_generic_config_write,
- }
-};
-
-static bool pci_dw_valid_device(struct pci_bus *bus, unsigned int devfn)
-{
- struct pci_config_window *cfg = bus->sysdata;
-
- /*
- * The Synopsys DesignWare PCIe controller in ECAM mode will not filter
- * type 0 config TLPs sent to devices 1 and up on its downstream port,
- * resulting in devices appearing multiple times on bus 0 unless we
- * filter out those accesses here.
- */
- if (bus->number == cfg->busr.start && PCI_SLOT(devfn) > 0)
- return false;
-
- return true;
-}
-
-static void __iomem *pci_dw_ecam_map_bus(struct pci_bus *bus,
- unsigned int devfn, int where)
-{
- if (!pci_dw_valid_device(bus, devfn))
- return NULL;
-
- return pci_ecam_map_bus(bus, devfn, where);
-}
-
-static struct pci_ecam_ops pci_dw_ecam_bus_ops = {
- .bus_shift = 20,
- .pci_ops = {
- .map_bus = pci_dw_ecam_map_bus,
- .read = pci_generic_config_read,
- .write = pci_generic_config_write,
- }
-};
-
-static const struct of_device_id gen_pci_of_match[] = {
- { .compatible = "pci-host-cam-generic",
- .data = &gen_pci_cfg_cam_bus_ops },
-
- { .compatible = "pci-host-ecam-generic",
- .data = &pci_generic_ecam_ops },
-
- { .compatible = "marvell,armada8k-pcie-ecam",
- .data = &pci_dw_ecam_bus_ops },
-
- { .compatible = "socionext,synquacer-pcie-ecam",
- .data = &pci_dw_ecam_bus_ops },
-
- { .compatible = "snps,dw-pcie-ecam",
- .data = &pci_dw_ecam_bus_ops },
-
- { },
-};
-
-static int gen_pci_probe(struct platform_device *pdev)
-{
- const struct of_device_id *of_id;
- struct pci_ecam_ops *ops;
-
- of_id = of_match_node(gen_pci_of_match, pdev->dev.of_node);
- ops = (struct pci_ecam_ops *)of_id->data;
-
- return pci_host_common_probe(pdev, ops);
-}
-
-static struct platform_driver gen_pci_driver = {
- .driver = {
- .name = "pci-host-generic",
- .of_match_table = gen_pci_of_match,
- .suppress_bind_attrs = true,
- },
- .probe = gen_pci_probe,
-};
-builtin_platform_driver(gen_pci_driver);