mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 11:53:25 +08:00
arch/xtensa/src/common: Create SoC-specific initialization routine
This commits adds a function that can be implemented by any vendor to allow SoC-specific functions to be called by `up_initialize`. Please note that `up_initialize` is provided by the arch level, but it doesn't allow SoC-specific initialization. Although it could be possible to run such initialization on board-level, semantically it isn't related to the board, but with the SoC. As an example of such implementation, some SoCs require RTC subsystem initialization to occur before the OS is completely initialized. Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit is contained in:
committed by
Alan C. Assis
parent
ba20c930f8
commit
18be6955c6
@@ -266,6 +266,10 @@ void xtensa_clrpend_irq(int irq);
|
||||
void weak_function xtensa_dma_initialize(void);
|
||||
#endif
|
||||
|
||||
/* SoC-specific CPU initialization */
|
||||
|
||||
void weak_function xtensa_soc_initialize(void);
|
||||
|
||||
/* Memory management */
|
||||
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
|
||||
@@ -106,5 +106,12 @@ void up_initialize(void)
|
||||
|
||||
xtensa_usbinitialize();
|
||||
|
||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
if (xtensa_soc_initialize)
|
||||
#endif
|
||||
{
|
||||
xtensa_soc_initialize();
|
||||
}
|
||||
|
||||
board_autoled_on(LED_IRQSENABLED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user