Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / powerpc / include / asm / fsl_i2c.h
index d6537fd63315f03b169a6ffea9a52323c9e3603e..73105fa8e48468a640d2281552134068101422a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Freescale I2C Controller
  *
@@ -7,32 +8,15 @@
  * Xianghua Xiao <x.xiao@motorola.com>, Eran Liberty (liberty@freescale.com),
  * and Jeff Brown.
  * Some bits are taken from linux driver writen by adrian@humboldt.co.uk.
- *
- * This software may be used and distributed according to the
- * terms of the GNU Public License, Version 2, incorporated
- * herein by reference.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * Version 2 as published by the Free Software Foundation.
- *
- * 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
  */
 
 #ifndef _ASM_FSL_I2C_H_
 #define _ASM_FSL_I2C_H_
 
 #include <asm/types.h>
+#include <linux/compiler.h>
 
-typedef struct fsl_i2c {
+typedef struct fsl_i2c_base {
 
        u8 adr;         /* I2C slave address */
        u8 res0[3];
@@ -84,4 +68,14 @@ typedef struct fsl_i2c {
        u8 res6[0xE8];
 } fsl_i2c_t;
 
+#ifdef CONFIG_DM_I2C
+struct fsl_i2c_dev {
+       struct fsl_i2c_base __iomem *base;      /* register base */
+       u32 i2c_clk;
+       u32 index;
+       u8 slaveadd;
+       uint speed;
+};
+#endif
+
 #endif /* _ASM_I2C_H_ */