diff options
Diffstat (limited to 'arch/powerpc/kernel/pci_32.c')
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 0ad101a5fc5e..b08238f30502 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -1561,7 +1561,7 @@ static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | |||
1561 | *offset += hose->pci_mem_offset; | 1561 | *offset += hose->pci_mem_offset; |
1562 | res_bit = IORESOURCE_MEM; | 1562 | res_bit = IORESOURCE_MEM; |
1563 | } else { | 1563 | } else { |
1564 | io_offset = hose->io_base_virt - ___IO_BASE; | 1564 | io_offset = hose->io_base_virt - (void __iomem *)_IO_BASE; |
1565 | *offset += io_offset; | 1565 | *offset += io_offset; |
1566 | res_bit = IORESOURCE_IO; | 1566 | res_bit = IORESOURCE_IO; |
1567 | } | 1567 | } |
@@ -1816,7 +1816,8 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
1816 | return; | 1816 | return; |
1817 | 1817 | ||
1818 | if (rsrc->flags & IORESOURCE_IO) | 1818 | if (rsrc->flags & IORESOURCE_IO) |
1819 | offset = ___IO_BASE - hose->io_base_virt + hose->io_base_phys; | 1819 | offset = (void __iomem *)_IO_BASE - hose->io_base_virt |
1820 | + hose->io_base_phys; | ||
1820 | 1821 | ||
1821 | *start = rsrc->start + offset; | 1822 | *start = rsrc->start + offset; |
1822 | *end = rsrc->end + offset; | 1823 | *end = rsrc->end + offset; |
@@ -1835,35 +1836,6 @@ pci_init_resource(struct resource *res, unsigned long start, unsigned long end, | |||
1835 | res->child = NULL; | 1836 | res->child = NULL; |
1836 | } | 1837 | } |
1837 | 1838 | ||
1838 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | ||
1839 | { | ||
1840 | unsigned long start = pci_resource_start(dev, bar); | ||
1841 | unsigned long len = pci_resource_len(dev, bar); | ||
1842 | unsigned long flags = pci_resource_flags(dev, bar); | ||
1843 | |||
1844 | if (!len) | ||
1845 | return NULL; | ||
1846 | if (max && len > max) | ||
1847 | len = max; | ||
1848 | if (flags & IORESOURCE_IO) | ||
1849 | return ioport_map(start, len); | ||
1850 | if (flags & IORESOURCE_MEM) | ||
1851 | /* Not checking IORESOURCE_CACHEABLE because PPC does | ||
1852 | * not currently distinguish between ioremap and | ||
1853 | * ioremap_nocache. | ||
1854 | */ | ||
1855 | return ioremap(start, len); | ||
1856 | /* What? */ | ||
1857 | return NULL; | ||
1858 | } | ||
1859 | |||
1860 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | ||
1861 | { | ||
1862 | /* Nothing to do */ | ||
1863 | } | ||
1864 | EXPORT_SYMBOL(pci_iomap); | ||
1865 | EXPORT_SYMBOL(pci_iounmap); | ||
1866 | |||
1867 | unsigned long pci_address_to_pio(phys_addr_t address) | 1839 | unsigned long pci_address_to_pio(phys_addr_t address) |
1868 | { | 1840 | { |
1869 | struct pci_controller* hose = hose_head; | 1841 | struct pci_controller* hose = hose_head; |