[PATCH 1/5] ARM: imx: Do not define do_reset() if sysreset is enabled

Harald Seiler hws at denx.de
Wed Apr 29 10:57:15 CEST 2020


Hello Marek,

On Wed, 2020-04-29 at 00:26 +0200, Marek Vasut wrote:
> On 4/28/20 11:23 PM, Harald Seiler wrote:
> > Hello Marek,
> 
> Hi,
> 
> > On Tue, 2020-04-28 at 16:22 +0200, Marek Vasut wrote:
> > > The SPL can also be compiled with sysreset drivers just fine, so
> > > update the condition to cater for that option.
> > 
> > Me and Claudius solved the same problem in a different way a while back
> > (see [1] and [2]).
> > 
> > The two approaches overlap but both contain some unique code that is
> > useful.  I'll merge the two patchsets and send them anew if that is ok
> > with you.
> 
> Can you be more specific about what is your plan ?
> 
> Since the MX8M already has DM enabled in SPL for quite a few things and
> has enough SRAM space left, I would be inclined to just go with DM-based
> implementation of the reset over a non-DM one.

For me personally, the patch I care most about is the first of Claudius
and my series ("ARM: reset: use do_reset in SPL/TPL if SYSRESET was not
enabled for them") [1].  It is necessary to make SPL_USB_SDP_SUPPORT work
on the DH imx6 board (which does not use SYSRESET in SPL at the moment).

As this patch breaks the imx8m* boards in their present form, we tried
fixing them in their current non-DM state in "imx: imx8m*: Remove do_reset
from board files" [2] and "imx: imx8m: Don't use the addr parameter of
reset_cpu" [3].  These patches are theoretically superseeded by your
series which solves the problem much better and more future-proof.
But I think it would not hurt to pull in Claudius and my changes as well
so the non-DM version isn't lying around, silently broken.

Additionally, "imx: imx8m: Don't use the addr parameter of reset_cpu" [3]
is groundwork for removing this addr parameter altogether from the whole
tree which I want to do after this imx8 story is over.

So to summarize, the final state I'd want is this:

    - "ARM: reset: use do_reset in SPL/TPL if SYSRESET was not enabled for
      them" is applied for my own needs.
    - No board defines do_reset().
    - The imx8m boards use DM_SYSRESET in SPL (from your patches).
    - The non-DM reset code for imx8 is also fixed, even though it is not
      used in any mainline board anymore.

[1]: https://patchwork.ozlabs.org/project/uboot/patch/62c163018998fcf476f0ad2edf83d1787d69445d.1583328917.git.hws@denx.de/
[2]: https://patchwork.ozlabs.org/project/uboot/patch/25277ba3658920ff3be7464020438070844f05da.1583328917.git.hws@denx.de/
[3]: https://patchwork.ozlabs.org/project/uboot/patch/b31a2cbb66950bff2e09ab07b710d53d9d46cf09.1583328917.git.hws@denx.de/
-- 
Harald



More information about the U-Boot mailing list