Skip to content
Snippets Groups Projects
Commit f165bc35 authored by York Sun's avatar York Sun
Browse files

powerpc/corenet: Move RCW print to cpu.c


The RCW print is common for all corenet platforms. Not necessary to ducplicate
in each board file.

Signed-off-by: default avatarYork Sun <yorksun@freescale.com>
parent bc480451
No related branches found
No related tags found
No related merge requests found
...@@ -44,10 +44,10 @@ int checkcpu (void) ...@@ -44,10 +44,10 @@ int checkcpu (void)
uint major, minor; uint major, minor;
struct cpu_type *cpu; struct cpu_type *cpu;
char buf1[32], buf2[32]; char buf1[32], buf2[32];
#if (defined(CONFIG_DDR_CLK_FREQ) || \ #if defined(CONFIG_DDR_CLK_FREQ) || defined(CONFIG_FSL_CORENET)
defined(CONFIG_FSL_CORENET)) && !defined(CONFIG_SYS_FSL_QORIQ_CHASSIS2) ccsr_gur_t __iomem *gur =
volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); (void __iomem *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
#endif /* CONFIG_FSL_CORENET */ #endif
/* /*
* Cornet platforms use ddr sync bit in RCW to indicate sync vs async * Cornet platforms use ddr sync bit in RCW to indicate sync vs async
...@@ -211,6 +211,21 @@ int checkcpu (void) ...@@ -211,6 +211,21 @@ int checkcpu (void)
puts("L1: D-cache 32 kB enabled\n I-cache 32 kB enabled\n"); puts("L1: D-cache 32 kB enabled\n I-cache 32 kB enabled\n");
#ifdef CONFIG_FSL_CORENET
/* Display the RCW, so that no one gets confused as to what RCW
* we're actually using for this boot.
*/
puts("Reset Configuration Word (RCW):");
for (i = 0; i < ARRAY_SIZE(gur->rcwsr); i++) {
u32 rcw = in_be32(&gur->rcwsr[i]);
if ((i % 4) == 0)
printf("\n %08x:", i * 4);
printf(" %08x", rcw);
}
puts("\n");
#endif
return 0; return 0;
} }
......
...@@ -35,8 +35,6 @@ int checkboard(void) ...@@ -35,8 +35,6 @@ int checkboard(void)
char buf[64]; char buf[64];
u8 sw; u8 sw;
struct cpu_type *cpu = gd->arch.cpu; struct cpu_type *cpu = gd->arch.cpu;
ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
unsigned int i;
static const char *const freq[] = {"100", "125", "156.25", "161.13", static const char *const freq[] = {"100", "125", "156.25", "161.13",
"122.88", "122.88", "122.88"}; "122.88", "122.88", "122.88"};
int clock; int clock;
...@@ -61,19 +59,6 @@ int checkboard(void) ...@@ -61,19 +59,6 @@ int checkboard(void)
/* the timestamp string contains "\n" at the end */ /* the timestamp string contains "\n" at the end */
printf(" on %s", qixis_read_time(buf)); printf(" on %s", qixis_read_time(buf));
/* Display the RCW, so that no one gets confused as to what RCW
* we're actually using for this boot.
*/
puts("Reset Configuration Word (RCW):");
for (i = 0; i < ARRAY_SIZE(gur->rcwsr); i++) {
u32 rcw = in_be32(&gur->rcwsr[i]);
if ((i % 4) == 0)
printf("\n %08x:", i * 4);
printf(" %08x", rcw);
}
puts("\n");
/* /*
* Display the actual SERDES reference clocks as configured by the * Display the actual SERDES reference clocks as configured by the
* dip switches on the board. Note that the SWx registers could * dip switches on the board. Note that the SWx registers could
......
...@@ -27,8 +27,10 @@ int checkboard (void) ...@@ -27,8 +27,10 @@ int checkboard (void)
{ {
u8 sw; u8 sw;
struct cpu_type *cpu = gd->arch.cpu; struct cpu_type *cpu = gd->arch.cpu;
ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; #if defined(CONFIG_P3041DS) || defined(CONFIG_P5020DS) || \
defined(CONFIG_P5040DS)
unsigned int i; unsigned int i;
#endif
static const char * const freq[] = {"100", "125", "156.25", "212.5" }; static const char * const freq[] = {"100", "125", "156.25", "212.5" };
printf("Board: %sDS, ", cpu->name); printf("Board: %sDS, ", cpu->name);
...@@ -47,19 +49,6 @@ int checkboard (void) ...@@ -47,19 +49,6 @@ int checkboard (void)
else else
printf("invalid setting of SW%u\n", PIXIS_LBMAP_SWITCH); printf("invalid setting of SW%u\n", PIXIS_LBMAP_SWITCH);
/* Display the RCW, so that no one gets confused as to what RCW
* we're actually using for this boot.
*/
puts("Reset Configuration Word (RCW):");
for (i = 0; i < ARRAY_SIZE(gur->rcwsr); i++) {
u32 rcw = in_be32(&gur->rcwsr[i]);
if ((i % 4) == 0)
printf("\n %08x:", i * 4);
printf(" %08x", rcw);
}
puts("\n");
/* Display the actual SERDES reference clocks as configured by the /* Display the actual SERDES reference clocks as configured by the
* dip switches on the board. Note that the SWx registers could * dip switches on the board. Note that the SWx registers could
* technically be set to force the reference clocks to match the * technically be set to force the reference clocks to match the
......
...@@ -28,7 +28,6 @@ int checkboard(void) ...@@ -28,7 +28,6 @@ int checkboard(void)
{ {
u8 sw; u8 sw;
struct cpu_type *cpu = gd->arch.cpu; struct cpu_type *cpu = gd->arch.cpu;
ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
unsigned int i; unsigned int i;
printf("Board: %sRDB, ", cpu->name); printf("Board: %sRDB, ", cpu->name);
...@@ -38,20 +37,6 @@ int checkboard(void) ...@@ -38,20 +37,6 @@ int checkboard(void)
sw = CPLD_READ(fbank_sel); sw = CPLD_READ(fbank_sel);
printf("vBank: %d\n", sw & 0x1); printf("vBank: %d\n", sw & 0x1);
/*
* Display the RCW, so that no one gets confused as to what RCW
* we're actually using for this boot.
*/
puts("Reset Configuration Word (RCW):");
for (i = 0; i < ARRAY_SIZE(gur->rcwsr); i++) {
u32 rcw = in_be32(&gur->rcwsr[i]);
if ((i % 4) == 0)
printf("\n %08x:", i * 4);
printf(" %08x", rcw);
}
puts("\n");
/* /*
* Display the actual SERDES reference clocks as configured by the * Display the actual SERDES reference clocks as configured by the
* dip switches on the board. Note that the SWx registers could * dip switches on the board. Note that the SWx registers could
......
...@@ -43,7 +43,6 @@ int checkboard(void) ...@@ -43,7 +43,6 @@ int checkboard(void)
char buf[64]; char buf[64];
u8 sw; u8 sw;
struct cpu_type *cpu = gd->arch.cpu; struct cpu_type *cpu = gd->arch.cpu;
ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
unsigned int i; unsigned int i;
printf("Board: %sQDS, ", cpu->name); printf("Board: %sQDS, ", cpu->name);
...@@ -68,19 +67,6 @@ int checkboard(void) ...@@ -68,19 +67,6 @@ int checkboard(void)
/* the timestamp string contains "\n" at the end */ /* the timestamp string contains "\n" at the end */
printf(" on %s", qixis_read_time(buf)); printf(" on %s", qixis_read_time(buf));
/* Display the RCW, so that no one gets confused as to what RCW
* we're actually using for this boot.
*/
puts("Reset Configuration Word (RCW):");
for (i = 0; i < ARRAY_SIZE(gur->rcwsr); i++) {
u32 rcw = in_be32(&gur->rcwsr[i]);
if ((i % 4) == 0)
printf("\n %08x:", i * 4);
printf(" %08x", rcw);
}
puts("\n");
/* /*
* Display the actual SERDES reference clocks as configured by the * Display the actual SERDES reference clocks as configured by the
* dip switches on the board. Note that the SWx registers could * dip switches on the board. Note that the SWx registers could
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment