
On 10/01/2020 22.48, Tom Rini wrote:
On Thu, Nov 28, 2019 at 09:56:47AM +0100, Claudius Heine wrote:
In case CONFIG_SYSRESET is set, do_reset from reset.c will not be available anywere, even if SYSRESET is disabled for SPL/TPL.
'do_reset' is called from SPL for instance from the panic handler and PANIC_HANG is not set
Signed-off-by: Claudius Heine ch@denx.de Reviewed-by: Marek Vasut marex@denx.de Reviewed-by: Simon Goldschmidt simon.k.r.goldschmidt@gmail.com
arch/arm/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 9de9a9acee..7bf2c077ba 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -56,7 +56,7 @@ obj-y += interrupts_64.o else obj-y += interrupts.o endif -ifndef CONFIG_SYSRESET +ifndef CONFIG_$(SPL_TPL_)SYSRESET obj-y += reset.o endif
This needs to be updated and something reworked as it breaks imx8mp_evk imx8mn_ddr4_evk imx8mm_evk platforms that have since been added: board/freescale/imx8mm_evk/built-in.o: In function `do_reset': build/../board/freescale/imx8mm_evk/spl.c:164: multiple definition of `do_reset' and similar failures.
It seems the imx8mm_evk and imx8mn_evk are the first platforms that implement a 'do_reset' within its board files.
That means we then no longer have just two binary options where the 'do_reset' implementation originates from. Before that platform we only had the ARM cpu reset and the sysreset driver.
That means if 'CONFIG_$(SPL_TPL_)SYSRESET == n' we cannot automatically use the ARM platform reset.
We will probably need additional kconfig options to express this situation.
The question is, should we do that, or rather investigate why those platforms need their own implementation?
Is it not possible to use the sysreset or arm reset driver there?
Or PCSI via ATF?