aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-04 10:04:50 -0500
committerTom Rini <trini@konsulko.com>2022-12-23 10:14:51 -0500
commit1d457dbb9151f50176f7548d00ed37e13dc81e00 (patch)
tree8474cd282db65dc7735f6631effd84dbbc143581 /arch/powerpc
parentdd5b58c49129016a02e41d6fda2213888d13c115 (diff)
downloadu-boot-1d457dbb9151f50176f7548d00ed37e13dc81e00.zip
u-boot-1d457dbb9151f50176f7548d00ed37e13dc81e00.tar.gz
u-boot-1d457dbb9151f50176f7548d00ed37e13dc81e00.tar.bz2
global: Migrate CONFIG_MAX_MEM_MAPPED to CFG
Perform a simple rename of CONFIG_MAX_MEM_MAPPED to CFG_MAX_MEM_MAPPED Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu.c14
-rw-r--r--arch/powerpc/cpu/mpc85xx/mp.c4
-rw-r--r--arch/powerpc/cpu/mpc85xx/tlb.c8
-rw-r--r--arch/powerpc/cpu/mpc8xxx/pamu_table.c2
-rw-r--r--arch/powerpc/include/asm/config.h6
5 files changed, 17 insertions, 17 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index be85c54..0abcc01 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -616,12 +616,12 @@ static int reset_tlb(phys_addr_t p_addr, u32 size, phys_addr_t *phys_offset)
/*
* slide the testing window up to test another area
* for 32_bit system, the maximum testable memory is limited to
- * CONFIG_MAX_MEM_MAPPED
+ * CFG_MAX_MEM_MAPPED
*/
int arch_memory_test_advance(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
{
phys_addr_t test_cap, p_addr;
- phys_size_t p_size = min(gd->ram_size, CONFIG_MAX_MEM_MAPPED);
+ phys_size_t p_size = min(gd->ram_size, CFG_MAX_MEM_MAPPED);
#if !defined(CONFIG_PHYS_64BIT) || \
!defined(CFG_SYS_INIT_RAM_ADDR_PHYS) || \
@@ -632,7 +632,7 @@ int arch_memory_test_advance(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
#endif
p_addr = (*vstart) + (*size) + (*phys_offset);
if (p_addr < test_cap - 1) {
- p_size = min(test_cap - p_addr, CONFIG_MAX_MEM_MAPPED);
+ p_size = min(test_cap - p_addr, CFG_MAX_MEM_MAPPED);
if (reset_tlb(p_addr, p_size, phys_offset) == -1)
return -1;
*vstart = CFG_SYS_DDR_SDRAM_BASE;
@@ -649,18 +649,18 @@ int arch_memory_test_advance(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
/* initialization for testing area */
int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
{
- phys_size_t p_size = min(gd->ram_size, CONFIG_MAX_MEM_MAPPED);
+ phys_size_t p_size = min(gd->ram_size, CFG_MAX_MEM_MAPPED);
*vstart = CFG_SYS_DDR_SDRAM_BASE;
- *size = (u32) p_size; /* CONFIG_MAX_MEM_MAPPED < 4G */
+ *size = (u32) p_size; /* CFG_MAX_MEM_MAPPED < 4G */
*phys_offset = 0;
#if !defined(CONFIG_PHYS_64BIT) || \
!defined(CFG_SYS_INIT_RAM_ADDR_PHYS) || \
(CFG_SYS_INIT_RAM_ADDR_PHYS < 0x100000000ull)
- if (gd->ram_size > CONFIG_MAX_MEM_MAPPED) {
+ if (gd->ram_size > CFG_MAX_MEM_MAPPED) {
puts("Cannot test more than ");
- print_size(CONFIG_MAX_MEM_MAPPED,
+ print_size(CFG_MAX_MEM_MAPPED,
" without proper 36BIT support.\n");
}
#endif
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 44f8ed8..7c47e41 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -193,8 +193,8 @@ u32 determine_mp_bootpg(unsigned int *pagesize)
/* use last 4K of mapped memory */
- bootpg = ((gd->ram_size > CONFIG_MAX_MEM_MAPPED) ?
- CONFIG_MAX_MEM_MAPPED : gd->ram_size) +
+ bootpg = ((gd->ram_size > CFG_MAX_MEM_MAPPED) ?
+ CFG_MAX_MEM_MAPPED : gd->ram_size) +
CFG_SYS_SDRAM_BASE - 4096;
if (pagesize)
*pagesize = 4096;
diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index 5d21bef..2a78f0f 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -306,12 +306,12 @@ unsigned int setup_ddr_tlbs_phys(phys_addr_t p_addr,
u64 memsize = (u64)memsize_in_meg << 20;
u64 size;
- size = min(memsize, (u64)CONFIG_MAX_MEM_MAPPED);
+ size = min(memsize, (u64)CFG_MAX_MEM_MAPPED);
size = tlb_map_range(ram_tlb_address, p_addr, size, TLB_MAP_RAM);
- if (size || memsize > CONFIG_MAX_MEM_MAPPED) {
- print_size(memsize > CONFIG_MAX_MEM_MAPPED ?
- memsize - CONFIG_MAX_MEM_MAPPED + size : size,
+ if (size || memsize > CFG_MAX_MEM_MAPPED) {
+ print_size(memsize > CFG_MAX_MEM_MAPPED ?
+ memsize - CFG_MAX_MEM_MAPPED + size : size,
" of DDR memory left unmapped in U-Boot\n");
#ifndef CONFIG_SPL_BUILD
puts(" ");
diff --git a/arch/powerpc/cpu/mpc8xxx/pamu_table.c b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
index caad667..b906279 100644
--- a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
+++ b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
@@ -17,7 +17,7 @@ void construct_pamu_addr_table(struct pamu_addr_tbl *tbl, int *num_entries)
tbl->start_addr[i] =
(uint64_t)virt_to_phys((void *)CFG_SYS_SDRAM_BASE);
- tbl->size[i] = (phys_size_t)(min(gd->ram_size, CONFIG_MAX_MEM_MAPPED));
+ tbl->size[i] = (phys_size_t)(min(gd->ram_size, CFG_MAX_MEM_MAPPED));
tbl->end_addr[i] = tbl->start_addr[i] + tbl->size[i] - 1;
i++;
diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h
index 983c6f7..f0702ca 100644
--- a/arch/powerpc/include/asm/config.h
+++ b/arch/powerpc/include/asm/config.h
@@ -14,13 +14,13 @@
#define HWCONFIG_BUFFER_SIZE 256
#endif
-#ifndef CONFIG_MAX_MEM_MAPPED
+#ifndef CFG_MAX_MEM_MAPPED
#if defined(CONFIG_E500) || \
defined(CONFIG_MPC86xx) || \
defined(CONFIG_E300)
-#define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30)
+#define CFG_MAX_MEM_MAPPED ((phys_size_t)2 << 30)
#else
-#define CONFIG_MAX_MEM_MAPPED (256 << 20)
+#define CFG_MAX_MEM_MAPPED (256 << 20)
#endif
#endif