ARM: pci: make pcibios_assign_all_busses use pci_has_flag
authorRob Herring <rob.herring@calxeda.com>
Wed, 29 Jun 2011 15:59:45 +0000 (10:59 -0500)
committerRob Herring <rob.herring@calxeda.com>
Tue, 12 Jul 2011 16:19:28 +0000 (11:19 -0500)
Convert pcibios_assign_all_busses from a define to inline so platforms can
control this setting.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
25 files changed:
arch/arm/include/asm/pci.h
arch/arm/mach-bcmring/include/mach/hardware.h
arch/arm/mach-cns3xxx/include/mach/hardware.h
arch/arm/mach-dove/include/mach/hardware.h
arch/arm/mach-ep93xx/include/mach/hardware.h
arch/arm/mach-footbridge/include/mach/hardware.h
arch/arm/mach-integrator/include/mach/hardware.h
arch/arm/mach-iop13xx/include/mach/hardware.h
arch/arm/mach-iop32x/include/mach/hardware.h
arch/arm/mach-iop33x/include/mach/hardware.h
arch/arm/mach-ixp2000/include/mach/hardware.h
arch/arm/mach-ixp2000/pci.c
arch/arm/mach-ixp23xx/include/mach/hardware.h
arch/arm/mach-ixp23xx/pci.c
arch/arm/mach-ixp4xx/include/mach/hardware.h
arch/arm/mach-kirkwood/include/mach/hardware.h
arch/arm/mach-ks8695/include/mach/hardware.h
arch/arm/mach-mv78xx0/include/mach/hardware.h
arch/arm/mach-orion5x/include/mach/hardware.h
arch/arm/mach-pxa/include/mach/hardware.h
arch/arm/mach-sa1100/include/mach/hardware.h
arch/arm/mach-shark/include/mach/hardware.h
arch/arm/mach-tegra/include/mach/hardware.h
arch/arm/mach-versatile/include/mach/hardware.h
arch/arm/mm/iomap.c

index 92e2a833693d4c9298bc8eed9d2c8d91b51387eb..cb77e66c969f3263af9c73db14b52df4b5d2598c 100644 (file)
@@ -3,10 +3,16 @@
 
 #ifdef __KERNEL__
 #include <asm-generic/pci-dma-compat.h>
+#include <asm-generic/pci-bridge.h>
 
 #include <asm/mach/pci.h> /* for pci_sys_data */
 #include <mach/hardware.h> /* for PCIBIOS_MIN_* */
 
+static inline int pcibios_assign_all_busses(void)
+{
+       return pci_has_flag(PCI_REASSIGN_ALL_RSRC);
+}
+
 #ifdef CONFIG_PCI_DOMAINS
 static inline int pci_domain_nr(struct pci_bus *bus)
 {
index 8bf3564fba50554ad6070627a00aa994374886f1..ed78aabb8e9f3258886a3cf74d941b438c575e3a 100644 (file)
@@ -36,8 +36,6 @@
 #define RAM_SIZE                (CFG_GLOBAL_RAM_SIZE-CFG_GLOBAL_RAM_SIZE_RESERVED)
 #define RAM_BASE                PAGE_OFFSET
 
-#define pcibios_assign_all_busses()    1
-
 /* Macros to make managing spinlocks a bit more controlled in terms of naming. */
 /* See reg_gpio.h, reg_irq.h, arch.c, gpio.c for example usage. */
 #if defined(__KERNEL__)
index 57e09836f9d78a46e36aafa6b148b951c76deb3d..82a0d4e6bcc93ab1cabedc75d34c5ca4867d87c8 100644 (file)
@@ -17,6 +17,5 @@
 /* macro to get at IO space when running virtually */
 #define PCIBIOS_MIN_IO         0x00000000
 #define PCIBIOS_MIN_MEM                0x00000000
-#define pcibios_assign_all_busses()    1
 
 #endif
index 32b0826e787331c6364fd37f351d1d09a40aa218..f619fb92eae671b549086039765a5cf16dc6619d 100644 (file)
@@ -11,8 +11,6 @@
 
 #include "dove.h"
 
-#define pcibios_assign_all_busses()    1
-
 #define PCIBIOS_MIN_IO                 0x1000
 #define PCIBIOS_MIN_MEM                        0x01000000
 #define PCIMEM_BASE                    DOVE_PCIE0_MEM_PHYS_BASE
index 5a3ce024b593b6785baa2d52ebdd066b2b14bd44..4df842897eae8900408fe79469b20dd5e651211a 100644 (file)
@@ -8,8 +8,6 @@
 #include <mach/ep93xx-regs.h>
 #include <mach/platform.h>
 
-#define pcibios_assign_all_busses()    0
-
 /*
  * The EP93xx has two external crystal oscillators.  To generate the
  * required high-frequency clocks, the processor uses two phase-locked-
index b6fdf23ecf6cbbb735d1fefb190690e808e60015..082e6ce23579dbded1a1caba4bca304d905fa23e 100644 (file)
@@ -100,8 +100,6 @@ extern unsigned int nw_gpio_read(void);
 extern void nw_cpld_modify(unsigned int mask, unsigned int set);
 #endif
 
-#define pcibios_assign_all_busses()    1
-
 #define PCIBIOS_MIN_IO         0x1000
 #define PCIBIOS_MIN_MEM        0x81000000
 
index 57f51ba1125170e3763df2b7aecfbbb1e6dcc772..37323eabc1d35a7f594a775bf106ded7c48248b0 100644 (file)
@@ -34,8 +34,6 @@
 
 #define PCIMEM_BASE            PCI_MEMORY_VADDR
 
-#define pcibios_assign_all_busses()    1
-
 #define PCIBIOS_MIN_IO         0x6000
 #define PCIBIOS_MIN_MEM        0x00100000
 
index 8e1d56289846cc605fa569f7d24d758292fda44f..ba81e504d714e1d577fd42ad851179872105fdc4 100644 (file)
@@ -2,8 +2,6 @@
 #define __ASM_ARCH_HARDWARE_H
 #include <asm/types.h>
 
-#define pcibios_assign_all_busses() 1
-
 #ifndef __ASSEMBLY__
 extern unsigned long iop13xx_pcibios_min_io;
 extern unsigned long iop13xx_pcibios_min_mem;
index d559c4e6095a5420cc7d7f6fbca9393fa3b91d25..e68bf9779c8ec08d6b4b68c627960f4ecee7d33d 100644 (file)
@@ -18,7 +18,6 @@
  * but when we read them, we convert them to virtual addresses. See
  * arch/arm/plat-iop/pci.c.
  */
-#define pcibios_assign_all_busses() 1
 #define PCIBIOS_MIN_IO         0x00000000
 #define PCIBIOS_MIN_MEM                0x00000000
 
index 8c10e430655eac72ca1ddfeb94c27fc7ac92dbf8..215065b1101787a1158f149110fe007407098764 100644 (file)
@@ -18,7 +18,6 @@
  * but when we read them, we convert them to virtual addresses.  See
  * arch/arm/mach-iop3xx/iop3xx-pci.c
  */
-#define pcibios_assign_all_busses()    1
 #define PCIBIOS_MIN_IO         0x00000000
 #define PCIBIOS_MIN_MEM                0x00000000
 
index f033de4e74935ab0abeeec9c84b64a1274ca92f9..6c92008aff453c2078713052262edbadf4380db8 100644 (file)
@@ -27,8 +27,6 @@
 
 #include "ixp2000-regs.h"      /* Chipset Registers */
 
-#define pcibios_assign_all_busses() 0
-
 /*
  * Platform helper functions
  */
index f797c5f538b094e2d600c78b85d70d70ff25d295..8888ed9429f89e2654c3d717736b4403fd823148 100644 (file)
@@ -196,6 +196,8 @@ clear_master_aborts(void)
 void __init
 ixp2000_pci_preinit(void)
 {
+       pci_set_flags(0);
+
 #ifndef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
        /*
         * Configure the PCI unit to properly byteswap I/O transactions,
index 57b508bfe2803f45009791428a1d3119e272468b..b8bb781e54f0167f35bba884286120d970825334 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "ixp23xx.h"
 
-#define pcibios_assign_all_busses()    0
-
 /*
  * Platform helper functions
  */
index 563819a83292db81f72b147986b98b573868149f..72d145a2019a915927274b57ff819d59b1011df9 100644 (file)
@@ -227,6 +227,8 @@ static void __init ixp23xx_pci_common_init(void)
 
 void __init ixp23xx_pci_preinit(void)
 {
+       pci_set_flags(0);
+
        ixp23xx_pci_common_init();
 
        hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS, 0,
index 8138371c406e6584b8990803079c7a093cbe1964..163e506764de3f0a58ae53303ccee574ad1ef585 100644 (file)
@@ -28,8 +28,6 @@
 
 #define ARCH_HAS_DMA_SET_COHERENT_MASK
 
-#define pcibios_assign_all_busses()    1
-
 /* Register locations and bits */
 #include "ixp4xx-regs.h"
 
index cde85283f7d3cdb91042e2b6caec4e0dad7efdd7..31b81fefad5901fd60d50f70c7bc5b4edd9cd362 100644 (file)
@@ -11,9 +11,6 @@
 
 #include "kirkwood.h"
 
-#define pcibios_assign_all_busses()    1
-
-#define PCIBIOS_MIN_IO                 0x00001000
 #define PCIBIOS_MIN_MEM                        0x01000000
 #define PCIMEM_BASE                    KIRKWOOD_PCIE_MEM_PHYS_BASE /* mem base for VGA */
 
index e0f911d9e021711c7ff2489ac7951c114a1a74e3..a46be88d896526e02a17f47fad1cdd939d820626 100644 (file)
@@ -46,8 +46,6 @@
 /*
  * PCI support
  */
-#define pcibios_assign_all_busses()    1
-
 #define PCIBIOS_MIN_IO         0
 #define PCIBIOS_MIN_MEM                0
 
index 5d887557e12347ab3cde47ddd0d5b1fc89c613ba..c76b93f1c1644ccac344e0f10902809cd7be3f51 100644 (file)
@@ -11,8 +11,6 @@
 
 #include "mv78xx0.h"
 
-#define pcibios_assign_all_busses()    1
-
 #define PCIBIOS_MIN_IO                 0x00001000
 #define PCIBIOS_MIN_MEM                        0x01000000
 #define PCIMEM_BASE                    MV78XX0_PCIE_MEM_PHYS_BASE /* mem base for VGA */
index e51aaf4bf2b5f8ef4db0907d3b3d4bb45f4b0a72..a42b74389a446ec3957090cd3fe2bf55ae135f94 100644 (file)
@@ -11,8 +11,6 @@
 
 #include "orion5x.h"
 
-#define pcibios_assign_all_busses()    1
-
 #define PCIBIOS_MIN_IO         0x00001000
 #define PCIBIOS_MIN_MEM                0x01000000
 #define PCIMEM_BASE            ORION5X_PCIE_MEM_PHYS_BASE
index 6957ba56025bb4728313dc7da3694d46ad3a8394..b4ea3926a3f26a044880cd2aa49695ce94a5b01c 100644 (file)
@@ -339,7 +339,6 @@ extern unsigned long get_clock_tick_rate(void);
 #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
 #define PCIBIOS_MIN_IO         0
 #define PCIBIOS_MIN_MEM                0
-#define pcibios_assign_all_busses()    1
 #define ARCH_HAS_DMA_SET_COHERENT_MASK
 #endif
 
index 967ae7684390b5b12488af416a4b6eac2ac78776..5946af276dc7d7bcb12671bc516de9364891c343 100644 (file)
@@ -79,7 +79,6 @@ static inline unsigned long get_clock_tick_rate(void)
 #if defined(CONFIG_ARCH_SA1100) && defined(CONFIG_PCI)
 #define PCIBIOS_MIN_IO         0
 #define PCIBIOS_MIN_MEM                0
-#define pcibios_assign_all_busses()    1
 #define HAVE_ARCH_PCI_SET_DMA_MASK     1
 #endif
 
index 94d84b27a0cb47152b5d8148ef542d2073a45525..24639ce5d308235d1d4e3f990516889158bd3ecf 100644 (file)
@@ -12,8 +12,6 @@
 
 #define UNCACHEABLE_ADDR        0xdf010000
 
-#define pcibios_assign_all_busses()     1
-
 #define PCIBIOS_MIN_IO          0x6000
 #define PCIBIOS_MIN_MEM         0x50000000
 #define PCIMEM_BASE            0xe8000000
index 56e43b3a5b97516161523f91a968e07368c1d71b..84c2658427d420239192ca32a8284ad96fe1d74d 100644 (file)
@@ -23,6 +23,5 @@
 
 #define PCIBIOS_MIN_IO                 0x1000
 #define PCIBIOS_MIN_MEM                        0
-#define pcibios_assign_all_busses()    1
 
 #endif
index 6911e1f5f15601bfb3f8a590dc10496abda55b8e..8f60e9481fbbfa6601b2fdabdfbaf0bfbf4914e1 100644 (file)
@@ -34,8 +34,6 @@
 #define PCIBIOS_MIN_IO                 0x44000000
 #define PCIBIOS_MIN_MEM                        0x50000000
 
-#define pcibios_assign_all_busses()     1
-
 /* macro to get at IO space when running virtually */
 #define IO_ADDRESS(x)          (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
 
index ffad039cbb73fe69853a651e41ca3b7733a4256a..ad41414c02803b83af94b061967cd841e94e4016 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/pci.h>
 #include <linux/ioport.h>
 #include <linux/io.h>
+#include <asm/pci.h>
 
 #ifdef __io
 void __iomem *ioport_map(unsigned long port, unsigned int nr)
@@ -23,6 +24,9 @@ EXPORT_SYMBOL(ioport_unmap);
 #endif
 
 #ifdef CONFIG_PCI
+unsigned int pci_flags = PCI_REASSIGN_ALL_RSRC;
+EXPORT_SYMBOL(pci_flags);
+
 void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
 {
        resource_size_t start = pci_resource_start(dev, bar);
This page took 0.034717 seconds and 5 git commands to generate.