2 * File: Documentation/blackfin/cache-lock.txt
7 * Description: This file contains the simple DMA Implementation for Blackfin
9 * Rev: $Id: cache-lock.txt 2384 2006-11-01 04:12:43Z magicyang $
12 * Copyright 2004-2006 Analog Devices Inc.
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
18 How to lock your code in cache in uClinux/blackfin
19 --------------------------------------------------
21 There are only a few steps required to lock your code into the cache.
22 Currently you can lock the code by Way.
24 Below are the interface provided for locking the cache.
27 1. cache_grab_lock(int Ways);
29 This function grab the lock for locking your code into the cache specified
33 2. cache_lock(int Ways);
35 This function should be called after your critical code has been executed.
36 Once the critical code exits, the code is now loaded into the cache. This
37 function locks the code into the cache.
40 So, the example sequence will be:
42 cache_grab_lock(WAY0_L); /* Grab the lock */
44 critical_code(); /* Execute the code of interest */
46 cache_lock(WAY0_L); /* Lock the cache */
48 Where WAY0_L signifies WAY0 locking.