arch/imxrt : Support board_reset functionality
iMXRT is also enabled when resetting from boardctl.
@@ -323,3 +323,30 @@ void imxrt_wdog_hwreset(void)
putreg16(reg, IMXRT_WDOG1_WCR);
}
}
+
+/****************************************************************************
+ * Name: board_reset
+ *
+ * Description:
+ * Reset board. This function may or may not be supported by a
+ * particular board architecture.
+ *
+ * Input Parameters:
+ * status - Status information provided with the reset event. This
+ * meaning of this status information is board-specific. If not used by
+ * a board, the value zero may be provided in calls to board_reset.
+ *
+ * Returned Value:
+ * If this function returns, then it was not possible to power-off the
+ * board due to some constraints. The return value int this case is a
+ * board-specific reason for the failure to shutdown.
+ *
+ ****************************************************************************/
+#ifdef CONFIG_BOARDCTL_RESET
+int board_reset(int status)
+{
+ imxrt_wdog_hwreset();
+
+ return 0;
+}
+#endif
