added additional functions for cache handling
This commit is contained in:
@@ -42,6 +42,17 @@ uint32_t cacr_get(void)
|
|||||||
return rt_cacr;
|
return rt_cacr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void disable_data_cache(void)
|
||||||
|
{
|
||||||
|
flush_and_invalidate_caches();
|
||||||
|
cacr_set(cacr_get() | CF_CACR_DCINVA);
|
||||||
|
}
|
||||||
|
|
||||||
|
void enable_data_cache(void)
|
||||||
|
{
|
||||||
|
cacr_set(cacr_get() & ~CF_CACR_DCINVA);
|
||||||
|
}
|
||||||
|
|
||||||
void flush_and_invalidate_caches(void)
|
void flush_and_invalidate_caches(void)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
|
|||||||
Reference in New Issue
Block a user