]> git.sur5r.net Git - u-boot/blobdiff - drivers/i2c/mv_i2c.c
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
[u-boot] / drivers / i2c / mv_i2c.c
index b93922bdb21f65f0b927d209389e1c114f594e92..e65cce0d8e7e1f3c7903e79a5bc19479856d79f4 100644 (file)
  * (C) Copyright 2011 Marvell Inc.
  * Lei Wen <leiwen@marvell.com>
  *
- * 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+
  *
  * Back ported to the 8xx platform (from the 8260 platform) by
  * Murray.Jensen@cmst.csiro.au, 27-Jan-01.
@@ -47,7 +31,7 @@
 #endif
 
 /* All transfers are described by this data structure */
-struct i2c_msg {
+struct mv_i2c_msg {
        u8 condition;
        u8 acknack;
        u8 direction;
@@ -173,7 +157,7 @@ static int i2c_isr_set_cleared(unsigned long set_mask,
  *          -5: illegal parameters
  *          -6: bus is busy and couldn't be aquired
  */
-int i2c_transfer(struct i2c_msg *msg)
+int i2c_transfer(struct mv_i2c_msg *msg)
 {
        int ret;
 
@@ -302,7 +286,7 @@ void i2c_init(int speed, int slaveaddr)
  */
 int i2c_probe(uchar chip)
 {
-       struct i2c_msg msg;
+       struct mv_i2c_msg msg;
 
        i2c_reset();
 
@@ -338,7 +322,7 @@ int i2c_probe(uchar chip)
  */
 int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
 {
-       struct i2c_msg msg;
+       struct mv_i2c_msg msg;
        u8 addr_bytes[3]; /* lowest...highest byte of data address */
 
        PRINTD(("i2c_read(chip=0x%02x, addr=0x%02x, alen=0x%02x, "
@@ -426,7 +410,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
  */
 int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
 {
-       struct i2c_msg msg;
+       struct mv_i2c_msg msg;
        u8 addr_bytes[3]; /* lowest...highest byte of data address */
 
        PRINTD(("i2c_write(chip=0x%02x, addr=0x%02x, alen=0x%02x, "