]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/mpc8220/i2c.c
Merge branch 'reloc'
[karo-tx-uboot.git] / cpu / mpc8220 / i2c.c
index 62f7c0f5d330df815284ca99031017880c66273c..76ecdf11e214e3e539c67535f140cffec33c3c5d 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <common.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #ifdef CONFIG_HARD_I2C
 
 #include <mpc8220.h>
@@ -235,7 +237,6 @@ void i2c_init (int speed, int saddr)
 
 static int mpc_get_fdr (int speed)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        static int fdr = -1;
 
        if (fdr == -1) {
@@ -386,20 +387,4 @@ int i2c_write (uchar chip, uint addr, int alen, uchar * buf, int len)
        return ret;
 }
 
-uchar i2c_reg_read (uchar chip, uchar reg)
-{
-       uchar buf;
-
-       i2c_read (chip, reg, 1, &buf, 1);
-
-       return buf;
-}
-
-void i2c_reg_write (uchar chip, uchar reg, uchar val)
-{
-       i2c_write (chip, reg, 1, &val, 1);
-
-       return;
-}
-
 #endif /* CONFIG_HARD_I2C */