From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] ARM: MX31: print WRSR to indicate the source of the last reset
Date: Sat, 12 Mar 2011 14:15:39 +0100 [thread overview]
Message-ID: <20110312141539.24b360ed@wker> (raw)
In-Reply-To: <4D78E945.1080407@denx.de>
On Thu, 10 Mar 2011 16:07:49 +0100
Stefano Babic <sbabic@denx.de> wrote:
> On 03/10/2011 11:53 AM, Anatolij Gustschin wrote:
> > Add output of the WRSR register content while booting so that
> > we can see the source of the last reset.
> >
> > Signed-off-by: Anatolij Gustschin <agust@denx.de>
>
> Hi Antolij,
Hi Stefano,
...
> > + printf("CPU: Freescale i.MX31 at %d MHz (WRSR=0x%04x)\n",
> > + mx31_get_mcu_main_clk() / 1000000, wdog->wrsr);
>
> Why is it better to use the wrsr register instead of the rcsr register ?
> We are actually using the rcsr register for other i.MX processors
> (MX51/MX53/MX35). And if we want to print the reset cause, I think it
> should be better to write directly the cause as string instead of the
> register value.
The reason for using wrsr register is that when reading this register,
we can also recognize the software reset cause (SWFT, bit 0 is set).
In our use case we have this requirement. U-Boot and Linux for iMX31
assert system reset by clearing SRS bit in wcr. This software reset
is reported by SWFT in the wrsr register. When I read rcsr after a
software reset, I always get watchdog timeout reset cause (probably
because the reset was performed by writing to the watchdog module
register wcr). But actually this reset was a software reset.
I'm fine with using strings for reset cause if there is no objection.
> I do not think printing the reset cause should be implemented in
> print_cpuinfo(), because it manages a different issue (reset cause
> against CPU information). The print_cpuinfo() should have only CPU
> related values, as clock values, and so on, as it is implemented now for
> this and other processors. Better to add a different function for the
> reset cause.
Were should we call this different function? Should be put it
into init_sequence[]?
Best regards,
Anatolij
next prev parent reply other threads:[~2011-03-12 13:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 10:53 [U-Boot] [PATCH 1/2] ARM: MX31: print WRSR to indicate the source of the last reset Anatolij Gustschin
2011-03-10 13:47 ` Fabio Estevam
2011-03-12 13:22 ` Anatolij Gustschin
2011-03-10 15:07 ` Stefano Babic
2011-03-12 13:15 ` Anatolij Gustschin [this message]
2011-03-14 11:55 ` Stefano Babic
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=20110312141539.24b360ed@wker \
--to=agust@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox