From: Bill Pringlemeir <bpringlemeir@nbsps.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] imx: don't clobber reset cause
Date: Tue, 10 Feb 2015 13:08:19 -0500 [thread overview]
Message-ID: <87mw4lvdv0.fsf@nbsps.com> (raw)
In-Reply-To: <54DA3D8B.30008@boundarydevices.com> (Eric Nelson's message of "Tue, 10 Feb 2015 10:19:07 -0700")
On 10 Feb 2015, eric.nelson at boundarydevices.com wrote:
> I posted a couple of additional options and received no comment
> from you.
> Neither of them works as-is because of the ordering of events
> (print_cpuinfo() is called before restoring the environment),
> so your suggestion would require an additional call at startup
> which currently doesn't exist across i.MX boards.
> The primary argument against the original patch was that
> bits **could** accumulate. In practice, I believe this to
> be a bit of a red herring, since two bits cover essentially
> all of the normal conditions:
> bit 0 - power on
> bit 4 - watchdog
Yes, the normal case is easy. Odd things can happen during software
development. We both agree you could miss something; maybe only whether
that is important is not clear. People using the CSU to protect errant
memory writes to disabled peripherals might be useful. From the imx6
RM,
Software has to take care to clear this register by writing one
after every reset that occurs so that the register will contain the
information of recently occurred reset.
> The watchdog flag is set with reboot under Linux and reset
> in U-Boot, so we could re-work the switch statement to do
> the right thing. In fact, it appears broken now because it
> has 0x11 displaying "POR", when I believe that should be
> "WDOG".
I am pretty sure that the register is full of garbage on a 'POR', so the
'POR' bit overrides everything; at least on the Vybrid. This is why it
is important to clear the bits. The imx6DL-RM seems to say the same,
When the system comes out of reset, this register will have bits set
corresponding to all the reset sources that occurred during system
reset.
> Other bits could conceivably accumulate, but I don't see
> the value of worrying about cases like "JTAG_RESET".
> The reason we're pursuing this at all is because we'd like
> to know the difference between a restart caused by power
> interruption and a system lockup, and we'd like to do
> this under Linux or Windows Embedded.
Please don't mis-understand. I see value in what you are trying to
accomplish. I just want to make sure the information that gets reported
is robust and correct. It would probably be nice if the Vybrid followed
the same pattern; but maybe they are different? From reading the RMs
they seem the same.
Regards,
Bill Pringlemeir.
next prev parent reply other threads:[~2015-02-10 18:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 21:51 [U-Boot] [PATCH] imx: don't clobber reset cause Eric Nelson
2015-02-05 16:17 ` Stefano Babic
2015-02-05 16:28 ` Bill Pringlemeir
2015-02-05 17:16 ` Eric Nelson
2015-02-05 17:19 ` Stefano Babic
2015-02-05 17:22 ` Eric Nelson
2015-02-05 17:52 ` Stefano Babic
2015-02-05 18:22 ` Eric Nelson
2015-02-05 18:49 ` Stefano Babic
2015-02-05 22:57 ` [U-Boot] [PATCH] imx: save reset cause in 'reset_cause' environment variable Eric Nelson
2015-02-06 20:36 ` Eric Nelson
2015-02-05 22:58 ` Eric Nelson
2015-02-05 23:06 ` Troy Kisky
2015-02-05 23:14 ` Eric Nelson
2015-02-05 23:17 ` Bill Pringlemeir
2015-02-06 20:40 ` Eric Nelson
2015-02-06 20:56 ` Bill Pringlemeir
2015-02-05 23:01 ` [U-Boot] [PATCH] imx: don't clobber reset cause Eric Nelson
2015-02-05 23:17 ` Troy Kisky
2015-02-10 17:19 ` Eric Nelson
2015-02-10 18:08 ` Bill Pringlemeir [this message]
2015-02-11 9:07 ` Stefano Babic
2015-02-11 14:45 ` Eric Nelson
2015-02-15 21:37 ` [U-Boot] [PATCH 1/2] ARM: i.MX: provide access to reset cause through get_imx_reset_cause() Eric Nelson
2015-02-15 21:37 ` [U-Boot] [PATCH 2/2] nitrogen6x: set environment variable reset_cause Eric Nelson
2015-02-17 9:34 ` Stefano Babic
2015-02-17 9:54 ` Stefano Babic
2015-02-17 9:54 ` [U-Boot] [PATCH 1/2] ARM: i.MX: provide access to reset cause through get_imx_reset_cause() 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=87mw4lvdv0.fsf@nbsps.com \
--to=bpringlemeir@nbsps.com \
--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