Skip to content

Commit c9d95fb

Browse files
author
Rob Herring
committed
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 <rob.herring@calxeda.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
1 parent dc8d966 commit c9d95fb

35 files changed

Lines changed: 57 additions & 110 deletions

File tree

‎arch/arm/include/asm/pci.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
#include <asm-generic/pci-bridge.h>
77

88
#include <asm/mach/pci.h> /* for pci_sys_data */
9-
#include <mach/hardware.h> /* for PCIBIOS_MIN_* */
9+
10+
extern unsigned long pcibios_min_io;
11+
#define PCIBIOS_MIN_IO pcibios_min_io
12+
extern unsigned long pcibios_min_mem;
13+
#define PCIBIOS_MIN_MEM pcibios_min_mem
1014

1115
static inline int pcibios_assign_all_busses(void)
1216
{

‎arch/arm/mach-cns3xxx/include/mach/hardware.h‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎arch/arm/mach-cns3xxx/pcie.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ static int __init cns3xxx_pcie_init(void)
369369
{
370370
int i;
371371

372+
pcibios_min_io = 0;
373+
pcibios_min_mem = 0;
374+
372375
hook_fault_code(16 + 6, cns3xxx_pcie_abort_handler, SIGBUS, 0,
373376
"imprecise external abort");
374377

‎arch/arm/mach-dove/include/mach/hardware.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#include "dove.h"
1313

14-
#define PCIBIOS_MIN_IO 0x1000
15-
#define PCIBIOS_MIN_MEM 0x01000000
1614
#define PCIMEM_BASE DOVE_PCIE0_MEM_PHYS_BASE
1715

1816

‎arch/arm/mach-footbridge/dc21285.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ void __init dc21285_preinit(void)
295295
unsigned int mem_size, mem_mask;
296296
int cfn_mode;
297297

298+
pcibios_min_mem = 0x81000000;
299+
298300
mem_size = (unsigned int)high_memory - PAGE_OFFSET;
299301
for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1)
300302
if (mem_mask >= mem_size)

‎arch/arm/mach-footbridge/include/mach/hardware.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,4 @@ extern unsigned int nw_gpio_read(void);
100100
extern void nw_cpld_modify(unsigned int mask, unsigned int set);
101101
#endif
102102

103-
#define PCIBIOS_MIN_IO 0x1000
104-
#define PCIBIOS_MIN_MEM 0x81000000
105-
106103
#endif

‎arch/arm/mach-integrator/include/mach/hardware.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434

3535
#define PCIMEM_BASE PCI_MEMORY_VADDR
3636

37-
#define PCIBIOS_MIN_IO 0x6000
38-
#define PCIBIOS_MIN_MEM 0x00100000
39-
4037
/* macro to get at IO space when running virtually */
4138
#ifdef CONFIG_MMU
4239
#define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE)

‎arch/arm/mach-integrator/pci_v3.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ void __init pci_v3_preinit(void)
502502
unsigned int temp;
503503
int ret;
504504

505+
pcibios_min_io = 0x6000;
506+
pcibios_min_mem = 0x00100000;
507+
505508
/*
506509
* Hook in our fault handler for PCI errors
507510
*/

‎arch/arm/mach-iop13xx/include/mach/hardware.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
#include <asm/types.h>
44

55
#ifndef __ASSEMBLY__
6-
extern unsigned long iop13xx_pcibios_min_io;
7-
extern unsigned long iop13xx_pcibios_min_mem;
86
extern u16 iop13xx_dev_id(void);
97
extern void iop13xx_set_atu_mmr_bases(void);
108
#endif
119

12-
#define PCIBIOS_MIN_IO (iop13xx_pcibios_min_io)
13-
#define PCIBIOS_MIN_MEM (iop13xx_pcibios_min_mem)
14-
1510
/*
1611
* Generic chipset bits
1712
*

‎arch/arm/mach-iop13xx/pci.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ u32 iop13xx_atue_mem_base;
3939
u32 iop13xx_atux_mem_base;
4040
size_t iop13xx_atue_mem_size;
4141
size_t iop13xx_atux_mem_size;
42-
unsigned long iop13xx_pcibios_min_io = 0;
43-
unsigned long iop13xx_pcibios_min_mem = 0;
4442

4543
EXPORT_SYMBOL(iop13xx_atue_mem_base);
4644
EXPORT_SYMBOL(iop13xx_atux_mem_base);
@@ -971,7 +969,8 @@ void __init iop13xx_pci_init(void)
971969
__raw_writel(__raw_readl(IOP13XX_XBG_BECSR) & 3, IOP13XX_XBG_BECSR);
972970

973971
/* Setup the Min Address for PCI memory... */
974-
iop13xx_pcibios_min_mem = IOP13XX_PCIX_LOWER_MEM_BA;
972+
pcibios_min_io = 0;
973+
pcibios_min_mem = IOP13XX_PCIX_LOWER_MEM_BA;
975974

976975
/* if Linux is given control of an ATU
977976
* clear out its prior configuration,

0 commit comments

Comments
 (0)