All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Seiler <hws@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 0/3] ARM: Fix reset in SPL if SYSRESET is not used
Date: Wed,  4 Mar 2020 15:23:09 +0100	[thread overview]
Message-ID: <cover.1583328917.git.hws@denx.de> (raw)

Hello,

continuing on the discussion around Claudius' patch for fixing reset in SPL [1]
we have taken a closer look at the issue.  To quickly summarize the situation:

    The original patch was to enable the generic ARM implementation of
    `do_reset` if CONFIG_SYSRESET is not enabled in SPL.  This would break
    compilation for some boards which define their own `do_reset` in
    `board/*/spl.c`.

    To be more specific, the following 4 boards have this custom `do_reset`:

        - toradex/verdin-imx8mm
        - freescale/imx8mn_evk
        - freescale/imx8mm_evk
        - freescale/imx8mp_evk

I hope we can all agree that `do_reset` is not at all meant to be implemented
in board files.  From looking at the related code for imx8m, it feels like this
was just a workaround hack to archieve the same thing which Claudius has fixed.
So this patch series reverts the addition of `do_reset` implementations in
imx8m board files and instead switches to using the proper fix provided by
Claudius.


Additionally, the custom do_reset implementations were passing an address
(WDOG1_BASE_ADDR) to `reset_cpu()` instead of 0.  This is the only place in the
entire U-Boot tree where this happens.  Instead, all other implementations
simply ignore the parameter and 0 is passed by callers.  It looks a lot like
this is a legacy left-over which makes me think that using it for a (hard-coded)
watchdog address is not a good idea as it breaks convention with the rest of
U-Boot.

[1]: https://patchwork.ozlabs.org/patch/1201959 

Claudius Heine (3):
  ARM: reset: use do_reset in SPL/TPL if SYSRESET was not enabled for
    them
  imx: imx8m*: Remove do_reset from board files
  imx: imx8m: Don't use the addr parameter of reset_cpu

 arch/arm/lib/Makefile             | 2 +-
 arch/arm/mach-imx/imx8m/soc.c     | 5 +----
 board/freescale/imx8mm_evk/spl.c  | 9 ---------
 board/freescale/imx8mn_evk/spl.c  | 9 ---------
 board/freescale/imx8mp_evk/spl.c  | 9 ---------
 board/toradex/verdin-imx8mm/spl.c | 9 ---------
 6 files changed, 2 insertions(+), 41 deletions(-)

-- 
Harald

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-62  Fax: +49-8142-66989-80   Email: hws at denx.de

             reply	other threads:[~2020-03-04 14:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04 14:23 Harald Seiler [this message]
2020-03-04 14:23 ` [PATCH 1/3] ARM: reset: use do_reset in SPL/TPL if SYSRESET was not enabled for them Harald Seiler
2020-03-04 14:26   ` Marek Vasut
2020-05-01 16:31   ` sbabic at denx.de
2020-03-04 14:23 ` [PATCH 2/3] imx: imx8m*: Remove do_reset from board files Harald Seiler
2020-03-04 14:29   ` Marek Vasut
2020-05-01 16:33   ` sbabic at denx.de
2020-03-04 14:23 ` [PATCH 3/3] imx: imx8m: Don't use the addr parameter of reset_cpu Harald Seiler
2020-03-04 14:30   ` Marek Vasut
2020-03-04 14:35     ` Harald Seiler
2020-05-01 16:32   ` sbabic at denx.de
2020-04-23 11:18 ` [PATCH 0/3] ARM: Fix reset in SPL if SYSRESET is not used Harald Seiler
2020-04-23 11:23   ` 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=cover.1583328917.git.hws@denx.de \
    --to=hws@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 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.