public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de, git@xilinx.com,
	Igor Opaniuk <igor.opaniuk@foundries.io>,
	Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH] cmd: boot: Update reset usage message
Date: Fri, 13 Aug 2021 08:54:20 +0200	[thread overview]
Message-ID: <634088.1628837660@gemini.denx.de> (raw)
In-Reply-To: <90e6c670-9e11-beb8-bcb5-9d22ba00fd11@xilinx.com>

Dear Michal,

In message <90e6c670-9e11-beb8-bcb5-9d22ba00fd11@xilinx.com> you wrote:
> 
> > In case of the hard (cold) reset - is it really only a reset of the
> > CPU, or of the whole board hardware?
>
> If you look at sysreset headers you will find these levels
>  11         SYSRESET_WARM,  /* Reset CPU, keep GPIOs active */
>  12         SYSRESET_COLD,  /* Reset CPU and GPIOs */
>  13         SYSRESET_POWER, /* Reset PMIC (remove and restore power) */
>  14         SYSRESET_POWER_OFF,     /* Turn off power */
>
> When you call reset sysreset uclass is calling sysreset_walk which is
> request to drivers with type passed.
> I see we have mixed drivers which deals with levels and especially in
> gpio case it is question how you connect it.
> I develop this for microblaze where gpio is connected reset logic which
> is normally only for CPU and subsystem.
> But in general you can connect whatever you want. It means it doesn't
> need to be only cpu which is reset.

Thanks a lot for the explanation.

> Do you want me to update that line and remove CPU from it?

I don't know :-)

What the "reset" command _should_ do is a hard cold boot including
the reset of all peripherals - for example, when booting from SPI
NOR flash it is mandatory to reset this flash to make sure the ROM
boot loader can actually read it.

I would appreciate if the help message documents what it actually
does.  Also, what the difference between "cold" and "warm" reset is.
My expectation (without knowing any hardware details) would be that
a warm reset is just a restart of the already loaded code? Or is it
just a reset of the CPU (without external reset)? This might then
hang the system if it's attempting to boot from a flash which is in
the wrong state.

So my problem with this is primarily that I don't understand what
the command really does, and the help command is of no help either.

[And if I understand correctly, this is even board dependent?]

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
How many NASA managers does it take to screw in a lightbulb?  "That's
a known problem... don't worry about it."

  reply	other threads:[~2021-08-13  6:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 10:04 [PATCH] cmd: boot: Update reset usage message Michal Simek
2021-08-12 15:52 ` Igor Opaniuk
2021-08-13  6:11 ` Wolfgang Denk
2021-08-13  6:30   ` Michal Simek
2021-08-13  6:54     ` Wolfgang Denk [this message]
2021-08-13  9:21       ` Michal Simek
2021-08-23  6:52 ` Michal Simek

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=634088.1628837660@gemini.denx.de \
    --to=wd@denx.de \
    --cc=git@xilinx.com \
    --cc=igor.opaniuk@foundries.io \
    --cc=michal.simek@xilinx.com \
    --cc=sjg@chromium.org \
    --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