mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
up_pminitialize() needs to be called from instances of up_initialize()
This commit is contained in:
parent
d3b3c71d97
commit
7b298a828d
10 changed files with 112 additions and 12 deletions
|
@ -53,6 +53,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
|
@ -159,21 +160,21 @@ void up_initialize(void)
|
|||
|
||||
up_irqinitialize();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
/* Initialize the DMA subsystem if the weak function up_dmainitialize has been
|
||||
* brought into the build
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
if (up_dmainitialize)
|
||||
#endif
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
|
@ -201,11 +202,21 @@ void up_initialize(void)
|
|||
|
||||
up_irqinitialize();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
/* Initialize the DMA subsystem if the weak function stm32_dmainitialize has been
|
||||
* brought into the build
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
if (up_dmainitialize)
|
||||
#endif
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "up_internal.h"
|
||||
|
@ -127,11 +128,21 @@ void up_initialize(void)
|
|||
|
||||
up_irqinitialize();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
/* Initialize the DMA subsystem if the weak function stm32_dmainitialize has been
|
||||
* brought into the build
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
if (up_dmainitialize)
|
||||
#endif
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
|
@ -129,11 +130,21 @@ void up_initialize(void)
|
|||
|
||||
up_irqinitialize();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
/* Initialize the DMA subsystem if the weak function stm32_dmainitialize has been
|
||||
* brought into the build
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
if (up_dmainitialize)
|
||||
#endif
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/syslog/syslog.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include "task/task.h"
|
||||
#include "sched/sched.h"
|
||||
|
@ -107,6 +108,16 @@ void up_initialize(void)
|
|||
|
||||
nuttx_arch_init();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
|
||||
/* Register the master pseudo-terminal multiplexor device */
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "up_internal.h"
|
||||
|
@ -131,9 +132,19 @@ void up_initialize(void)
|
|||
|
||||
up_irqinitialize();
|
||||
|
||||
/* Initialize the system timer interrupt */
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SUPPRESS_INTERRUPTS) && !defined(CONFIG_SUPPRESS_TIMER_INTS)
|
||||
/* Initialize the system timer interrupt */
|
||||
|
||||
up_timer_initialize();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
|
@ -126,15 +127,25 @@ static void up_init_smartfs(void)
|
|||
|
||||
void up_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_NET
|
||||
/* The real purpose of the following is to make sure that syslog
|
||||
* is drawn into the link. It is needed by up_tapdev which is linked
|
||||
* separately.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
syslog(LOG_INFO, "SIM: Initializing");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
/* Register devices */
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
|
@ -129,11 +130,21 @@ void up_initialize(void)
|
|||
|
||||
up_irqinitialize();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
/* Initialize the DMA subsystem if the weak function up_dmainitialize has been
|
||||
* brought into the build
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
if (up_dmainitialize)
|
||||
#endif
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
|
@ -132,9 +133,9 @@ void up_initialize(void)
|
|||
|
||||
up_calibratedelay();
|
||||
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
/* Add any extra memory fragments to the memory manager */
|
||||
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
up_addregion();
|
||||
#endif
|
||||
|
||||
|
@ -142,9 +143,19 @@ void up_initialize(void)
|
|||
|
||||
up_irqinitialize();
|
||||
|
||||
/* Initialize the system timer interrupt */
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SUPPRESS_INTERRUPTS) && !defined(CONFIG_SUPPRESS_TIMER_INTS)
|
||||
/* Initialize the system timer interrupt */
|
||||
|
||||
up_timer_initialize();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
|
@ -121,9 +122,9 @@ void up_initialize(void)
|
|||
|
||||
up_calibratedelay();
|
||||
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
/* Add any extra memory fragments to the memory manager */
|
||||
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
up_addregion();
|
||||
#endif
|
||||
|
||||
|
@ -131,9 +132,19 @@ void up_initialize(void)
|
|||
|
||||
up_irqinitialize();
|
||||
|
||||
/* Initialize the system timer interrupt */
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialized (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*/
|
||||
|
||||
up_pminitialize();
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SUPPRESS_INTERRUPTS) && !defined(CONFIG_SUPPRESS_TIMER_INTS)
|
||||
/* Initialize the system timer interrupt */
|
||||
|
||||
up_timer_initialize();
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue