]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/powerpc/cpu/mpc824x/drivers/epic/epicutil.S
ppc4xx: TLB init file cleanup
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc824x / drivers / epic / epicutil.S
1 /**************************************
2  *
3  * copyright @ Motorola, 1999
4  *
5  *
6  * This file contains two commonly used
7  * lower level utility routines.
8  *
9  * The utility routines are also in other
10  * Kahlua device driver libraries. The
11  * need to be linked in only once.
12  **************************************/
13
14 #include <ppc_asm.tmpl>
15 #include <ppc_defs.h>
16
17 /**********************************************************
18  * function: load_runtime_reg
19  *
20  * input:  r3 - value of eumbbar
21  *         r4 - register offset in embedded utility space
22  *
23  * output: r3 - register content
24  **********************************************************/
25       .text
26       .align 2
27       .global load_runtime_reg
28
29 load_runtime_reg:
30
31                   xor r5,r5,r5
32           or  r5,r5,r3       /* save eumbbar */
33
34               lwbrx     r3,r4,r5
35               sync
36
37               bclr 20, 0
38
39 /****************************************************************
40  * function: store_runtime_reg
41  *
42  * input: r3 - value of eumbbar
43  *        r4 - register offset in embedded utility space
44  *        r5 - new value to be stored
45  *
46  ****************************************************************/
47            .text
48            .align 2
49            .global store_runtime_reg
50 store_runtime_reg:
51
52                   xor r0,r0,r0
53
54               stwbrx r5,  r4, r3
55               sync
56
57                   bclr   20,0