Initial revision
[oweals/u-boot.git] / cpu / mpc824x / drivers / i2c / i2c2.S
1 /**************************************
2  *
3  * copyright @ Motorola, 1999
4  *
5  **************************************/
6
7 #include <config.h>
8 #ifdef CONFIG_HARD_I2C
9 #include <ppc_asm.tmpl>
10 #include <asm/mmu.h>
11 /**********************************************************
12  * function: load_runtime_reg
13  *
14  * input:  r3 - value of eumbbar
15  *         r4 - register offset in embedded utility space
16  *
17  * output: r3 - register content
18  **********************************************************/
19       .text
20       .align 2
21       .global load_runtime_reg
22 load_runtime_reg:
23
24 /*                xor r5,r5,r5
25 *         or  r5,r5,r3
26 *
27 *             lwbrx     r3,r4,r5
28 */
29               lwbrx r3,r4,r3
30               sync
31
32               bclr 20, 0
33
34 /****************************************************************
35  * function: store_runtime_reg
36  *
37  * input: r3 - value of eumbbar
38  *        r4 - register offset in embedded utility space
39  *        r5 - new value to be stored
40  *
41  ****************************************************************/
42            .text
43            .align 2
44            .global store_runtime_reg
45 store_runtime_reg:
46
47               stwbrx r5,  r4, r3
48               sync
49
50               bclr   20,0
51
52
53
54 #endif /* CONFIG_HARD_I2C */