public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 4/4] reset: Remove addr parameter from reset_cpu()
Date: Wed, 3 Mar 2021 14:08:38 -0500	[thread overview]
Message-ID: <20210303190838.GM1310@bill-the-cat> (raw)
In-Reply-To: <2d9ece4576e9ed07b8c8dd7a809ea565cc106317.1608045173.git.hws@denx.de>

On Tue, Dec 15, 2020 at 04:47:52PM +0100, Harald Seiler wrote:

> Historically, the reset_cpu() function had an `addr` parameter which was
> meant to pass in an address of the reset vector location, where the CPU
> should reset to.  This feature is no longer used anywhere in U-Boot as
> all reset_cpu() implementations now ignore the passed value.  Generic
> code has been added which always calls reset_cpu() with `0` which means
> this feature can no longer be used easily anyway.
> 
> Over time, many implementations seem to have "misunderstood" the
> existence of this parameter as a way to customize/parameterize the reset
> (e.g.  COLD vs WARM resets).  As this is not properly supported, the
> code will almost always not do what it is intended to (because all
> call-sites just call reset_cpu() with 0).
> 
> To avoid confusion and to clean up the codebase from unused left-overs
> of the past, remove the `addr` parameter entirely.  Code which intends
> to support different kinds of resets should be rewritten as a sysreset
> driver instead.
> 
> This transformation was done with the following coccinelle patch:
> 
>     @@
>     expression argvalue;
>     @@
>     - reset_cpu(argvalue)
>     + reset_cpu()
> 
>     @@
>     identifier argname;
>     type argtype;
>     @@
>     - reset_cpu(argtype argname)
>     + reset_cpu(void)
>     { ... }
> 
> Signed-off-by: Harald Seiler <hws@denx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210303/c63bd425/attachment.sig>

  parent reply	other threads:[~2021-03-03 19:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 15:47 [PATCH 0/4] Remove addr parameter from reset_cpu() Harald Seiler
2020-12-15 15:47 ` [PATCH 1/4] nds32: Remove dead reset_cpu() implementation Harald Seiler
2020-12-19  2:28   ` Simon Glass
     [not found]   ` <752D002CFF5D0F4FA35C0100F1D73F3FB28D18D9@ATCPCS16.andestech.com>
2020-12-21  0:33     ` Rick Chen
2021-03-03 19:07   ` Tom Rini
2020-12-15 15:47 ` [PATCH 2/4] board: ns3: Remove superfluous reset logic Harald Seiler
2020-12-19  2:28   ` Simon Glass
2021-03-03 19:08   ` Tom Rini
2020-12-15 15:47 ` [PATCH 3/4] Revert "lpc32xx: cpu: add support for soft reset" Harald Seiler
2020-12-15 17:29   ` Sylvain Lemieux
2020-12-17 10:09     ` Harald Seiler
2020-12-17 14:33       ` Sylvain Lemieux
2021-03-03 19:08   ` Tom Rini
2020-12-15 15:47 ` [PATCH 4/4] reset: Remove addr parameter from reset_cpu() Harald Seiler
2020-12-19  2:28   ` Simon Glass
2021-03-03 19:08   ` Tom Rini [this message]
2021-03-02 11:35 ` [PATCH 0/4] " Harald Seiler
2021-03-05  4:08   ` Simon Glass

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=20210303190838.GM1310@bill-the-cat \
    --to=trini@konsulko.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