Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Uwe Kleine-König | 6a7d2c6 | 2013-08-27 21:15:02 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013 Uwe Kleine-Koenig for Pengutronix |
Uwe Kleine-König | 6a7d2c6 | 2013-08-27 21:15:02 +0100 | [diff] [blame] | 4 | */ |
| 5 | #include <linux/io.h> |
| 6 | #include <linux/reboot.h> |
| 7 | #include <asm/barrier.h> |
| 8 | #include <asm/v7m.h> |
| 9 | |
| 10 | void armv7m_restart(enum reboot_mode mode, const char *cmd) |
| 11 | { |
| 12 | dsb(); |
| 13 | __raw_writel(V7M_SCB_AIRCR_VECTKEY | V7M_SCB_AIRCR_SYSRESETREQ, |
| 14 | BASEADDR_V7M_SCB + V7M_SCB_AIRCR); |
| 15 | dsb(); |
| 16 | } |