From patchwork Wed Apr 20 10:47:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Hui X-Patchwork-Id: 1123 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:49:19 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.148 with SMTP id r20cs109102qai; Wed, 20 Apr 2011 03:47:21 -0700 (PDT) Received: by 10.68.50.70 with SMTP id a6mr10246236pbo.25.1303296440616; Wed, 20 Apr 2011 03:47:20 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id a3si2444982pbm.185.2011.04.20.03.47.20 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Apr 2011 03:47:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) smtp.mail=jason.hui@linaro.org Received: by pzk2 with SMTP id 2so455508pzk.37 for ; Wed, 20 Apr 2011 03:47:20 -0700 (PDT) Received: by 10.68.24.3 with SMTP id q3mr104458pbf.195.1303296439946; Wed, 20 Apr 2011 03:47:19 -0700 (PDT) Received: from localhost.localdomain ([116.231.118.83]) by mx.google.com with ESMTPS id o6sm556867pbq.89.2011.04.20.03.47.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Apr 2011 03:47:19 -0700 (PDT) From: Jason Liu To: u-boot@lists.denx.de Cc: sbabic@denx.de Subject: [U-Boot][PATCH 1/1] mx5: drop boot cause code from board support code Date: Wed, 20 Apr 2011 18:47:03 +0800 Message-Id: <1303296425-14806-1-git-send-email-jason.hui@linaro.org> X-Mailer: git-send-email 1.7.0.4 The boot cause code has been factor out to soc common code,we need drop the part from the board support code Signed-off-by: Jason Liu --- board/efikamx/efikamx.c | 30 ++++++------------------------ board/freescale/mx51evk/mx51evk.c | 26 ++++++-------------------- board/freescale/mx53evk/mx53evk.c | 21 +-------------------- board/ttcontrol/vision2/vision2.c | 28 ++++++---------------------- 4 files changed, 19 insertions(+), 86 deletions(-) diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c index f735260..0aef654 100644 --- a/board/efikamx/efikamx.c +++ b/board/efikamx/efikamx.c @@ -644,46 +644,28 @@ 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 ["); + puts("3.0"); break; case CHIP_REV_2_5: - puts("2.5 ["); + puts("2.5"); break; case CHIP_REV_2_0: - puts("2.0 ["); + puts("2.0"); break; case CHIP_REV_1_1: - puts("1.1 ["); + puts("1.1"); break; case CHIP_REV_1_0: default: - puts("1.0 ["); + 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("\n"); return 0; } diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 02a765d..cff2ff1 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -435,37 +435,23 @@ int checkboard(void) switch (system_rev & 0xff) { case CHIP_REV_3_0: - puts("3.0 ["); + puts("3.0"); break; case CHIP_REV_2_5: - puts("2.5 ["); + puts("2.5"); break; case CHIP_REV_2_0: - puts("2.0 ["); + puts("2.0"); break; case CHIP_REV_1_1: - puts("1.1 ["); + puts("1.1"); break; case CHIP_REV_1_0: default: - puts("1.0 ["); + 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"); + puts("\n"); return 0; } diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c index e71701b..a89aa25 100644 --- a/board/freescale/mx53evk/mx53evk.c +++ b/board/freescale/mx53evk/mx53evk.c @@ -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; } diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c index f8ef4fc..8423110 100644 --- a/board/ttcontrol/vision2/vision2.c +++ b/board/ttcontrol/vision2/vision2.c @@ -708,40 +708,24 @@ int checkboard(void) switch (system_rev & 0xff) { case CHIP_REV_3_0: - puts("3.0 ["); + puts("3.0"); break; case CHIP_REV_2_5: - puts("2.5 ["); + puts("2.5"); break; case CHIP_REV_2_0: - puts("2.0 ["); + puts("2.0"); break; case CHIP_REV_1_1: - puts("1.1 ["); + puts("1.1"); break; case CHIP_REV_1_0: default: - puts("1.0 ["); + 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("\n"); return 0; }