Skip to content

Commit b03e5dc

Browse files
committed
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>
1 parent 88804e6 commit b03e5dc

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

‎arch/xtensa/kernel/pci.c‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -66,38 +66,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
6666
}
6767
}
6868

69-
void pcibios_set_master(struct pci_dev *dev)
70-
{
71-
/* No special bus mastering setup handling */
72-
}
73-
74-
int 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-
10169
/*
10270
* Platform support for /proc/bus/pci/X/Y mmap()s.
10371
* -- paulus.

0 commit comments

Comments
 (0)