summaryrefslogtreecommitdiff
path: root/cpu/mpc824x
diff options
context:
space:
mode:
authorwdenk <wdenk>2002-04-01 17:47:25 +0000
committerwdenk <wdenk>2002-04-01 17:47:25 +0000
commite881953f7dadd9a643318a61c1f264a9407c3c2c (patch)
tree7985c718cd7e45bb05c7f70d8bdb2a45d65030b0 /cpu/mpc824x
parente85390dc1d9c3c942c11bbf003e6c10a73e25ed6 (diff)
Initial revision
Diffstat (limited to 'cpu/mpc824x')
-rw-r--r--cpu/mpc824x/drivers/i2c/i2c2.S54
1 files changed, 54 insertions, 0 deletions
diff --git a/cpu/mpc824x/drivers/i2c/i2c2.S b/cpu/mpc824x/drivers/i2c/i2c2.S
new file mode 100644
index 00000000000..5cc7c987643
--- /dev/null
+++ b/cpu/mpc824x/drivers/i2c/i2c2.S
@@ -0,0 +1,54 @@
+/**************************************
+ *
+ * copyright @ Motorola, 1999
+ *
+ **************************************/
+
+#include <config.h>
+#ifdef CONFIG_HARD_I2C
+#include <ppc_asm.tmpl>
+#include <asm/mmu.h>
+/**********************************************************
+ * function: load_runtime_reg
+ *
+ * input: r3 - value of eumbbar
+ * r4 - register offset in embedded utility space
+ *
+ * output: r3 - register content
+ **********************************************************/
+ .text
+ .align 2
+ .global load_runtime_reg
+load_runtime_reg:
+
+/* xor r5,r5,r5
+* or r5,r5,r3
+*
+* lwbrx r3,r4,r5
+*/
+ lwbrx r3,r4,r3
+ sync
+
+ bclr 20, 0
+
+/****************************************************************
+ * function: store_runtime_reg
+ *
+ * input: r3 - value of eumbbar
+ * r4 - register offset in embedded utility space
+ * r5 - new value to be stored
+ *
+ ****************************************************************/
+ .text
+ .align 2
+ .global store_runtime_reg
+store_runtime_reg:
+
+ stwbrx r5, r4, r3
+ sync
+
+ bclr 20,0
+
+
+
+#endif /* CONFIG_HARD_I2C */