mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
arch/risc-v: Don't declare riscv_addregion if CONFIG_MM_REGIONS is < 1.
Don't declare riscv_addregion if CONFIG_MM_REGIONS is < 1, so we won't have to provide a dummy stub for every chip. Also rename the function from up_addregion to riscv_addregion since it's not exported outside the arch directory. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
778c805357
commit
37b93bd498
@@ -37,14 +37,6 @@ extern uint8_t _heap_size;
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addregion
|
||||
****************************************************************************/
|
||||
|
||||
void up_addregion(void)
|
||||
{
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_allocate_heap
|
||||
*
|
||||
@@ -65,3 +57,19 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
*heap_start = (FAR void *)&_heap_start;
|
||||
*heap_size = (size_t)&_heap_size;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: riscv_addregion
|
||||
*
|
||||
* Description:
|
||||
* RAM may be added in non-contiguous chunks. This routine adds all chunks
|
||||
* that may be used for heap.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
void riscv_addregion(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ void up_initialize(void)
|
||||
|
||||
/* Add any extra memory fragments to the memory manager */
|
||||
|
||||
up_addregion();
|
||||
riscv_addregion();
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* Initialize the power management subsystem. This MCU-specific function
|
||||
|
||||
@@ -172,7 +172,12 @@ void up_boot(void);
|
||||
|
||||
/* Memory allocation ********************************************************/
|
||||
|
||||
void up_addregion(void);
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
void riscv_addregion(void);
|
||||
#else
|
||||
# define riscv_addregion()
|
||||
#endif
|
||||
|
||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size);
|
||||
|
||||
/* IRQ initialization *******************************************************/
|
||||
|
||||
@@ -45,9 +45,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addregion
|
||||
* Name: riscv_addregion
|
||||
*
|
||||
* Description:
|
||||
* RAM may be added in non-contiguous chunks. This routine adds all chunks
|
||||
* that may be used for heap.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_addregion(void)
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
void riscv_addregion(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -82,7 +82,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addregion
|
||||
* Name: riscv_addregion
|
||||
*
|
||||
* Description:
|
||||
* RAM may be added in non-contiguous chunks. This routine adds all chunks
|
||||
@@ -90,7 +90,9 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_addregion(void)
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
void riscv_addregion(void)
|
||||
{
|
||||
/* TODO: add L1 memorie */
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -94,9 +94,17 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addregion
|
||||
* Name: riscv_addregion
|
||||
*
|
||||
* Description:
|
||||
* RAM may be added in non-contiguous chunks. This routine adds all chunks
|
||||
* that may be used for heap.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_addregion(void)
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
void riscv_addregion(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,9 +33,17 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addregion
|
||||
* Name: riscv_addregion
|
||||
*
|
||||
* Description:
|
||||
* RAM may be added in non-contiguous chunks. This routine adds all chunks
|
||||
* that may be used for heap.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_addregion(void)
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
void riscv_addregion(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_addregion
|
||||
* Name: riscv_addregion
|
||||
*
|
||||
* Description:
|
||||
* RAM may be added in non-contiguous chunks. This routine adds all chunks
|
||||
@@ -57,6 +57,9 @@
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void up_addregion(void)
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
void riscv_addregion(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user