]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx5: board: code clean up for checkboard code
authorJason Liu <jason.hui@linaro.org>
Fri, 22 Apr 2011 02:55:42 +0000 (02:55 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Mon, 23 May 2011 06:36:46 +0000 (08:36 +0200)
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>
board/efikamx/efikamx.c
board/freescale/mx51evk/mx51evk.c
board/freescale/mx53evk/mx53evk.c
board/ttcontrol/vision2/vision2.c

index f7352608b55f7e07b7ad0ca1337cf5a7522a1459..16be532f14abef81da083d75df08d60891a4703d 100644 (file)
@@ -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;
 }
index 02a765dcfba3bf80668547b8338e7f37d7805507..e2d3d74a29bd44e5f5d2770e17ec872f7a15f2fd 100644 (file)
@@ -431,41 +431,7 @@ int board_late_init(void)
 
 int checkboard(void)
 {
-       puts("Board: MX51EVK ");
-
-       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;
-       }
+       puts("Board: MX51EVK\n");
 
-       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;
 }
index e71701bcb62010a313e15e52aeb7277080e4d7c5..a89aa25b06ae4ea972b613c2211bbbf0f1faa254 100644 (file)
@@ -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;
 }
index 0a3789cacc0902efc30400d53a921a9a212ab354..8e6ad745a61227724b870e68caee250eb1f1ea9b 100644 (file)
@@ -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;
 }