mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-01 12:01:31 +00:00
powerpc: Use print_size() where appropriate
Makes the startup output more consistent Signed-off-by: Shruti Kanetkar <Shruti@Freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Acked-by: York Sun <yorksun@freescale.com>
This commit is contained in:
parent
bf90256623
commit
2f848f97d7
4 changed files with 21 additions and 22 deletions
|
@ -45,12 +45,10 @@ int checkcpu (void)
|
||||||
return -1; /* no valid CPU revision info */
|
return -1; /* no valid CPU revision info */
|
||||||
}
|
}
|
||||||
|
|
||||||
printf (" at %s MHz:", strmhz (buf, clock));
|
printf (" at %s MHz: ", strmhz (buf, clock));
|
||||||
|
|
||||||
printf (" %u kB I-Cache", checkicache () >> 10);
|
print_size(checkicache(), " I-Cache ");
|
||||||
printf (" %u kB D-Cache", checkdcache () >> 10);
|
print_size(checkdcache(), " D-Cache\n");
|
||||||
|
|
||||||
puts ("\n");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,8 @@ static void enable_cpc(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Corenet Platform Cache: %d KB enabled\n", size);
|
puts("Corenet Platform Cache: ");
|
||||||
|
print_size(size * 1024, " enabled\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void invalidate_cpc(void)
|
static void invalidate_cpc(void)
|
||||||
|
@ -526,13 +527,14 @@ int cpu_init_r(void)
|
||||||
if (CONFIG_SYS_INIT_L2CSR0 & L2CSR0_L2E) {
|
if (CONFIG_SYS_INIT_L2CSR0 & L2CSR0_L2E) {
|
||||||
while (!(mfspr(SPRN_L2CSR0) & L2CSR0_L2E))
|
while (!(mfspr(SPRN_L2CSR0) & L2CSR0_L2E))
|
||||||
;
|
;
|
||||||
printf("%d KB enabled\n", (l2cfg0 & 0x3fff) * 64);
|
print_size((l2cfg0 & 0x3fff) * 64 * 1024, " enabled\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
skip_l2:
|
skip_l2:
|
||||||
#elif defined(CONFIG_SYS_FSL_QORIQ_CHASSIS2)
|
#elif defined(CONFIG_SYS_FSL_QORIQ_CHASSIS2)
|
||||||
if (l2cache->l2csr0 & L2CSR0_L2E)
|
if (l2cache->l2csr0 & L2CSR0_L2E)
|
||||||
printf("%d KB enabled\n", (l2cache->l2cfg0 & 0x3fff) * 64);
|
print_size((l2cache->l2cfg0 & 0x3fff) * 64 * 1024,
|
||||||
|
" enabled\n");
|
||||||
|
|
||||||
enable_cluster_l2();
|
enable_cluster_l2();
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -136,10 +136,8 @@ static int check_CPU (long clock, uint pvr, uint immr)
|
||||||
#else
|
#else
|
||||||
printf (" at %s MHz: ", strmhz (buf, clock));
|
printf (" at %s MHz: ", strmhz (buf, clock));
|
||||||
#endif
|
#endif
|
||||||
printf ("%u kB I-Cache %u kB D-Cache",
|
print_size(checkicache(), " I-Cache ");
|
||||||
checkicache () >> 10,
|
print_size(checkdcache(), " D-Cache");
|
||||||
checkdcache () >> 10
|
|
||||||
);
|
|
||||||
|
|
||||||
/* do we have a FEC (860T/P or 852/859/866/885)? */
|
/* do we have a FEC (860T/P or 852/859/866/885)? */
|
||||||
|
|
||||||
|
@ -204,10 +202,10 @@ static int check_CPU (long clock, uint pvr, uint immr)
|
||||||
printf ("unknown MPC857 (0x%08x)", k);
|
printf ("unknown MPC857 (0x%08x)", k);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf (" at %s MHz:", strmhz (buf, clock));
|
printf (" at %s MHz: ", strmhz (buf, clock));
|
||||||
|
|
||||||
printf (" %u kB I-Cache", checkicache () >> 10);
|
print_size(checkicache(), " I-Cache ");
|
||||||
printf (" %u kB D-Cache", checkdcache () >> 10);
|
print_size(checkdcache(), " D-Cache");
|
||||||
|
|
||||||
/* lets check and see if we're running on a 862T (or P?) */
|
/* lets check and see if we're running on a 862T (or P?) */
|
||||||
|
|
||||||
|
@ -265,10 +263,10 @@ static int check_CPU (long clock, uint pvr, uint immr)
|
||||||
if (suf)
|
if (suf)
|
||||||
printf ("PPC823ZTnn%s", suf);
|
printf ("PPC823ZTnn%s", suf);
|
||||||
|
|
||||||
printf (" at %s MHz:", strmhz (buf, clock));
|
printf (" at %s MHz: ", strmhz (buf, clock));
|
||||||
|
|
||||||
printf (" %u kB I-Cache", checkicache () >> 10);
|
print_size(checkicache(), " I-Cache ");
|
||||||
printf (" %u kB D-Cache", checkdcache () >> 10);
|
print_size(checkdcache(), " D-Cache");
|
||||||
|
|
||||||
/* lets check and see if we're running on a 860T (or P?) */
|
/* lets check and see if we're running on a 860T (or P?) */
|
||||||
|
|
||||||
|
@ -321,10 +319,10 @@ static int check_CPU (long clock, uint pvr, uint immr)
|
||||||
default:
|
default:
|
||||||
printf ("unknown MPC850 (0x%08x)", k);
|
printf ("unknown MPC850 (0x%08x)", k);
|
||||||
}
|
}
|
||||||
printf (" at %s MHz:", strmhz (buf, clock));
|
printf (" at %s MHz: ", strmhz (buf, clock));
|
||||||
|
|
||||||
printf (" %u kB I-Cache", checkicache () >> 10);
|
print_size(checkicache(), " I-Cache ");
|
||||||
printf (" %u kB D-Cache", checkdcache () >> 10);
|
print_size(checkdcache(), " D-Cache");
|
||||||
|
|
||||||
/* lets check and see if we're running on a 850T (or P?) */
|
/* lets check and see if we're running on a 850T (or P?) */
|
||||||
|
|
||||||
|
|
|
@ -683,7 +683,8 @@ phys_size_t fsl_ddr_sdram(void)
|
||||||
#if !defined(CONFIG_PHYS_64BIT)
|
#if !defined(CONFIG_PHYS_64BIT)
|
||||||
/* Check for 4G or more. Bad. */
|
/* Check for 4G or more. Bad. */
|
||||||
if (total_memory >= (1ull << 32)) {
|
if (total_memory >= (1ull << 32)) {
|
||||||
printf("Detected %lld MB of memory\n", total_memory >> 20);
|
puts("Detected ");
|
||||||
|
print_size(total_memory, " of memory\n");
|
||||||
printf(" This U-Boot only supports < 4G of DDR\n");
|
printf(" This U-Boot only supports < 4G of DDR\n");
|
||||||
printf(" You could rebuild it with CONFIG_PHYS_64BIT\n");
|
printf(" You could rebuild it with CONFIG_PHYS_64BIT\n");
|
||||||
printf(" "); /* re-align to match init_func_ram print */
|
printf(" "); /* re-align to match init_func_ram print */
|
||||||
|
|
Loading…
Add table
Reference in a new issue