From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] MX31: mx31pdk: Print the cause of reset
Date: Wed, 13 Apr 2011 13:08:00 +0200 [thread overview]
Message-ID: <m2y63e9zov.fsf@ohwell.denx.de> (raw)
In-Reply-To: <1302459471-12308-2-git-send-email-festevam@gmail.com> (Fabio Estevam's message of "Sun, 10 Apr 2011 15:17:51 -0300")
Hi Fabio,
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - Use 3 bits for rcsr mask
>
> board/freescale/mx31pdk/mx31pdk.c | 25 ++++++++++++++++++++++++-
> 1 files changed, 24 insertions(+), 1 deletions(-)
>
> diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
> index 4ef548f..5fc6319 100644
> --- a/board/freescale/mx31pdk/mx31pdk.c
> +++ b/board/freescale/mx31pdk/mx31pdk.c
> @@ -86,7 +86,30 @@ int board_late_init(void)
>
> int checkboard(void)
> {
> - printf("Board: i.MX31 MAX PDK (3DS)\n");
> + u32 cause;
> + struct clock_control_regs *ccm =
> + (struct clock_control_regs *)CCM_BASE;
> + puts("Board: MX31PDK [");
> +
> + cause = ccm->rcsr & 0x07;
> + switch (cause) {
> + case 0x0000:
> + puts("POR");
> + break;
> + case 0x0001:
> + puts("RST");
> + break;
> + case 0x0002:
> + puts("WDOG");
> + break;
> + case 0x0006:
> + puts("JTAG");
> + break;
> + default:
> + puts("unknown");
> + }
> +
> + puts("]\n");
> return 0;
> }
Didn't we agree to move this into CPU specific code so other i.MX31
boards will profit from it as well? Can you remind me why this does not
happen?
Cheers
Detlev
--
Don't trust everything you read, and don't assume every poster in
a thread is actually relevant to the problem.
-- Stefan Monnier <jwvlj1gk44h.fsf-monnier+emacs@gnu.org>
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2011-04-13 11:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 18:17 [U-Boot] [PATCH v2 1/2] MX31: mx31pdk: Add watchdog support Fabio Estevam
2011-04-10 18:17 ` [U-Boot] [PATCH v2 2/2] MX31: mx31pdk: Print the cause of reset Fabio Estevam
2011-04-13 11:08 ` Detlev Zundel [this message]
2011-04-26 0:54 ` [U-Boot] [PATCH v2 1/2] MX31: mx31pdk: Add watchdog support Fabio Estevam
2011-04-27 11:35 ` Detlev Zundel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2y63e9zov.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.