From c9d95fbe59e426eed7f16e7cac812e46ac4772d0 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 28 Jun 2011 21:16:13 -0500 Subject: ARM: convert PCI defines to variables Convert PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM to variables to allow multi-platform builds. This also removes the requirement for a platform to have a mach/hardware.h. The default values for i/o and mem are 0x1000 and 0x01000000, respectively. Per Arnd Bergmann, other values are likely to be incorrect, but this commit does not try to address that issue. Signed-off-by: Rob Herring Acked-by: Nicolas Pitre Reviewed-by: Arnd Bergmann --- arch/arm/mach-shark/include/mach/hardware.h | 2 -- arch/arm/mach-shark/pci.c | 10 ++++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-shark') diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h index 24639ce5d308..4342931a1502 100644 --- a/arch/arm/mach-shark/include/mach/hardware.h +++ b/arch/arm/mach-shark/include/mach/hardware.h @@ -12,8 +12,6 @@ #define UNCACHEABLE_ADDR 0xdf010000 -#define PCIBIOS_MIN_IO 0x6000 -#define PCIBIOS_MIN_MEM 0x50000000 #define PCIMEM_BASE 0xe8000000 #endif diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c index 89d175ce74d2..4aea637a2ddb 100644 --- a/arch/arm/mach-shark/pci.c +++ b/arch/arm/mach-shark/pci.c @@ -37,8 +37,14 @@ static struct hw_pci shark_pci __initdata = { static int __init shark_pci_init(void) { - if (machine_is_shark()) - pci_common_init(&shark_pci); + if (!machine_is_shark()) + return; + + pcibios_min_io = 0x6000; + pcibios_min_mem = 0x50000000; + + pci_common_init(&shark_pci); + return 0; } -- cgit v1.2.3