]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/i2c/davinci_i2c.c
drivers/i2c: Update fti2c010.[ch], i2c_core.c to use SPDX identifiers
[karo-tx-uboot.git] / drivers / i2c / davinci_i2c.c
index eee1cbd25de863b016525a14ad97d805d2a091b9..e56fe75b15ce653730828fe7618b190fc092c53a 100644 (file)
@@ -5,23 +5,7 @@
  *
  * --------------------------------------------------------
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -78,13 +62,11 @@ static int poll_i2c_irq(int mask)
 
 void flush_rx(void)
 {
-       int     dummy;
-
        while (1) {
                if (!(REG(I2C_STAT) & I2C_STAT_RRDY))
                        break;
 
-               dummy = REG(I2C_DRR);
+               REG(I2C_DRR);
                REG(I2C_STAT) = I2C_STAT_RRDY;
                udelay(1000);
        }
@@ -119,6 +101,11 @@ void i2c_init(int speed, int slaveadd)
        udelay(1000);
 }
 
+int i2c_set_bus_speed(unsigned int speed)
+{
+       i2c_init(speed, CONFIG_SYS_I2C_SLAVE);
+       return 0;
+}
 
 int i2c_probe(u_int8_t chip)
 {