]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/i2c/mv_i2c.h
Remove CONFIG_SYS_BOOTCOUNT_SINGLEWORD
[people/ms/u-boot.git] / drivers / i2c / mv_i2c.h
index 41af0d9bda341df85254472d75c362ea84e97ca5..1e6289290de209d28d5177ccc581e4d23165e0cc 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2011
  * Marvell Inc, <www.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+
  */
 
 #ifndef _MV_I2C_H_
@@ -39,12 +23,7 @@ extern void i2c_clk_enable(void);
 #define I2C_READ               0
 #define I2C_WRITE              1
 
-#if (CONFIG_SYS_I2C_SPEED == 400000)
-#define I2C_ICR_INIT   (ICR_FM | ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD \
-               | ICR_SCLE)
-#else
 #define I2C_ICR_INIT   (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE)
-#endif
 
 #define I2C_ISR_INIT           0x7FF
 /* ----- Control register bits ---------------------------------------- */
@@ -64,7 +43,15 @@ extern void i2c_clk_enable(void);
 #define ICR_ALDIE      0x1000          /* enable arbitration interrupt */
 #define ICR_SADIE      0x2000          /* slave address detected int enable */
 #define ICR_UR         0x4000          /* unit reset */
-#define ICR_FM         0x8000          /* Fast Mode */
+#ifdef CONFIG_ARMADA_3700
+#define ICR_SM         0x00000         /* Standard Mode */
+#define ICR_FM         0x10000         /* Fast Mode */
+#define ICR_MODE_MASK  0x30000         /* Mode mask */
+#else
+#define ICR_SM         0x00000         /* Standard Mode */
+#define ICR_FM         0x08000         /* Fast Mode */
+#define ICR_MODE_MASK  0x18000         /* Mode mask */
+#endif
 
 /* ----- Status register bits ----------------------------------------- */