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