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:
Xiang Xiao
2023-12-17 18:22:21 +08:00
committed by Mateusz Szafoni
parent 73ecd741e7
commit 43d51cd4fc
12 changed files with 9 additions and 120 deletions
-40
View File
@@ -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;
}
-40
View File
@@ -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;
}
-40
View File
@@ -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;
}