summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/common')
-rw-r--r--nuttx/arch/arm/src/common/up_initialize.c10
-rw-r--r--nuttx/arch/arm/src/common/up_internal.h8
2 files changed, 18 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/common/up_initialize.c b/nuttx/arch/arm/src/common/up_initialize.c
index 130f0721f..8bf530fda 100644
--- a/nuttx/arch/arm/src/common/up_initialize.c
+++ b/nuttx/arch/arm/src/common/up_initialize.c
@@ -126,6 +126,16 @@ void up_initialize(void)
up_irqinitialize();
+ /* Initialize the power management subsystem. This MCU-specific function
+ * must be called *very* early in the intialization 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
+
/* Initialize the DMA subsystem if the weak function stm32_dmainitialize has been
* brought into the build
*/
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index f0f3d06ef..015b2b4bc 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -229,6 +229,14 @@ extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
extern void up_sigdeliver(void);
+/* Power management *********************************************************/
+
+#ifdef CONFIG_PM
+extern void up_pminitialize(void);
+#else
+# define up_pminitialize()
+#endif
+
/* Interrupt handling *******************************************************/
extern void up_irqinitialize(void);