Commit f99ae342 authored by Bahadir Balban's avatar Bahadir Balban Committed by Catalin Marinas

RealView/EB PCI IO Support

Signed-off-by: default avatarBahadir Balban <bahadir.balban@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 22473abd
......@@ -264,6 +264,7 @@ int __init pci_realview_eb_setup(int nr, struct pci_sys_data *sys)
if (nr == 0) {
sys->mem_offset = 0;
sys->io_offset = REALVIEW_EB_PCI_IO_BASE0;
ret = pci_realview_eb_setup_resources(sys->resource);
if (ret < 0) {
printk("pci_versatile_setup: resources... oops?\n");
......
......@@ -100,6 +100,11 @@ static struct map_desc realview_eb_io_desc[] __initdata = {
.pfn = __phys_to_pfn(REALVIEW_EB_PCI_CFG_BASE),
.length = REALVIEW_EB_PCI_CFG_BASE_SIZE,
.type = MT_DEVICE
}, {
.virtual = REALVIEW_EB_PCI_IO_VIRT_BASE,
.pfn = __phys_to_pfn(REALVIEW_EB_PCI_IO_BASE0),
.length = REALVIEW_EB_PCI_IO_BASE0_SIZE,
.type = MT_DEVICE
},
#endif
};
......
......@@ -29,6 +29,7 @@
*/
#define REALVIEW_EB_PCI_VIRT_BASE 0xe8000000
#define REALVIEW_EB_PCI_CFG_VIRT_BASE 0xe9000000
#define REALVIEW_EB_PCI_IO_VIRT_BASE 0xea000000
/* CIK guesswork */
#define PCIBIOS_MIN_IO 0x62000000
......@@ -42,6 +43,6 @@
#else
#define IO_ADDRESS(x) (x)
#endif
#define __io_address(n) __io(IO_ADDRESS(n))
#define __io_address(n) ((void __iomem *)IO_ADDRESS(n))
#endif
......@@ -20,11 +20,20 @@
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
#include <asm/arch/hardware.h>
#include <asm/arch/board-eb.h>
#define IO_SPACE_LIMIT 0xffffffff
#if defined(CONFIG_MMU) && defined(CONFIG_MACH_REALVIEW_EB)
#define __pci_io (REALVIEW_EB_PCI_IO_VIRT_BASE - REALVIEW_EB_PCI_IO_BASE0)
#else
#define __pci_io 0
#endif
static inline void __iomem *__io(unsigned long addr)
{
return (void __iomem *)addr;
return (void __iomem *)(addr + __pci_io);
}
#define __io(a) __io(a)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment