mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
mx5: board: code clean up for checkboard code
The boot cause code has been factor out to soc common code,we need drop the part from the board support code This patch also remove the redundant cpu version print Signed-off-by: Jason Liu <jason.hui@linaro.org>
This commit is contained in:
parent
c02d828059
commit
5195890440
4 changed files with 4 additions and 137 deletions
|
@ -643,47 +643,7 @@ int board_late_init(void)
|
|||
|
||||
int checkboard(void)
|
||||
{
|
||||
u32 system_rev = get_cpu_rev();
|
||||
u32 cause;
|
||||
struct src *src_regs = (struct src *)SRC_BASE_ADDR;
|
||||
|
||||
puts("Board: Efika MX ");
|
||||
|
||||
switch (system_rev & 0xff) {
|
||||
case CHIP_REV_3_0:
|
||||
puts("3.0 [");
|
||||
break;
|
||||
case CHIP_REV_2_5:
|
||||
puts("2.5 [");
|
||||
break;
|
||||
case CHIP_REV_2_0:
|
||||
puts("2.0 [");
|
||||
break;
|
||||
case CHIP_REV_1_1:
|
||||
puts("1.1 [");
|
||||
break;
|
||||
case CHIP_REV_1_0:
|
||||
default:
|
||||
puts("1.0 [");
|
||||
break;
|
||||
}
|
||||
|
||||
cause = src_regs->srsr;
|
||||
switch (cause) {
|
||||
case 0x0001:
|
||||
puts("POR");
|
||||
break;
|
||||
case 0x0009:
|
||||
puts("RST");
|
||||
break;
|
||||
case 0x0010:
|
||||
case 0x0011:
|
||||
puts("WDOG");
|
||||
break;
|
||||
default:
|
||||
printf("unknown 0x%x", cause);
|
||||
}
|
||||
puts("]\n");
|
||||
puts("Board: Efika MX\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -431,41 +431,7 @@ int board_late_init(void)
|
|||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("Board: MX51EVK ");
|
||||
puts("Board: MX51EVK\n");
|
||||
|
||||
switch (system_rev & 0xff) {
|
||||
case CHIP_REV_3_0:
|
||||
puts("3.0 [");
|
||||
break;
|
||||
case CHIP_REV_2_5:
|
||||
puts("2.5 [");
|
||||
break;
|
||||
case CHIP_REV_2_0:
|
||||
puts("2.0 [");
|
||||
break;
|
||||
case CHIP_REV_1_1:
|
||||
puts("1.1 [");
|
||||
break;
|
||||
case CHIP_REV_1_0:
|
||||
default:
|
||||
puts("1.0 [");
|
||||
break;
|
||||
}
|
||||
|
||||
switch (__raw_readl(SRC_BASE_ADDR + 0x8)) {
|
||||
case 0x0001:
|
||||
puts("POR");
|
||||
break;
|
||||
case 0x0009:
|
||||
puts("RST");
|
||||
break;
|
||||
case 0x0010:
|
||||
case 0x0011:
|
||||
puts("WDOG");
|
||||
break;
|
||||
default:
|
||||
puts("unknown");
|
||||
}
|
||||
puts("]\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -372,26 +372,7 @@ int board_late_init(void)
|
|||
|
||||
int checkboard(void)
|
||||
{
|
||||
u32 cause;
|
||||
struct src *src_regs = (struct src *)SRC_BASE_ADDR;
|
||||
puts("Board: MX53EVK\n");
|
||||
|
||||
puts("Board: MX53EVK [");
|
||||
|
||||
cause = src_regs->srsr;
|
||||
switch (cause) {
|
||||
case 0x0001:
|
||||
printf("POR");
|
||||
break;
|
||||
case 0x0009:
|
||||
printf("RST");
|
||||
break;
|
||||
case 0x0010:
|
||||
case 0x0011:
|
||||
printf("WDOG");
|
||||
break;
|
||||
default:
|
||||
printf("unknown");
|
||||
}
|
||||
printf("]\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -699,47 +699,7 @@ int board_late_init(void)
|
|||
|
||||
int checkboard(void)
|
||||
{
|
||||
u32 system_rev = get_cpu_rev();
|
||||
u32 cause;
|
||||
struct src *src_regs = (struct src *)SRC_BASE_ADDR;
|
||||
|
||||
puts("Board: TTControl Vision II CPU V");
|
||||
|
||||
switch (system_rev & 0xff) {
|
||||
case CHIP_REV_3_0:
|
||||
puts("3.0 [");
|
||||
break;
|
||||
case CHIP_REV_2_5:
|
||||
puts("2.5 [");
|
||||
break;
|
||||
case CHIP_REV_2_0:
|
||||
puts("2.0 [");
|
||||
break;
|
||||
case CHIP_REV_1_1:
|
||||
puts("1.1 [");
|
||||
break;
|
||||
case CHIP_REV_1_0:
|
||||
default:
|
||||
puts("1.0 [");
|
||||
break;
|
||||
}
|
||||
|
||||
cause = src_regs->srsr;
|
||||
switch (cause) {
|
||||
case 0x0001:
|
||||
puts("POR");
|
||||
break;
|
||||
case 0x0009:
|
||||
puts("RST");
|
||||
break;
|
||||
case 0x0010:
|
||||
case 0x0011:
|
||||
puts("WDOG");
|
||||
break;
|
||||
default:
|
||||
printf("unknown 0x%x", cause);
|
||||
}
|
||||
puts("]\n");
|
||||
puts("Board: TTControl Vision II CPU V\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue