Simplify STM32 PM infrastructure
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4870 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
4ca2862016
commit
e68fe57420
@ -86,8 +86,10 @@ endif
|
||||
|
||||
CHIP_CSRCS += stm32_pmstop.c stm32_pmstandby.c
|
||||
ifeq ($(CONFIG_PM),y)
|
||||
ifneq ($(CONFIG_PM_CUSTOMINIT),y)
|
||||
CHIP_CSRCS += stm32_pminitialize.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STM32_ETHMAC),y)
|
||||
CHIP_CSRCS += stm32_eth.c
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "up_internal.h"
|
||||
@ -68,15 +67,6 @@ extern "C" {
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/* Before any power state transition is made, the caller should hold this
|
||||
* semaphore to assure that there are no concurrent, contradictory power
|
||||
* state activities.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
EXTERN sem_t g_pmsem;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
@ -98,10 +88,6 @@ EXTERN sem_t g_pmsem;
|
||||
* original state. Otherwise, STOP mode did not occur and a negated
|
||||
* errno value is returned to indicate the cause of the failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* The caller holds the PM semaphore (g_pmsem) if this function is used
|
||||
* as part of the NuttX power management logic.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN int stm32_pmstop(bool lpds);
|
||||
@ -121,10 +107,6 @@ EXTERN int stm32_pmstop(bool lpds);
|
||||
* and a negated errno value is returned to indicate the cause of the
|
||||
* failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* The caller holds the PM semaphore (g_pmsem) if this function is used
|
||||
* as part of the NuttX power management logic.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN int stm32_pmstandby(void);
|
||||
|
@ -58,13 +58,6 @@
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/* Before any power state transition is made, the caller should hold this
|
||||
* semaphore to assure that there are no concurrent, contradictory power
|
||||
* state activities.
|
||||
*/
|
||||
|
||||
sem_t g_pmsem;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -93,12 +86,6 @@ sem_t g_pmsem;
|
||||
|
||||
void up_pminitialize(void)
|
||||
{
|
||||
/* Initialize the PM semaphore to assure that no more than one power-related
|
||||
* action occurs at a time.
|
||||
*/
|
||||
|
||||
sem_init(&g_pmsem, 0, 1);
|
||||
|
||||
/* Then initialize the NuttX power management subsystem proper */
|
||||
|
||||
pm_initialize();
|
||||
|
@ -77,10 +77,6 @@
|
||||
* and a negated errno value is returned to indicate the cause of the
|
||||
* failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* The caller holds the PM semaphore (g_pmsem) if this function is used
|
||||
* as part of the NuttX power management logic.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int stm32_pmstandby(void)
|
||||
|
@ -79,10 +79,6 @@
|
||||
* original state. Otherwise, STOP mode did not occur and a negated
|
||||
* errno value is returned to indicate the cause of the failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* The caller holds the PM semaphore (g_pmsem) if this function is used
|
||||
* as part of the NuttX power management logic.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int stm32_pmstop(bool lpds)
|
||||
|
Loading…
Reference in New Issue
Block a user