xarch/sim: Call pm_initialize from up_initialize directly

We don't need the additional flexibility since sim just has one chip.
This commit is contained in:
Xiang Xiao 2020-02-10 12:57:25 +08:00 committed by Gregory Nutt
parent 978575d79a
commit 7fd3a3bcca
5 changed files with 2 additions and 89 deletions

View File

@ -26,7 +26,7 @@ endchoice # Host CPU Type
config ARCH_CHIP
string
default "sim" if ARCH_SIM
default "sim"
config SIM_M32
bool "Build 32-bit simulation on 64-bit machine"

View File

@ -113,10 +113,6 @@ ifeq ($(CONFIG_ONESHOT),y)
CSRCS += up_oneshot.c
endif
ifeq ($(CONFIG_PM),y)
CSRCS += up_pminitialize.c
endif
ifeq ($(CONFIG_SCHED_CRITMONITOR),y)
HOSTSRCS += up_critmon.c
endif

View File

@ -189,7 +189,7 @@ void up_initialize(void)
* with the power management subsystem).
*/
up_pminitialize();
pm_initialize();
#endif
#ifdef CONFIG_MM_IOB

View File

@ -303,12 +303,6 @@ int up_x11cmap(unsigned short first, unsigned short len,
int sim_tsc_initialize(int minor);
void sim_tsc_uninitialize(void);
/* up_pminitialize.c ********************************************************/
#ifdef CONFIG_PM
void up_pminitialize(void);
#endif
/* up_eventloop.c ***********************************************************/
#if defined(CONFIG_SIM_X11FB) && \

View File

@ -1,77 +0,0 @@
/****************************************************************************
* arch/arm/src/stm32l4/stm32l4_pminitialize.c
*
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/power/pm.h>
#include "up_internal.h"
#ifdef CONFIG_PM
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: up_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 up_pminitialize(void)
{
/* Then initialize the NuttX power management subsystem proper */
pm_initialize();
}
#endif /* CONFIG_PM */