mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
arch: Remove the identity mapping of up_addrenv_va_to_pa and up_addrenv_pa_to_va
and reuse the reuse the implementation from: drivers/misc/addrenv.c Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Mateusz Szafoni
parent
73ecd741e7
commit
43d51cd4fc
@@ -533,43 +533,3 @@ int nrf53_rptun_init(const char *shmemname, const char *cpuname)
|
||||
errout:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_va_to_pa
|
||||
*
|
||||
* Description:
|
||||
* This is needed by openamp/libmetal/lib/system/nuttx/io.c:78. The
|
||||
* physical memory is mapped as virtual.
|
||||
*
|
||||
* Input Parameters:
|
||||
* va_
|
||||
*
|
||||
* Returned Value:
|
||||
* va
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_addrenv_va_to_pa(void *va)
|
||||
{
|
||||
return (uintptr_t)va;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_pa_to_va
|
||||
*
|
||||
* Description:
|
||||
* This is needed by openamp/libmetal/lib/system/nuttx/io.c. The
|
||||
* physical memory is mapped as virtual.
|
||||
*
|
||||
* Input Parameters:
|
||||
* pa
|
||||
*
|
||||
* Returned Value:
|
||||
* pa
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void *up_addrenv_pa_to_va(uintptr_t pa)
|
||||
{
|
||||
return (void *)pa;
|
||||
}
|
||||
|
||||
@@ -527,43 +527,3 @@ int stm32_rptun_init(const char *shmemname, const char *cpuname)
|
||||
errout:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_va_to_pa
|
||||
*
|
||||
* Description:
|
||||
* This is needed by openamp/libmetal/lib/system/nuttx/io.c:78. The
|
||||
* physical memory is mapped as virtual.
|
||||
*
|
||||
* Input Parameters:
|
||||
* va_
|
||||
*
|
||||
* Returned Value:
|
||||
* va
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_addrenv_va_to_pa(void *va)
|
||||
{
|
||||
return (uintptr_t)va;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_pa_to_va
|
||||
*
|
||||
* Description:
|
||||
* This is needed by openamp/libmetal/lib/system/nuttx/io.c. The
|
||||
* physical memory is mapped as virtual.
|
||||
*
|
||||
* Input Parameters:
|
||||
* pa
|
||||
*
|
||||
* Returned Value:
|
||||
* pa
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void *up_addrenv_pa_to_va(uintptr_t pa)
|
||||
{
|
||||
return (void *)pa;
|
||||
}
|
||||
|
||||
@@ -1467,43 +1467,3 @@ init_error:
|
||||
up_disable_irq(g_plic_irq);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_va_to_pa
|
||||
*
|
||||
* Description:
|
||||
* This is needed by openamp/libmetal/lib/system/nuttx/io.c:78. The
|
||||
* physical memory is mapped as virtual.
|
||||
*
|
||||
* Input Parameters:
|
||||
* va_
|
||||
*
|
||||
* Returned Value:
|
||||
* va
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_addrenv_va_to_pa(void *va)
|
||||
{
|
||||
return (uintptr_t)va;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addrenv_pa_to_va
|
||||
*
|
||||
* Description:
|
||||
* This is needed by openamp/libmetal/lib/system/nuttx/io.c. The
|
||||
* physical memory is mapped as virtual.
|
||||
*
|
||||
* Input Parameters:
|
||||
* pa
|
||||
*
|
||||
* Returned Value:
|
||||
* pa
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void *up_addrenv_pa_to_va(uintptr_t pa)
|
||||
{
|
||||
return (void *)pa;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user