Commit f5f4507a 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 1f824d5c
...@@ -264,6 +264,7 @@ int __init pci_realview_eb_setup(int nr, struct pci_sys_data *sys) ...@@ -264,6 +264,7 @@ int __init pci_realview_eb_setup(int nr, struct pci_sys_data *sys)
if (nr == 0) { if (nr == 0) {
sys->mem_offset = 0; sys->mem_offset = 0;
sys->io_offset = REALVIEW_EB_PCI_IO_BASE0;
ret = pci_realview_eb_setup_resources(sys->resource); ret = pci_realview_eb_setup_resources(sys->resource);
if (ret < 0) { if (ret < 0) {
printk("pci_versatile_setup: resources... oops?\n"); printk("pci_versatile_setup: resources... oops?\n");
......
...@@ -117,6 +117,11 @@ static struct map_desc realview_eb_io_desc[] __initdata = { ...@@ -117,6 +117,11 @@ static struct map_desc realview_eb_io_desc[] __initdata = {
.pfn = __phys_to_pfn(REALVIEW_EB_PCI_CFG_BASE), .pfn = __phys_to_pfn(REALVIEW_EB_PCI_CFG_BASE),
.length = REALVIEW_EB_PCI_CFG_BASE_SIZE, .length = REALVIEW_EB_PCI_CFG_BASE_SIZE,
.type = MT_DEVICE .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 #endif
}; };
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
*/ */
#define REALVIEW_EB_PCI_VIRT_BASE 0xe8000000 #define REALVIEW_EB_PCI_VIRT_BASE 0xe8000000
#define REALVIEW_EB_PCI_CFG_VIRT_BASE 0xe9000000 #define REALVIEW_EB_PCI_CFG_VIRT_BASE 0xe9000000
#define REALVIEW_EB_PCI_IO_VIRT_BASE 0xea000000
/* CIK guesswork */ /* CIK guesswork */
#define PCIBIOS_MIN_IO 0x62000000 #define PCIBIOS_MIN_IO 0x62000000
...@@ -44,6 +45,6 @@ ...@@ -44,6 +45,6 @@
#else #else
#define IO_ADDRESS(x) (x) #define IO_ADDRESS(x) (x)
#endif #endif
#define __io_address(n) __io(IO_ADDRESS(n)) #define __io_address(n) ((void __iomem *)IO_ADDRESS(n))
#endif #endif
...@@ -20,11 +20,20 @@ ...@@ -20,11 +20,20 @@
#ifndef __ASM_ARM_ARCH_IO_H #ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H #define __ASM_ARM_ARCH_IO_H
#include <asm/arch/hardware.h>
#include <asm/arch/platform.h>
#define IO_SPACE_LIMIT 0xffffffff #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) static inline void __iomem *__io(unsigned long addr)
{ {
return (void __iomem *)addr; return (void __iomem *)(addr + __pci_io);
} }
#define __io(a) __io(a) #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