|
@@ -1319,12 +1319,6 @@ pcibios_init(void)
|
|
|
|
|
|
subsys_initcall(pcibios_init);
|
|
|
|
|
|
-unsigned long resource_fixup(struct pci_dev * dev, struct resource * res,
|
|
|
- unsigned long start, unsigned long size)
|
|
|
-{
|
|
|
- return start;
|
|
|
-}
|
|
|
-
|
|
|
void __init pcibios_fixup_bus(struct pci_bus *bus)
|
|
|
{
|
|
|
struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
|
|
@@ -1508,53 +1502,6 @@ pci_bus_to_hose(int bus)
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
-void __iomem *
|
|
|
-pci_bus_io_base(unsigned int bus)
|
|
|
-{
|
|
|
- struct pci_controller *hose;
|
|
|
-
|
|
|
- hose = pci_bus_to_hose(bus);
|
|
|
- if (!hose)
|
|
|
- return NULL;
|
|
|
- return hose->io_base_virt;
|
|
|
-}
|
|
|
-
|
|
|
-unsigned long
|
|
|
-pci_bus_io_base_phys(unsigned int bus)
|
|
|
-{
|
|
|
- struct pci_controller *hose;
|
|
|
-
|
|
|
- hose = pci_bus_to_hose(bus);
|
|
|
- if (!hose)
|
|
|
- return 0;
|
|
|
- return hose->io_base_phys;
|
|
|
-}
|
|
|
-
|
|
|
-unsigned long
|
|
|
-pci_bus_mem_base_phys(unsigned int bus)
|
|
|
-{
|
|
|
- struct pci_controller *hose;
|
|
|
-
|
|
|
- hose = pci_bus_to_hose(bus);
|
|
|
- if (!hose)
|
|
|
- return 0;
|
|
|
- return hose->pci_mem_offset;
|
|
|
-}
|
|
|
-
|
|
|
-unsigned long
|
|
|
-pci_resource_to_bus(struct pci_dev *pdev, struct resource *res)
|
|
|
-{
|
|
|
- /* Hack alert again ! See comments in chrp_pci.c
|
|
|
- */
|
|
|
- struct pci_controller* hose =
|
|
|
- (struct pci_controller *)pdev->sysdata;
|
|
|
- if (hose && res->flags & IORESOURCE_MEM)
|
|
|
- return res->start - hose->pci_mem_offset;
|
|
|
- /* We may want to do something with IOs here... */
|
|
|
- return res->start;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
|
|
|
resource_size_t *offset,
|
|
|
enum pci_mmap_state mmap_state)
|
|
@@ -1725,53 +1672,6 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-/* Obsolete functions. Should be removed once the symbios driver
|
|
|
- * is fixed
|
|
|
- */
|
|
|
-unsigned long
|
|
|
-phys_to_bus(unsigned long pa)
|
|
|
-{
|
|
|
- struct pci_controller *hose;
|
|
|
- int i;
|
|
|
-
|
|
|
- for (hose = hose_head; hose; hose = hose->next) {
|
|
|
- for (i = 0; i < 3; ++i) {
|
|
|
- if (pa >= hose->mem_resources[i].start
|
|
|
- && pa <= hose->mem_resources[i].end) {
|
|
|
- /*
|
|
|
- * XXX the hose->pci_mem_offset really
|
|
|
- * only applies to mem_resources[0].
|
|
|
- * We need a way to store an offset for
|
|
|
- * the others. -- paulus
|
|
|
- */
|
|
|
- if (i == 0)
|
|
|
- pa -= hose->pci_mem_offset;
|
|
|
- return pa;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- /* hmmm, didn't find it */
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-unsigned long
|
|
|
-pci_phys_to_bus(unsigned long pa, int busnr)
|
|
|
-{
|
|
|
- struct pci_controller* hose = pci_bus_to_hose(busnr);
|
|
|
- if (!hose)
|
|
|
- return pa;
|
|
|
- return pa - hose->pci_mem_offset;
|
|
|
-}
|
|
|
-
|
|
|
-unsigned long
|
|
|
-pci_bus_to_phys(unsigned int ba, int busnr)
|
|
|
-{
|
|
|
- struct pci_controller* hose = pci_bus_to_hose(busnr);
|
|
|
- if (!hose)
|
|
|
- return ba;
|
|
|
- return ba + hose->pci_mem_offset;
|
|
|
-}
|
|
|
-
|
|
|
/* Provide information on locations of various I/O regions in physical
|
|
|
* memory. Do this on a per-card basis so that we choose the right
|
|
|
* root bridge.
|
|
@@ -1853,18 +1753,6 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,
|
|
|
*end = rsrc->end - offset;
|
|
|
}
|
|
|
|
|
|
-void __init pci_init_resource(struct resource *res, resource_size_t start,
|
|
|
- resource_size_t end, int flags, char *name)
|
|
|
-{
|
|
|
- res->start = start;
|
|
|
- res->end = end;
|
|
|
- res->flags = flags;
|
|
|
- res->name = name;
|
|
|
- res->parent = NULL;
|
|
|
- res->sibling = NULL;
|
|
|
- res->child = NULL;
|
|
|
-}
|
|
|
-
|
|
|
unsigned long pci_address_to_pio(phys_addr_t address)
|
|
|
{
|
|
|
struct pci_controller* hose = hose_head;
|