xref: /openbmc/linux/arch/arm/kernel/v7m.c (revision 56a0eccd)
1 /*
2  * Copyright (C) 2013 Uwe Kleine-Koenig for Pengutronix
3  *
4  * This program is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License version 2 as published by the
6  * Free Software Foundation.
7  */
8 #include <linux/io.h>
9 #include <linux/reboot.h>
10 #include <asm/barrier.h>
11 #include <asm/v7m.h>
12 
13 void armv7m_restart(enum reboot_mode mode, const char *cmd)
14 {
15 	dsb();
16 	__raw_writel(V7M_SCB_AIRCR_VECTKEY | V7M_SCB_AIRCR_SYSRESETREQ,
17 			BASEADDR_V7M_SCB + V7M_SCB_AIRCR);
18 	dsb();
19 }
20