pci: Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY for clarity
PATCH 1/1 pci: Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY for clarity
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 <[email protected]>
--- board/MAI/AmigaOneG3SE/articiaS_pci.c | 2 +- board/ads5121/pci.c | 2 +- board/amirix/ap1000/pci.c | 2 +- board/dave/common/pci.c | 2 +- board/eltec/bab7xx/pci.c | 2 +- board/eltec/elppc/pci.c | 2 +- board/esd/common/pci.c | 2 +- board/freescale/mpc832xemds/pci.c | 2 +- board/freescale/mpc8349itx/pci.c | 4 ++-- board/freescale/mpc8360emds/pci.c | 2 +- board/integratorap/integratorap.c | 2 +- board/pcippc2/cpc710_pci.c | 4 ++-- board/ppmc7xx/pci.c | 2 +- board/sbc8349/pci.c | 4 ++-- board/sbc8548/sbc8548.c | 2 +- board/tb0229/vr4131-pci.c | 2 +- board/tqc/tqm834x/pci.c | 2 +- common/fdt_support.c | 4 ++-- cpu/i386/sc520.c | 2 +- cpu/ixp/pci.c | 2 +- cpu/mcf5445x/pci.c | 2 +- cpu/mcf547x_8x/pci.c | 2 +- cpu/mpc5xxx/pci_mpc5200.c | 2 +- cpu/mpc8220/pci.c | 2 +- cpu/mpc824x/pci.c | 2 +- cpu/mpc8260/pci.c | 4 ++-- cpu/mpc83xx/pci.c | 2 +- cpu/ppc4xx/4xx_pci.c | 4 ++-- drivers/pci/fsl_pci_init.c | 10 +++++----- drivers/pci/tsi108_pci.c | 2 +- include/pci.h | 2 +- 31 files changed, 41 insertions(+), 41 deletions(-)
board/MAI/AmigaOneG3SE/articiaS_pci.c +1 -1
@@ -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,
board/ads5121/pci.c +1 -1
@@ -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 ;
board/amirix/ap1000/pci.c +1 -1
@@ -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,
board/dave/common/pci.c +1 -1
@@ -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,
board/eltec/bab7xx/pci.c +1 -1
@@ -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,
board/eltec/elppc/pci.c +1 -1
@@ -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,
board/esd/common/pci.c +1 -1
@@ -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,
board/freescale/mpc832xemds/pci.c +1 -1
@@ -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 ;
board/freescale/mpc8349itx/pci.c +2 -2
@@ -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 ;
board/freescale/mpc8360emds/pci.c +1 -1
@@ -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 ;
board/integratorap/integratorap.c +1 -1
@@ -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,
board/pcippc2/cpc710_pci.c +2 -2
@@ -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,
board/ppmc7xx/pci.c +1 -1
@@ -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,
board/sbc8349/pci.c +2 -2
@@ -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 ;
board/sbc8548/sbc8548.c +1 -1
@@ -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++,
board/tb0229/vr4131-pci.c +1 -1
@@ -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 ;
board/tqc/tqm834x/pci.c +1 -1
@@ -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 ;
common/fdt_support.c +2 -2
@@ -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;
cpu/i386/sc520.c +1 -1
@@ -344,7 +344,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,
cpu/ixp/pci.c +1 -1
@@ -243,7 +243,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,
cpu/mcf5445x/pci.c +1 -1
@@ -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 ;
cpu/mcf547x_8x/pci.c +1 -1
@@ -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 ;
cpu/mpc5xxx/pci_mpc5200.c +1 -1
@@ -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,
cpu/mpc8220/pci.c +1 -1
@@ -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 ;
cpu/mpc824x/pci.c +1 -1
@@ -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,
cpu/mpc8260/pci.c +2 -2
@@ -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 */
cpu/mpc83xx/pci.c +1 -1
@@ -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 ;
cpu/ppc4xx/4xx_pci.c +2 -2
@@ -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;
drivers/pci/fsl_pci_init.c +5 -5
@@ -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 );
drivers/pci/tsi108_pci.c +1 -1
@@ -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,
include/pci.h +1 -1
@@ -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,
Signature · 1 line
1.5.6.6
PATCH 1/1 pci: Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY for clarity
Quoted 32 lines · Kumar Gala
The
PCI_REGION_MEMORYandPCI_REGION_MEMare a bit to similar and can be confusing when reading the code.Rename
PCI_REGION_MEMORYtoPCI_REGION_SYS_MEMORYto clarify its used for system memory mapping purposes.Signed-off-by Kumar Gala <[email protected]>---
board/MAI/AmigaOneG3SE/articiaS_pci.c | 2 +- board/ads5121/pci.c | 2 +- board/amirix/ap1000/pci.c | 2 +- board/dave/common/pci.c | 2 +- board/eltec/bab7xx/pci.c | 2 +- board/eltec/elppc/pci.c | 2 +- board/esd/common/pci.c | 2 +- board/freescale/mpc832xemds/pci.c | 2 +- board/freescale/mpc8349itx/pci.c | 4 ++-- board/freescale/mpc8360emds/pci.c | 2 +- board/integratorap/integratorap.c | 2 +- board/pcippc2/cpc710_pci.c | 4 ++-- board/ppmc7xx/pci.c | 2 +- board/sbc8349/pci.c | 4 ++-- board/sbc8548/sbc8548.c | 2 +- board/tb0229/vr4131-pci.c | 2 +- board/tqc/tqm834x/pci.c | 2 +- common/fdt_support.c | 4 ++-- cpu/i386/sc520.c | 2 +- cpu/ixp/pci.c | 2 +- cpu/mcf5445x/pci.c | 2 +- cpu/mcf547x_8x/pci.c | 2 +- cpu/mpc5xxx/pci_mpc5200.c | 2 +- cpu/mpc8220/pci.c | 2 +-
Quoted 8 lines
cpu/mpc824x/pci.c | 2 +- cpu/mpc8260/pci.c | 4 ++-- cpu/mpc83xx/pci.c | 2 +- cpu/ppc4xx/4xx_pci.c | 4 ++-- drivers/pci/fsl_pci_init.c | 10 +++++----- drivers/pci/tsi108_pci.c | 2 +- include/pci.h | 2 +- 31 files changed, 41 insertions(+), 41 deletions(-)
posting a new version as changes have gone in that require updating it.
- k