All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Suniel Mahesh <sunil@amarulasolutions.com>
Cc: U-Boot-Denx <u-boot@lists.denx.de>
Subject: Re: Reset cause register for Allwinner H3/R16 SOC's
Date: Sun, 13 Jun 2021 23:14:11 +0100	[thread overview]
Message-ID: <20210613231411.7d4fb5db@slackpad.fritz.box> (raw)
In-Reply-To: <CAM+7aWu45dOEKzdEAW3bSFC7OvWy69Ye6R6qpw-jvefeS=mGow@mail.gmail.com>

On Sat, 12 Jun 2021 10:17:08 +0530
Suniel Mahesh <sunil@amarulasolutions.com> wrote:

> Hi All,
> 
> I am working on an Allwinner R16 and H3 based targets and I am implementing
> system update.
> 
> Is there any way(or a register) on Allwinner R16/H3 which can tell
> what is the cause
> of the reset(whether the reset is triggered by a watchdog or thermal
> or reset or a POR).

I don't think anybody found such an explicit gadget in Allwinner
chips before.
Besides, what would be the difference between watchdog, thermal and
reset? AFAIK those are all the same watchdog triggered reset, in the
last two cases deliberately triggered.
If you want to convey information across a reset, you can use the RTC
data registers: they survive a reset. So you can explicitly write some
reset cause indicator value into one of the registers, then read that
back after the reset.
For power-on-reset there might be some heuristics to tell it apart from
a mere reset (temperature, PMIC state, DRAM content?), but in
general the RTC register method should also work here.
So if you are happy to hack some board specifics into your firmware, it
should be doable, but there does not seem to be a generic mechanism
implemented into the SoC.

Cheers,
Andre





  reply	other threads:[~2021-06-13 22:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  4:47 Reset cause register for Allwinner H3/R16 SOC's Suniel Mahesh
2021-06-13 22:14 ` Andre Przywara [this message]
2021-06-14  4:37   ` Suniel Mahesh
2021-06-14  5:37     ` Samuel Holland

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=20210613231411.7d4fb5db@slackpad.fritz.box \
    --to=andre.przywara@arm.com \
    --cc=sunil@amarulasolutions.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 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.