omap3-restart.c 906 B

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * omap3-restart.c - Code common to all OMAP3xxx machines.
  4. *
  5. * Copyright (C) 2009, 2012 Texas Instruments
  6. * Copyright (C) 2010 Nokia Corporation
  7. * Tony Lindgren <[email protected]>
  8. * Santosh Shilimkar <[email protected]>
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/init.h>
  12. #include <linux/reboot.h>
  13. #include "common.h"
  14. #include "control.h"
  15. #include "prm.h"
  16. /* Global address base setup code */
  17. /**
  18. * omap3xxx_restart - trigger a software restart of the SoC
  19. * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
  20. * @cmd: passed from the userspace program rebooting the system (if provided)
  21. *
  22. * Resets the SoC. For @cmd, see the 'reboot' syscall in
  23. * kernel/sys.c. No return value.
  24. */
  25. void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
  26. {
  27. omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
  28. omap_prm_reset_system();
  29. }