From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- roms/u-boot/arch/arm/cpu/arm926ejs/mx25/reset.c | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 roms/u-boot/arch/arm/cpu/arm926ejs/mx25/reset.c (limited to 'roms/u-boot/arch/arm/cpu/arm926ejs/mx25/reset.c') diff --git a/roms/u-boot/arch/arm/cpu/arm926ejs/mx25/reset.c b/roms/u-boot/arch/arm/cpu/arm926ejs/mx25/reset.c new file mode 100644 index 000000000..7844a99c1 --- /dev/null +++ b/roms/u-boot/arch/arm/cpu/arm926ejs/mx25/reset.c @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH + * Marius Groeger + * + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH + * Alex Zuepke + * + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, + * + * (C) Copyright 2009 + * Ilya Yanok, Emcraft Systems Ltd, + */ + +#include +#include +#include +#include + +/* + * Reset the cpu by setting up the watchdog timer and let it time out + */ +void reset_cpu(void) +{ + struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE; + /* Disable watchdog and set Time-Out field to 0 */ + writew(0, ®s->wcr); + + /* Write Service Sequence */ + writew(WSR_UNLOCK1, ®s->wsr); + writew(WSR_UNLOCK2, ®s->wsr); + + /* Enable watchdog */ + writew(WCR_WDE, ®s->wcr); + + while (1) ; +} -- cgit 1.2.3-korg