// 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(0x0000, ®s->wcr); /* Write Service Sequence */ writew(0x5555, ®s->wsr); writew(0xAAAA, ®s->wsr); /* Enable watchdog */ writew(WCR_WDE, ®s->wcr); while (1); /*NOTREACHED*/ }