diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-06-27 02:14:04 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-06-29 02:58:35 -0400 |
commit | 6a506238b33efd93e60c1585d654b37e292183de (patch) | |
tree | 69f985cd17a9bffeb9cf4aa97c67e5b133136f34 /arch/powerpc/kernel/pci_32.c | |
parent | bf440b712d289b157c72f19b389b8d918a8c8c5c (diff) |
[POWERPC] Removed dead code related to PCI on ppc32
There are no in kernel users of any off these functions and some of
them were not even EXPORT_SYMBOL:
- pci_bus_io_base()
- pci_bus_io_base_phys()
- pci_bus_mem_base_phys()
- pci_resource_to_bus()
- phys_to_bus()
- pci_phys_to_bus()
- pci_bus_to_phys()
- pci_init_resource()
- resource_fixup()
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_32.c')
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 7738a2881c9f..2d4a1c4f4e31 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -1319,12 +1319,6 @@ pcibios_init(void) | |||
1319 | 1319 | ||
1320 | subsys_initcall(pcibios_init); | 1320 | subsys_initcall(pcibios_init); |
1321 | 1321 | ||
1322 | unsigned long resource_fixup(struct pci_dev * dev, struct resource * res, | ||
1323 | unsigned long start, unsigned long size) | ||
1324 | { | ||
1325 | return start; | ||
1326 | } | ||
1327 | |||
1328 | void __init pcibios_fixup_bus(struct pci_bus *bus) | 1322 | void __init pcibios_fixup_bus(struct pci_bus *bus) |
1329 | { | 1323 | { |
1330 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; | 1324 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; |
@@ -1508,53 +1502,6 @@ pci_bus_to_hose(int bus) | |||
1508 | return NULL; | 1502 | return NULL; |
1509 | } | 1503 | } |
1510 | 1504 | ||
1511 | void __iomem * | ||
1512 | pci_bus_io_base(unsigned int bus) | ||
1513 | { | ||
1514 | struct pci_controller *hose; | ||
1515 | |||
1516 | hose = pci_bus_to_hose(bus); | ||
1517 | if (!hose) | ||
1518 | return NULL; | ||
1519 | return hose->io_base_virt; | ||
1520 | } | ||
1521 | |||
1522 | unsigned long | ||
1523 | pci_bus_io_base_phys(unsigned int bus) | ||
1524 | { | ||
1525 | struct pci_controller *hose; | ||
1526 | |||
1527 | hose = pci_bus_to_hose(bus); | ||
1528 | if (!hose) | ||
1529 | return 0; | ||
1530 | return hose->io_base_phys; | ||
1531 | } | ||
1532 | |||
1533 | unsigned long | ||
1534 | pci_bus_mem_base_phys(unsigned int bus) | ||
1535 | { | ||
1536 | struct pci_controller *hose; | ||
1537 | |||
1538 | hose = pci_bus_to_hose(bus); | ||
1539 | if (!hose) | ||
1540 | return 0; | ||
1541 | return hose->pci_mem_offset; | ||
1542 | } | ||
1543 | |||
1544 | unsigned long | ||
1545 | pci_resource_to_bus(struct pci_dev *pdev, struct resource *res) | ||
1546 | { | ||
1547 | /* Hack alert again ! See comments in chrp_pci.c | ||
1548 | */ | ||
1549 | struct pci_controller* hose = | ||
1550 | (struct pci_controller *)pdev->sysdata; | ||
1551 | if (hose && res->flags & IORESOURCE_MEM) | ||
1552 | return res->start - hose->pci_mem_offset; | ||
1553 | /* We may want to do something with IOs here... */ | ||
1554 | return res->start; | ||
1555 | } | ||
1556 | |||
1557 | |||
1558 | static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | 1505 | static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, |
1559 | resource_size_t *offset, | 1506 | resource_size_t *offset, |
1560 | enum pci_mmap_state mmap_state) | 1507 | enum pci_mmap_state mmap_state) |
@@ -1725,53 +1672,6 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
1725 | return ret; | 1672 | return ret; |
1726 | } | 1673 | } |
1727 | 1674 | ||
1728 | /* Obsolete functions. Should be removed once the symbios driver | ||
1729 | * is fixed | ||
1730 | */ | ||
1731 | unsigned long | ||
1732 | phys_to_bus(unsigned long pa) | ||
1733 | { | ||
1734 | struct pci_controller *hose; | ||
1735 | int i; | ||
1736 | |||
1737 | for (hose = hose_head; hose; hose = hose->next) { | ||
1738 | for (i = 0; i < 3; ++i) { | ||
1739 | if (pa >= hose->mem_resources[i].start | ||
1740 | && pa <= hose->mem_resources[i].end) { | ||
1741 | /* | ||
1742 | * XXX the hose->pci_mem_offset really | ||
1743 | * only applies to mem_resources[0]. | ||
1744 | * We need a way to store an offset for | ||
1745 | * the others. -- paulus | ||
1746 | */ | ||
1747 | if (i == 0) | ||
1748 | pa -= hose->pci_mem_offset; | ||
1749 | return pa; | ||
1750 | } | ||
1751 | } | ||
1752 | } | ||
1753 | /* hmmm, didn't find it */ | ||
1754 | return 0; | ||
1755 | } | ||
1756 | |||
1757 | unsigned long | ||
1758 | pci_phys_to_bus(unsigned long pa, int busnr) | ||
1759 | { | ||
1760 | struct pci_controller* hose = pci_bus_to_hose(busnr); | ||
1761 | if (!hose) | ||
1762 | return pa; | ||
1763 | return pa - hose->pci_mem_offset; | ||
1764 | } | ||
1765 | |||
1766 | unsigned long | ||
1767 | pci_bus_to_phys(unsigned int ba, int busnr) | ||
1768 | { | ||
1769 | struct pci_controller* hose = pci_bus_to_hose(busnr); | ||
1770 | if (!hose) | ||
1771 | return ba; | ||
1772 | return ba + hose->pci_mem_offset; | ||
1773 | } | ||
1774 | |||
1775 | /* Provide information on locations of various I/O regions in physical | 1675 | /* Provide information on locations of various I/O regions in physical |
1776 | * memory. Do this on a per-card basis so that we choose the right | 1676 | * memory. Do this on a per-card basis so that we choose the right |
1777 | * root bridge. | 1677 | * root bridge. |
@@ -1853,18 +1753,6 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
1853 | *end = rsrc->end - offset; | 1753 | *end = rsrc->end - offset; |
1854 | } | 1754 | } |
1855 | 1755 | ||
1856 | void __init pci_init_resource(struct resource *res, resource_size_t start, | ||
1857 | resource_size_t end, int flags, char *name) | ||
1858 | { | ||
1859 | res->start = start; | ||
1860 | res->end = end; | ||
1861 | res->flags = flags; | ||
1862 | res->name = name; | ||
1863 | res->parent = NULL; | ||
1864 | res->sibling = NULL; | ||
1865 | res->child = NULL; | ||
1866 | } | ||
1867 | |||
1868 | unsigned long pci_address_to_pio(phys_addr_t address) | 1756 | unsigned long pci_address_to_pio(phys_addr_t address) |
1869 | { | 1757 | { |
1870 | struct pci_controller* hose = hose_head; | 1758 | struct pci_controller* hose = hose_head; |