]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/i2c.h
sunxi: non-FEL SPL boot support for sun7i
[karo-tx-uboot.git] / include / i2c.h
index f532a1443134fdc492b11c8ddfedc6bbe48df84b..1b4078ed62fe43c8c3ac37b1ff732da0d431d37f 100644 (file)
@@ -6,23 +6,7 @@
  * (C) Copyright 2001
  * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.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+
  *
  * The original I2C interface was
  *   (C) 2000 by Paolo Scaffardi (arsenio@tin.it)
@@ -84,6 +68,7 @@ struct i2c_adapter {
        uint            (*set_bus_speed)(struct i2c_adapter *adap,
                                uint speed);
        int             speed;
+       int             waitdelay;
        int             slaveaddr;
        int             init_done;
        int             hwadapnr;
@@ -151,6 +136,8 @@ extern struct i2c_bus_hose  i2c_bus[];
 #define I2C_MUX_PCA9544                {I2C_MUX_PCA9544_ID, "PCA9544A"}
 #define I2C_MUX_PCA9547_ID     4
 #define I2C_MUX_PCA9547                {I2C_MUX_PCA9547_ID, "PCA9547A"}
+#define I2C_MUX_PCA9548_ID     5
+#define I2C_MUX_PCA9548                {I2C_MUX_PCA9548_ID, "PCA9548"}
 #endif
 
 #ifndef I2C_SOFT_DECLARATIONS
@@ -161,7 +148,7 @@ extern struct i2c_bus_hose  i2c_bus[];
 
 # elif (defined(CONFIG_AT91RM9200) || \
        defined(CONFIG_AT91SAM9260) ||  defined(CONFIG_AT91SAM9261) || \
-       defined(CONFIG_AT91SAM9263)) && !defined(CONFIG_AT91_LEGACY)
+       defined(CONFIG_AT91SAM9263))
 #  define I2C_SOFT_DECLARATIONS        at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIOA;
 # else
 #  define I2C_SOFT_DECLARATIONS
@@ -197,27 +184,6 @@ void i2c_init_board(void);
 void i2c_board_late_init(void);
 #endif
 
-#if defined(CONFIG_I2C_MUX)
-
-typedef struct _mux {
-       uchar   chip;
-       uchar   channel;
-       char    *name;
-       struct _mux     *next;
-} I2C_MUX;
-
-typedef struct _mux_device {
-       int     busid;
-       I2C_MUX *mux;   /* List of muxes, to reach the device */
-       struct _mux_device      *next;
-} I2C_MUX_DEVICE;
-
-I2C_MUX_DEVICE *i2c_mux_search_device(int id);
-I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf);
-int i2x_mux_select_mux(int bus);
-int i2c_mux_ident_muxstring_f (uchar *buf);
-#endif
-
 #ifdef CONFIG_SYS_I2C
 /*
  * i2c_get_bus_num:
@@ -427,7 +393,7 @@ unsigned int i2c_get_bus_speed(void);
 # if !defined(CONFIG_SYS_MAX_I2C_BUS)
 #  define CONFIG_SYS_MAX_I2C_BUS               2
 # endif
-# define I2C_MULTI_BUS                         0
+# define I2C_MULTI_BUS                         1
 #else
 # define CONFIG_SYS_MAX_I2C_BUS                1
 # define I2C_MULTI_BUS                         0