This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit b1f3d5e5734b12c486e03af220db9a1187356cc1 Author: SPRESENSE <[email protected]> AuthorDate: Tue Oct 11 20:27:33 2022 +0900 arm/cxd56xx: Fix build error in CONFIG_PM=y --- arch/arm/src/cxd56xx/cxd56_idle.c | 8 +++-- boards/arm/cxd56xx/common/src/Make.defs | 4 +++ boards/arm/cxd56xx/common/src/cxd56_pm.c | 56 ++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/cxd56xx/cxd56_idle.c b/arch/arm/src/cxd56xx/cxd56_idle.c index 8ca9b30729..9d6756d007 100644 --- a/arch/arm/src/cxd56xx/cxd56_idle.c +++ b/arch/arm/src/cxd56xx/cxd56_idle.c @@ -116,11 +116,15 @@ static void up_idlepm(void) break; case PM_STANDBY: - cxd56_pmstandby(true); + + /* Not supported yet */ + break; case PM_SLEEP: - cxd56_pmsleep(); + + /* Not supported yet */ + break; default: diff --git a/boards/arm/cxd56xx/common/src/Make.defs b/boards/arm/cxd56xx/common/src/Make.defs index 4c326cd86e..849a0f7095 100644 --- a/boards/arm/cxd56xx/common/src/Make.defs +++ b/boards/arm/cxd56xx/common/src/Make.defs @@ -178,6 +178,10 @@ ifeq ($(CONFIG_BOARD_USBDEV_SERIALSTR),y) CSRCS += cxd56_usbdevserialstr.c endif +ifeq ($(CONFIG_PM),y) + CSRCS += cxd56_pm.c +endif + DEPPATH += --dep-path src VPATH += :src CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)src) diff --git a/boards/arm/cxd56xx/common/src/cxd56_pm.c b/boards/arm/cxd56xx/common/src/cxd56_pm.c new file mode 100644 index 0000000000..04cbf69d35 --- /dev/null +++ b/boards/arm/cxd56xx/common/src/cxd56_pm.c @@ -0,0 +1,56 @@ +/**************************************************************************** + * boards/arm/cxd56xx/common/src/cxd56_pm.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/config.h> +#include <nuttx/power/pm.h> + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: arm_pminitialize + * + * Description: + * This function is called by MCU-specific logic at power-on reset in + * order to provide one-time initialization the power management subsystem. + * This 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). + * + * Input Parameters: + * None. + * + * Returned Value: + * None. + * + ****************************************************************************/ + +void arm_pminitialize(void) +{ + /* Then initialize the NuttX power management subsystem proper */ + + pm_initialize(); +} +
