aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-06-17 01:06:19 -0400
committerMax Filippov <jcmvbkbc@gmail.com>2019-06-17 02:31:29 -0400
commitb03e5dcb942b332774cfd62735c137f62e5bb360 (patch)
tree623b5a43ba4c9509f79e0701eb9b72f206515441
parent88804e680bac74114cecd2e565eef9a678daacd0 (diff)
xtensa: use generic pcibios_set_master and pcibios_enable_device
Both functions don't do anything xtensa-specific and there are generic implementations for both. Drop both and use generic versions. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
-rw-r--r--arch/xtensa/kernel/pci.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index 14effa40eb7d..3f32e275997a 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -66,38 +66,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
66 } 66 }
67} 67}
68 68
69void pcibios_set_master(struct pci_dev *dev)
70{
71 /* No special bus mastering setup handling */
72}
73
74int pcibios_enable_device(struct pci_dev *dev, int mask)
75{
76 u16 cmd, old_cmd;
77 int idx;
78 struct resource *r;
79
80 pci_read_config_word(dev, PCI_COMMAND, &cmd);
81 old_cmd = cmd;
82 for (idx=0; idx<6; idx++) {
83 r = &dev->resource[idx];
84 if (!r->start && r->end) {
85 pci_err(dev, "can't enable device: resource collisions\n");
86 return -EINVAL;
87 }
88 if (r->flags & IORESOURCE_IO)
89 cmd |= PCI_COMMAND_IO;
90 if (r->flags & IORESOURCE_MEM)
91 cmd |= PCI_COMMAND_MEMORY;
92 }
93 if (cmd != old_cmd) {
94 pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd);
95 pci_write_config_word(dev, PCI_COMMAND, cmd);
96 }
97
98 return 0;
99}
100
101/* 69/*
102 * Platform support for /proc/bus/pci/X/Y mmap()s. 70 * Platform support for /proc/bus/pci/X/Y mmap()s.
103 * -- paulus. 71 * -- paulus.