v7m.c 531 B

1234567891011121314151617181920
  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. void armv7m_restart(enum reboot_mode mode, const char *cmd)
  13. {
  14. dsb();
  15. __raw_writel(V7M_SCB_AIRCR_VECTKEY | V7M_SCB_AIRCR_SYSRESETREQ,
  16. BASEADDR_V7M_SCB + V7M_SCB_AIRCR);
  17. dsb();
  18. }