armv7a/r: cache function should depends on CONFIG_ARCH_XCACHE
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
613bfd0fde
commit
7e4c5d3daa
@ -34,6 +34,70 @@
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_ICACHE
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_invalidate_icache_all
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Invalidate all instruction caches to PoU, also flushes branch target
|
||||||
|
* cache
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void up_invalidate_icache_all(void)
|
||||||
|
{
|
||||||
|
cp15_invalidate_icache();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_enable_icache
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Enable the I-Cache
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void up_enable_icache(void)
|
||||||
|
{
|
||||||
|
cp15_enable_icache();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_disable_icache
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Disable the I-Cache
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void up_disable_icache(void)
|
||||||
|
{
|
||||||
|
cp15_disable_icache();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_ARCH_ICACHE */
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_DCACHE
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_invalidate_dcache
|
* Name: up_invalidate_dcache
|
||||||
*
|
*
|
||||||
@ -91,26 +155,6 @@ void up_invalidate_dcache_all(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: up_invalidate_icache_all
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Invalidate all instruction caches to PoU, also flushes branch target
|
|
||||||
* cache
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_invalidate_icache_all(void)
|
|
||||||
{
|
|
||||||
cp15_invalidate_icache();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_clean_dcache
|
* Name: up_clean_dcache
|
||||||
*
|
*
|
||||||
@ -238,44 +282,6 @@ void up_flush_dcache_all(void)
|
|||||||
l2cc_flush_all();
|
l2cc_flush_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: up_enable_icache
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Enable the I-Cache
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_enable_icache(void)
|
|
||||||
{
|
|
||||||
cp15_enable_icache();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: up_disable_icache
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Disable the I-Cache
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_disable_icache(void)
|
|
||||||
{
|
|
||||||
cp15_disable_icache();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_enable_dcache
|
* Name: up_enable_dcache
|
||||||
*
|
*
|
||||||
@ -349,3 +355,5 @@ void up_coherent_dcache(uintptr_t addr, size_t len)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_ARCH_DCACHE */
|
||||||
|
@ -34,6 +34,70 @@
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_ICACHE
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_invalidate_icache_all
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Invalidate all instruction caches to PoU, also flushes branch target
|
||||||
|
* cache
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void up_invalidate_icache_all(void)
|
||||||
|
{
|
||||||
|
cp15_invalidate_icache();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_enable_icache
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Enable the I-Cache
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void up_enable_icache(void)
|
||||||
|
{
|
||||||
|
cp15_enable_icache();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_disable_icache
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Disable the I-Cache
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void up_disable_icache(void)
|
||||||
|
{
|
||||||
|
cp15_disable_icache();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_ARCH_ICACHE */
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_DCACHE
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_invalidate_dcache
|
* Name: up_invalidate_dcache
|
||||||
*
|
*
|
||||||
@ -91,26 +155,6 @@ void up_invalidate_dcache_all(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: up_invalidate_icache_all
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Invalidate all instruction caches to PoU, also flushes branch target
|
|
||||||
* cache
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_invalidate_icache_all(void)
|
|
||||||
{
|
|
||||||
cp15_invalidate_icache();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_clean_dcache
|
* Name: up_clean_dcache
|
||||||
*
|
*
|
||||||
@ -238,44 +282,6 @@ void up_flush_dcache_all(void)
|
|||||||
l2cc_flush_all();
|
l2cc_flush_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: up_enable_icache
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Enable the I-Cache
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_enable_icache(void)
|
|
||||||
{
|
|
||||||
cp15_enable_icache();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: up_disable_icache
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Disable the I-Cache
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_disable_icache(void)
|
|
||||||
{
|
|
||||||
cp15_disable_icache();
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_enable_dcache
|
* Name: up_enable_dcache
|
||||||
*
|
*
|
||||||
@ -349,3 +355,5 @@ void up_coherent_dcache(uintptr_t addr, size_t len)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_ARCH_DCACHE */
|
||||||
|
Loading…
Reference in New Issue
Block a user