pci: Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY for clarity
authorKumar Gala <galak@kernel.crashing.org>
Fri, 6 Feb 2009 15:49:31 +0000 (09:49 -0600)
committerWolfgang Denk <wd@denx.de>
Sat, 7 Feb 2009 22:50:04 +0000 (23:50 +0100)
The PCI_REGION_MEMORY and PCI_REGION_MEM are a bit to similar and
can be confusing when reading the code.

Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY to clarify its used
for system memory mapping purposes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
32 files changed:
board/MAI/AmigaOneG3SE/articiaS_pci.c
board/ads5121/pci.c
board/amirix/ap1000/pci.c
board/armltd/integratorap/integratorap.c
board/dave/common/pci.c
board/eltec/bab7xx/pci.c
board/eltec/elppc/pci.c
board/esd/common/pci.c
board/freescale/mpc832xemds/pci.c
board/freescale/mpc8349itx/pci.c
board/freescale/mpc8360emds/pci.c
board/pcippc2/cpc710_pci.c
board/ppmc7xx/pci.c
board/sbc8349/pci.c
board/sbc8548/sbc8548.c
board/tb0229/vr4131-pci.c
board/tqc/tqm834x/pci.c
common/fdt_support.c
cpu/i386/sc520.c
cpu/mcf5445x/pci.c
cpu/mcf547x_8x/pci.c
cpu/mpc5xxx/pci_mpc5200.c
cpu/mpc8220/pci.c
cpu/mpc824x/pci.c
cpu/mpc8260/pci.c
cpu/mpc83xx/pci.c
cpu/mpc83xx/pcie.c
cpu/ppc4xx/4xx_pci.c
drivers/pci/fsl_pci_init.c
drivers/pci/pci_ixp.c
drivers/pci/tsi108_pci.c
include/pci.h

index 45b8195..371f67f 100644 (file)
@@ -313,7 +313,7 @@ void articiaS_pci_init (void)
                   ARTICIAS_SYS_BUS,
                   ARTICIAS_SYS_PHYS,
                   ARTICIAS_SYS_MAXSIZE,
-                  PCI_REGION_MEM | PCI_REGION_MEMORY);
+                  PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
     /* PCI memory space */
     pci_set_region(articiaS_hose.regions + 1,
index b747e81..806c428 100644 (file)
@@ -153,7 +153,7 @@ pci_init_board(void)
                       CONFIG_PCI_SYS_MEM_BUS,
                       CONFIG_PCI_SYS_MEM_PHYS,
                       gd->ram_size,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 4;
 
index a9b3fd8..5fbcd37 100644 (file)
@@ -294,7 +294,7 @@ void pci_init_board (void)
        pci_set_region (hose->regions + 0,
                        AP1000_SYS_MEM_START, AP1000_SYS_MEM_START,
                        AP1000_SYS_MEM_SIZE,
-                       PCI_REGION_MEM | PCI_REGION_MEMORY);
+                       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        /* PCI Memory space */
        pci_set_region (hose->regions + 1,
index ddacabb..9631967 100644 (file)
@@ -428,7 +428,7 @@ void pci_init_board (void)
        /* System memory space */
        pci_set_region (hose->regions + 0,
                        0x00000000, 0x40000000, 0x01000000,
-                       PCI_REGION_MEM | PCI_REGION_MEMORY);
+                       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        /* PCI Memory - config space */
        pci_set_region (hose->regions + 1,
index ec0d761..ddfbea9 100644 (file)
@@ -179,7 +179,7 @@ void pci_init(void)
   /* System memory space */
   pci_set_region(hose->regions + 0,
                 0x00000000, 0x00000000, 0x01000000,
-                PCI_REGION_MEM | PCI_REGION_MEMORY);
+                PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
   /* PCI Memory space */
   pci_set_region(hose->regions + 1,
index 46e5a8b..38dd498 100644 (file)
@@ -50,7 +50,7 @@ void pci_init_board(void)
     * so we need (CONFIG_SYS_PCI_MEMORY_SIZE-1)
     */
        CONFIG_SYS_PCI_MEMORY_SIZE-1,
-       PCI_REGION_MEM | PCI_REGION_MEMORY);
+       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
     /* PCI memory space */
     pci_set_region(hose->regions + 1,
index bf133b7..2948531 100644 (file)
@@ -45,7 +45,7 @@ void pci_init_board(void)
        CONFIG_SYS_PCI_MEMORY_BUS,
        CONFIG_SYS_PCI_MEMORY_PHYS,
        CONFIG_SYS_PCI_MEMORY_SIZE,
-       PCI_REGION_MEM | PCI_REGION_MEMORY);
+       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
     /* PCI memory space */
     pci_set_region(hose->regions + 1,
index dcb764c..83f8103 100644 (file)
@@ -179,7 +179,7 @@ void pci_init_board(void)
   /* System memory space */
   pci_set_region(hose->regions + 0,
                 0x00000000, 0x00000000, 0x01000000,
-                PCI_REGION_MEM | PCI_REGION_MEMORY);
+                PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
   /* PCI Memory space */
   pci_set_region(hose->regions + 1,
index 2a48dd2..212fb52 100644 (file)
@@ -228,7 +228,7 @@ void pci_init_board(void)
                       CONFIG_SYS_PCI_SLV_MEM_LOCAL,
                       CONFIG_SYS_PCI_SLV_MEM_BUS,
                       CONFIG_SYS_PCI_SLV_MEM_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose[0].region_count = 4;
 
index fd2c172..8da7117 100644 (file)
@@ -210,7 +210,7 @@ void pci_init_board(void)
        pci_set_region(hose->regions + 3,
                       CONFIG_PCI_SYS_MEM_BUS,
                       CONFIG_PCI_SYS_MEM_PHYS,
-                      gd->ram_size, PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      gd->ram_size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 4;
 
@@ -301,7 +301,7 @@ void pci_init_board(void)
        pci_set_region(hose->regions + 3,
                       CONFIG_PCI_SYS_MEM_BUS,
                       CONFIG_PCI_SYS_MEM_PHYS,
-                      gd->ram_size, PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      gd->ram_size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 4;
 
index 935aca2..7ac35dc 100644 (file)
@@ -228,7 +228,7 @@ void pci_init_board(void)
                       CONFIG_SYS_PCI_SLV_MEM_LOCAL,
                       CONFIG_SYS_PCI_SLV_MEM_BUS,
                       CONFIG_SYS_PCI_SLV_MEM_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose[0].region_count = 4;
 
index bed8aea..ccd18e1 100644 (file)
@@ -215,7 +215,7 @@ void cpc710_pci_init (void)
                 PCI_MEMORY_BUS,
                 PCI_MEMORY_PHYS,
                 PCI_MEMORY_MAXSIZE,
-                PCI_REGION_MEM | PCI_REGION_MEMORY);
+                PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
   /* PCI memory space */
   pci_set_region(local_hose.regions + 1,
@@ -265,7 +265,7 @@ void cpc710_pci_init (void)
                 PCI_MEMORY_BUS,
                 PCI_MEMORY_PHYS,
                 PCI_MEMORY_MAXSIZE,
-                PCI_REGION_MEMORY);
+                PCI_REGION_SYS_MEMORY);
 
   /* PCI memory space */
   pci_set_region(cpci_hose.regions + 1,
index bf133b7..2948531 100644 (file)
@@ -45,7 +45,7 @@ void pci_init_board(void)
        CONFIG_SYS_PCI_MEMORY_BUS,
        CONFIG_SYS_PCI_MEMORY_PHYS,
        CONFIG_SYS_PCI_MEMORY_SIZE,
-       PCI_REGION_MEM | PCI_REGION_MEMORY);
+       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
     /* PCI memory space */
     pci_set_region(hose->regions + 1,
index 9022c55..ac5f30b 100644 (file)
@@ -197,7 +197,7 @@ pci_init_board(void)
                       CONFIG_PCI_SYS_MEM_BUS,
                       CONFIG_PCI_SYS_MEM_PHYS,
                       gd->ram_size,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 4;
 
@@ -293,7 +293,7 @@ pci_init_board(void)
                       CONFIG_PCI_SYS_MEM_BUS,
                       CONFIG_PCI_SYS_MEM_PHYS,
                       gd->ram_size,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 4;
 
index 519b0f7..a779420 100644 (file)
@@ -470,7 +470,7 @@ pci_init_board(void)
                               CONFIG_SYS_PCI_MEMORY_BUS,
                               CONFIG_SYS_PCI_MEMORY_PHYS,
                               CONFIG_SYS_PCI_MEMORY_SIZE,
-                              PCI_REGION_MEM | PCI_REGION_MEMORY);
+                              PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
                /* outbound memory */
                pci_set_region(r++,
index 4c91923..6ff4293 100644 (file)
@@ -235,7 +235,7 @@ void init_vr4131_pci (struct pci_controller *hose)
        pci_set_region (hose->regions + 3,
                        0x00000000,
                        0x80000000,
-                       0x04000000, PCI_REGION_MEM | PCI_REGION_MEMORY);
+                       0x04000000, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 4;
 
index 0eedf4a..cb2cb8d 100644 (file)
@@ -181,7 +181,7 @@ pci_init_board(void)
                       CONFIG_PCI_SYS_MEM_BUS,
                       CONFIG_PCI_SYS_MEM_PHYS,
                       CONFIG_PCI_SYS_MEM_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 3;
 
index a79bc08..b54f886 100644 (file)
@@ -646,8 +646,8 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose) {
        for (r = 0; r < hose->region_count; r++) {
                u64 bus_start, phys_start, size;
 
-               /* skip if !PCI_REGION_MEMORY */
-               if (!(hose->regions[r].flags & PCI_REGION_MEMORY))
+               /* skip if !PCI_REGION_SYS_MEMORY */
+               if (!(hose->regions[r].flags & PCI_REGION_SYS_MEMORY))
                        continue;
 
                bus_start = (u64)hose->regions[r].bus_start;
index 12e8f38..b958f8d 100644 (file)
@@ -341,7 +341,7 @@ void pci_sc520_init(struct pci_controller *hose)
                       SC520_PCI_MEMORY_BUS,
                       SC520_PCI_MEMORY_PHYS,
                       SC520_PCI_MEMORY_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        /* PCI memory space */
        pci_set_region(hose->regions + 1,
index c4a3b05..7f9784c 100644 (file)
@@ -146,7 +146,7 @@ void pci_mcf5445x_init(struct pci_controller *hose)
 
        pci_set_region(hose->regions + 2, CONFIG_SYS_PCI_SYS_MEM_BUS,
                       CONFIG_SYS_PCI_SYS_MEM_PHYS, CONFIG_SYS_PCI_SYS_MEM_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 3;
 
index f5c2536..f867dc1 100644 (file)
@@ -149,7 +149,7 @@ void pci_mcf547x_8x_init(struct pci_controller *hose)
 
        pci_set_region(hose->regions + 2, CONFIG_SYS_PCI_SYS_MEM_BUS,
                       CONFIG_SYS_PCI_SYS_MEM_PHYS, CONFIG_SYS_PCI_SYS_MEM_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 3;
 
index a3251ab..225738a 100644 (file)
@@ -93,7 +93,7 @@ void pci_mpc5xxx_init (struct pci_controller *hose)
                       CONFIG_PCI_MEMORY_BUS,
                       CONFIG_PCI_MEMORY_PHYS,
                       CONFIG_PCI_MEMORY_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        /* PCI memory space */
        pci_set_region(hose->regions + 1,
index a78a828..7ef43b7 100644 (file)
@@ -165,7 +165,7 @@ pci_mpc8220_init(struct pci_controller *hose)
                CONFIG_PCI_SYS_MEM_BUS,
                CONFIG_PCI_SYS_MEM_PHYS,
                CONFIG_PCI_SYS_MEM_SIZE,
-               PCI_REGION_MEM | PCI_REGION_MEMORY);
+               PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        hose->region_count = 3;
 
index 7e3c4c3..cf9cf41 100644 (file)
@@ -34,7 +34,7 @@ void pci_mpc824x_init (struct pci_controller *hose)
                       CHRP_PCI_MEMORY_BUS,
                       CHRP_PCI_MEMORY_PHYS,
                       CHRP_PCI_MEMORY_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        /* PCI memory space */
        pci_set_region(hose->regions + 1,
index 378d6c5..f1e9bb4 100644 (file)
@@ -410,12 +410,12 @@ void pci_mpc8250_init (struct pci_controller *hose)
        pci_set_region (hose->regions + 0,
                        PCI_SLV_MEM_BUS,
                        PCI_SLV_MEM_LOCAL,
-                       gd->ram_size, PCI_REGION_MEM | PCI_REGION_MEMORY);
+                       gd->ram_size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 #else
        pci_set_region (hose->regions + 0,
                        CONFIG_SYS_SDRAM_BASE,
                        CONFIG_SYS_SDRAM_BASE,
-                       0x4000000, PCI_REGION_MEM | PCI_REGION_MEMORY);
+                       0x4000000, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 #endif
 
        /* PCI memory space */
index e9965d7..5fe8964 100644 (file)
@@ -89,7 +89,7 @@ static void pci_init_bus(int bus, struct pci_region *reg)
        hose->regions[i].bus_start = 0;
        hose->regions[i].phys_start = 0;
        hose->regions[i].size = gd->ram_size;
-       hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_MEMORY;
+       hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_SYS_MEMORY;
 
        hose->first_busno = 0;
        hose->last_busno = 0xff;
index 02150ba..12b5f69 100644 (file)
@@ -109,13 +109,13 @@ static void mpc83xx_pcie_register_hose(int bus, struct pci_region *reg,
        hose->regions[i].bus_start = 0;
        hose->regions[i].phys_start = 0;
        hose->regions[i].size = gd->ram_size;
-       hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_MEMORY;
+       hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_SYS_MEMORY;
 
        i = hose->region_count++;
        hose->regions[i].bus_start = CONFIG_SYS_IMMR;
        hose->regions[i].phys_start = CONFIG_SYS_IMMR;
        hose->regions[i].size = 0x100000;
-       hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_MEMORY;
+       hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_SYS_MEMORY;
 
        hose->first_busno = max_bus;
        hose->last_busno = 0xff;
index 2e75886..6fd36de 100644 (file)
@@ -179,7 +179,7 @@ void pci_405gp_init(struct pci_controller *hose)
                                       ptmpcila[i], ptmla[i],
                                       ~(ptmms[i] & 0xfffff000) + 1,
                                       PCI_REGION_MEM |
-                                      PCI_REGION_MEMORY);
+                                      PCI_REGION_SYS_MEMORY);
                }
 
        /* PCI memory spaces */
@@ -504,7 +504,7 @@ int pci_440_init (struct pci_controller *hose)
                       CONFIG_PCI_SYS_MEM_BUS,
                       CONFIG_PCI_SYS_MEM_PHYS,
                       CONFIG_PCI_SYS_MEM_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY );
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY );
 #endif
 
        hose->region_count = reg_num;
index db68f26..20b2dcc 100644 (file)
@@ -72,7 +72,7 @@ int fsl_pci_setup_inbound_windows(struct pci_region *r)
        debug ("R0 bus_start: %llx phys_start: %llx size: %llx\n",
                (u64)bus_start, (u64)phys_start, (u64)pci_sz);
        pci_set_region(r++, bus_start, phys_start, pci_sz,
-                       PCI_REGION_MEM | PCI_REGION_MEMORY |
+                       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
                        PCI_REGION_PREFETCH);
 
        sz -= pci_sz;
@@ -84,7 +84,7 @@ int fsl_pci_setup_inbound_windows(struct pci_region *r)
                debug ("R1 bus_start: %llx phys_start: %llx size: %llx\n",
                        (u64)bus_start, (u64)phys_start, (u64)pci_sz);
                pci_set_region(r++, bus_start, phys_start, pci_sz,
-                               PCI_REGION_MEM | PCI_REGION_MEMORY |
+                               PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
                                PCI_REGION_PREFETCH);
                sz -= pci_sz;
                bus_start += pci_sz;
@@ -108,7 +108,7 @@ int fsl_pci_setup_inbound_windows(struct pci_region *r)
                        CONFIG_SYS_PCI64_MEMORY_BUS,
                        CONFIG_SYS_PCI_MEMORY_PHYS,
                        pci_sz,
-                       PCI_REGION_MEM | PCI_REGION_MEMORY |
+                       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
                        PCI_REGION_PREFETCH);
 #else
        pci_sz = 1ull << __ilog2_u64(sz);
@@ -116,7 +116,7 @@ int fsl_pci_setup_inbound_windows(struct pci_region *r)
                debug ("R2 bus_start: %llx phys_start: %llx size: %llx\n",
                        (u64)bus_start, (u64)phys_start, (u64)pci_sz);
                pci_set_region(r++, bus_start, phys_start, pci_sz,
-                               PCI_REGION_MEM | PCI_REGION_MEMORY |
+                               PCI_REGION_MEM | PCI_REGION_SYS_MEMORY |
                                PCI_REGION_PREFETCH);
                sz -= pci_sz;
                bus_start += pci_sz;
@@ -157,7 +157,7 @@ void fsl_pci_init(struct pci_controller *hose)
 
        for (r=0; r<hose->region_count; r++) {
                u32 sz = (__ilog2_u64((u64)hose->regions[r].size) - 1);
-               if (hose->regions[r].flags & PCI_REGION_MEMORY) { /* inbound */
+               if (hose->regions[r].flags & PCI_REGION_SYS_MEMORY) { /* inbound */
                        u32 flag = PIWAR_EN | PIWAR_LOCAL |
                                        PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP;
                        pi->pitar = (hose->regions[r].phys_start >> 12);
index aae3d3d..3b303b4 100644 (file)
@@ -240,7 +240,7 @@ void pci_ixp_init (struct pci_controller *hose)
        /* System memory space */
        pci_set_region (hose->regions + 0,
                        PCI_MEMORY_BUS,
-                       PCI_MEMORY_PHY, PCI_MEMORY_SIZE, PCI_REGION_MEMORY);
+                       PCI_MEMORY_PHY, PCI_MEMORY_SIZE, PCI_REGION_SYS_MEMORY);
 
        /* PCI memory space */
        pci_set_region (hose->regions + 1,
index d153fc6..627e8a0 100644 (file)
@@ -131,7 +131,7 @@ void pci_init_board (void)
        pci_set_region (hose->regions + 0,
                       CONFIG_SYS_PCI_MEMORY_BUS,
                       CONFIG_SYS_PCI_MEMORY_PHYS,
-                      CONFIG_SYS_PCI_MEMORY_SIZE, PCI_REGION_MEM | PCI_REGION_MEMORY);
+                      CONFIG_SYS_PCI_MEMORY_SIZE, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
        /* PCI memory space */
        pci_set_region (hose->regions + 1,
index 072273b..35ff1e9 100644 (file)
@@ -334,7 +334,7 @@ struct pci_region {
 #define PCI_REGION_TYPE                0x00000001
 #define PCI_REGION_PREFETCH    0x00000008      /* prefetchable PCI memory */
 
-#define PCI_REGION_MEMORY      0x00000100      /* System memory */
+#define PCI_REGION_SYS_MEMORY  0x00000100      /* System memory */
 #define PCI_REGION_RO          0x00000200      /* Read-only memory */
 
 extern __inline__ void pci_set_region(struct pci_region *reg,