mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
ARC: Cache: Move I$ entire operation to a separate function
Move instruction cache entire operation to a separate function because we are planing to use it in other places like sync_icache_dcache_all(). Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
This commit is contained in:
committed by
Alexey Brodkin
parent
71621525c3
commit
16aeee81d9
@@ -315,10 +315,13 @@ void icache_disable(void)
|
|||||||
IC_CTRL_CACHE_DISABLE);
|
IC_CTRL_CACHE_DISABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void invalidate_icache_all(void)
|
/* IC supports only invalidation */
|
||||||
|
static inline void __ic_entire_invalidate(void)
|
||||||
{
|
{
|
||||||
|
if (!icache_status())
|
||||||
|
return;
|
||||||
|
|
||||||
/* Any write to IC_IVIC register triggers invalidation of entire I$ */
|
/* Any write to IC_IVIC register triggers invalidation of entire I$ */
|
||||||
if (icache_status()) {
|
|
||||||
write_aux_reg(ARC_AUX_IC_IVIC, 1);
|
write_aux_reg(ARC_AUX_IC_IVIC, 1);
|
||||||
/*
|
/*
|
||||||
* As per ARC HS databook (see chapter 5.3.3.2)
|
* As per ARC HS databook (see chapter 5.3.3.2)
|
||||||
@@ -330,6 +333,10 @@ void invalidate_icache_all(void)
|
|||||||
read_aux_reg(ARC_AUX_IC_CTRL); /* blocks */
|
read_aux_reg(ARC_AUX_IC_CTRL); /* blocks */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void invalidate_icache_all(void)
|
||||||
|
{
|
||||||
|
__ic_entire_invalidate();
|
||||||
|
|
||||||
#ifdef CONFIG_ISA_ARCV2
|
#ifdef CONFIG_ISA_ARCV2
|
||||||
if (slc_exists)
|
if (slc_exists)
|
||||||
__slc_entire_op(OP_INV);
|
__slc_entire_op(OP_INV);
|
||||||
|
Reference in New Issue
Block a user