arch/ and config/ files: All board interfaces (those starting with board_) must be defined in board-specific logic. Otherwise, they cannot be customized of specialized usage by different boards. The board_reset() interface was defined in architecture-specific logic that only called up_systemreset(). That is useless!

This change removes the board_reset() implementation from the architecture-specific code and re-implements in the src/ directory of each board that has CONFIG_BOARDCTL_RESET enabled.  That is the correct functional partitioning.
This commit is contained in:
Gregory Nutt
2019-03-25 10:32:43 -06:00
parent 101f3bddec
commit 3e6c196ffa
16 changed files with 352 additions and 98 deletions
+13
View File
@@ -98,6 +98,7 @@
#include <arch/arch.h>
#include <nuttx/compiler.h>
#include <nuttx/cache.h>
/****************************************************************************
@@ -189,6 +190,18 @@ EXTERN volatile bool g_rtc_enabled;
void up_initialize(void);
/****************************************************************************
* Name: up_systemreset
*
* Description:
* The function up_systemreset() will reset the MCU. Optional!
* Availability of this function is dependent upon the architecture
* support.
*
****************************************************************************/
void up_systemreset(void) noreturn_function;
/****************************************************************************
* Name: up_idle
*
+5 -4
View File
@@ -245,13 +245,14 @@ int board_power_off(int status);
* Name: board_reset
*
* Description:
* Reset board. This function may or may not be supported by a
* particular board architecture.
* Reset board. Support for this function is required by board-level
* logic if CONFIG_BOARDCTL_RESET is selected.
*
* 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.
* 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