Patchwork [U-Boot,v4,3/3] MX31: mx31pdk: Print the cause of reset

login
register
mail settings
Submitter Fabio Estevam
Date April 16, 2011, 2:54 a.m.
Message ID <1302922492-25505-3-git-send-email-festevam@gmail.com>
Download mbox | patch
Permalink /patch/91472/
State Superseded
Delegated to: Stefano Babic
Headers show

Comments

Fabio Estevam - April 16, 2011, 2:54 a.m.
Print the cause of reset and also change the board name to only 'MX31PDK'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx31pdk/mx31pdk.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Albert ARIBAUD - April 16, 2011, 3:34 a.m.
Le 16/04/2011 04:54, Fabio Estevam a écrit :
> Print the cause of reset and also change the board name to only 'MX31PDK'.
>
> Signed-off-by: Fabio Estevam<fabio.estevam@freescale.com>
> ---
>   board/freescale/mx31pdk/mx31pdk.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
> index 3f291fc..b21f7e5 100644
> --- a/board/freescale/mx31pdk/mx31pdk.c
> +++ b/board/freescale/mx31pdk/mx31pdk.c
> @@ -28,6 +28,7 @@
>   #include<netdev.h>
>   #include<asm/arch/clock.h>
>   #include<asm/arch/imx-regs.h>
> +#include<asm/arch/sys_proto.h>
>
>   DECLARE_GLOBAL_DATA_PTR;
>
> @@ -70,7 +71,7 @@ int board_init(void)
>
>   int checkboard(void)
>   {
> -	printf("Board: i.MX31 MAX PDK (3DS)\n");
> +	printf("Board: MX31PDK [%s]\n", get_reset_cause());
>   	return 0;
>   }
>

Maybe a clearer message, rather than just '[%s]', something like '[reset 
cause: %s]'?

Amicalement,

Patch

diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index 3f291fc..b21f7e5 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -28,6 +28,7 @@ 
 #include <netdev.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/arch/sys_proto.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -70,7 +71,7 @@  int board_init(void)
 
 int checkboard(void)
 {
-	printf("Board: i.MX31 MAX PDK (3DS)\n");
+	printf("Board: MX31PDK [%s]\n", get_reset_cause());
 	return 0;
 }