2 * (c) 2015 Purna Chandra Mandal <purna.mandal@microchip.com>
4 * SPDX-License-Identifier: GPL-2.0+
10 #include <mach/pic32.h>
13 #define UNLOCK_KEY1 0xaa996655
14 #define UNLOCK_KEY2 0x556699aa
19 void _machine_restart(void)
23 base = pic32_get_syscfg_base();
26 writel(LOCK_KEY, base + SYSKEY);
27 writel(UNLOCK_KEY1, base + SYSKEY);
28 writel(UNLOCK_KEY2, base + SYSKEY);
31 writel(0x1, base + RSWRST);
32 (void) readl(base + RSWRST);