risc-v: add pm initialization functions.

Signed-off-by: zhongan <zhongan@xiaomi.com>
This commit is contained in:
zhongan 2020-04-15 18:13:30 +08:00 committed by Alan Carvalho de Assis
parent ac18fc0216
commit 648a76b3c1
2 changed files with 18 additions and 0 deletions

View File

@ -124,6 +124,16 @@ void up_initialize(void)
idle->adj_stack_ptr = (FAR void *)g_idle_topstack;
idle->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
#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
/* Register devices */
#if defined(CONFIG_DEV_NULL)

View File

@ -201,6 +201,14 @@ void up_restorefpu(const uint32_t *regs);
# define up_restorefpu(regs)
#endif
/* Power management *********************************************************/
#ifdef CONFIG_PM
void up_pminitialize(void);
#else
# define up_pminitialize()
#endif
/* Low level serial output **************************************************/
void up_lowputc(char ch);