Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Copyright (C) 2013 Uwe Kleine-Koenig for Pengutronix
0004  */
0005 #include <linux/io.h>
0006 #include <linux/reboot.h>
0007 #include <asm/barrier.h>
0008 #include <asm/v7m.h>
0009 
0010 void armv7m_restart(enum reboot_mode mode, const char *cmd)
0011 {
0012     dsb();
0013     __raw_writel(V7M_SCB_AIRCR_VECTKEY | V7M_SCB_AIRCR_SYSRESETREQ,
0014             BASEADDR_V7M_SCB + V7M_SCB_AIRCR);
0015     dsb();
0016 }