Lines Matching full:cache
12 /* Cache maintenance operation registers */
47 INVALIDATE_POU, /* i-cache invalidate by address */
48 INVALIDATE_POC, /* d-cache invalidate by address */
49 INVALIDATE_SET_WAY, /* d-cache invalidate by sets/ways */
50 FLUSH_POU, /* d-cache clean by address to the PoU */
51 FLUSH_POC, /* d-cache clean by address to the PoC */
52 FLUSH_SET_WAY, /* d-cache clean by sets/ways */
53 FLUSH_INVAL_POC, /* d-cache clean & invalidate by addr to PoC */
54 FLUSH_INVAL_SET_WAY, /* d-cache clean & invalidate by set/ways */
63 static void get_cache_ways_sets(struct dcache_config *cache) in get_cache_ways_sets() argument
67 cache->ways = (cache_size_id & MASK_NUM_WAYS) >> NUM_WAYS_SHIFT; in get_cache_ways_sets()
68 cache->sets = (cache_size_id & MASK_NUM_SETS) >> NUM_SETS_SHIFT; in get_cache_ways_sets()
72 * Return the io register to perform required cache action like clean or clean
92 * Return the io register to perform required cache action like clean or clean
123 /* Make sure cache selection is effective for next memory access */ in get_cline_size()
129 debug("cache line size is %d\n", size); in get_cline_size()
134 /* Perform the action like invalidate/clean on a range of cache addresses */
150 /* Cache line size is minium size for the cache action */ in action_cache_range()
152 /* Align start address to cache line boundary */ in action_cache_range()
154 debug("total size for cache action = %llx\n", size); in action_cache_range()
161 /* Make sure cache action is effective for next memory access */ in action_cache_range()
164 debug("cache action on range done\n"); in action_cache_range()
172 struct dcache_config cache; in action_dcache_all() local
181 /* Make sure cache selection is effective for next memory access */ in action_dcache_all()
184 get_cache_ways_sets(&cache); /* Get number of ways & sets */ in action_dcache_all()
185 debug("cache: ways= %d, sets= %d\n", cache.ways + 1, cache.sets + 1); in action_dcache_all()
186 for (i = cache.sets; i >= 0; i--) { in action_dcache_all()
187 for (j = cache.ways; j >= 0; j--) { in action_dcache_all()
193 /* Make sure cache action is effective for next memory access */ in action_dcache_all()
202 if (dcache_status()) /* return if cache already enabled */ in dcache_enable()
206 printf("ERR: D-cache not enabled\n"); in dcache_enable()
212 /* Make sure cache action is effective for next memory access */ in dcache_enable()
224 printf("ERR: D-cache not flushed\n"); in dcache_disable()
230 /* Make sure cache action is effective for next memory access */ in dcache_disable()
243 printf("ERR: D-cache not invalidated\n"); in invalidate_dcache_range()
251 printf("ERR: D-cache not flushed\n"); in flush_dcache_range()
258 printf("ERR: D-cache not flushed\n"); in flush_dcache_all()
266 printf("ERR: D-cache not invalidated\n"); in invalidate_dcache_all()
301 /* Make sure cache action is effective for next memory access */ in invalidate_icache_all()
314 /* Make sure cache action is effective for next memory access */ in icache_enable()
331 isb(); /* subsequent instructions fetch see cache disable effect */ in icache_disable()