2 * Cirrus Logic EP93xx CPU-specific support.
4 * Copyright (C) 2009 Matthias Kaehlcke <matthias@kaehlcke.net>
6 * Copyright (C) 2004, 2005
7 * Cory T. Tusar, Videon Central, Inc., <ctusar@videon-central.com>
9 * SPDX-License-Identifier: GPL-2.0+
13 #include <asm/arch/ep93xx.h>
16 /* We reset the CPU by generating a 1-->0 transition on DeviceCfg bit 31. */
17 extern void reset_cpu(ulong addr)
19 struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
22 /* Unlock DeviceCfg and set SWRST */
23 writel(0xAA, &syscon->sysswlock);
24 value = readl(&syscon->devicecfg);
25 value |= SYSCON_DEVICECFG_SWRST;
26 writel(value, &syscon->devicecfg);
28 /* Unlock DeviceCfg and clear SWRST */
29 writel(0xAA, &syscon->sysswlock);
30 value = readl(&syscon->devicecfg);
31 value &= ~SYSCON_DEVICECFG_SWRST;
32 writel(value, &syscon->devicecfg);