blob: 4d2cba94f5ccb2d8077f0ecad5aedcaebab9eda3 [file] [log] [blame]
Uwe Kleine-König6a7d2c62013-08-27 21:15:02 +01001/*
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
13void 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}