]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/include/asm/ppc4xx-i2c.h
Merge branch 'master' of git://git.denx.de/u-boot-net
[u-boot] / arch / powerpc / include / asm / ppc4xx-i2c.h
index 0c6c926f73174bf0573889ab30e7037f3abf2518..df97f175b3637856da0f91ef8ee8e7da159af7dd 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2007-2009
  * Stefan Roese, DENX Software Engineering, sr@denx.de.
  *
- * 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 _4xx_i2c_h_
 
 #define IIC_TIMEOUT    1               /* 1 second */
 
-#if defined(CONFIG_I2C_MULTI_BUS)
-#define I2C_BUS_OFFS   (i2c_bus_num * 0x100)
-#else
-#define I2C_BUS_OFFS   (0x000)
-#endif /* CONFIG_I2C_MULTI_BUS */
-
-#if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
-    defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT)
-#define I2C_BASE_ADDR  (CONFIG_SYS_PERIPHERAL_BASE + 0x00000700 + I2C_BUS_OFFS)
-#elif defined(CONFIG_440) || defined(CONFIG_405EX)
-/* all remaining 440 variants */
-#define I2C_BASE_ADDR  (CONFIG_SYS_PERIPHERAL_BASE + 0x00000400 + I2C_BUS_OFFS)
-#else
-/* all 405 variants */
-#define I2C_BASE_ADDR  (0xEF600500 + I2C_BUS_OFFS)
-#endif
-
 struct ppc4xx_i2c {
        u8 mdbuf;
        u8 res1;
@@ -106,6 +72,8 @@ struct ppc4xx_i2c {
 #define IIC_EXTSTS_XFRA                0x01
 #define IIC_EXTSTS_ICT         0x02
 #define IIC_EXTSTS_LA          0x04
+#define IIC_EXTSTS_BCS_MASK    0x70
+#define IIC_EXTSTS_BCS_FREE    0x40
 
 /* XTCNTLSS Register Bit definition */
 #define IIC_XTCNTLSS_SRST      0x01