aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini2018-12-10 07:16:33 -0500
committerTom Rini2018-12-10 07:16:33 -0500
commit7ff485c68b7e5573e5a4a877066e98398283a24f (patch)
tree8070ad8de0b18240ee67e1c8b847afc37bdb2d5d /include
parent7504e9e75f76a5101b47cd32851ad7bd4ea8ff70 (diff)
parent19f8c4dfb6e744a31da59bdd23b24d144152f1dc (diff)
Merge branch 'master' of git://git.denx.de/u-boot-i2c
- DM_I2C_COMPAT removal for all ti platforms from Jean-Jacques Hiblot - Fix in i2c command help output from Chirstoph Muellner.
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/global_data.h4
-rw-r--r--include/configs/am43xx_evm.h2
-rw-r--r--include/configs/pdu001.h6
-rw-r--r--include/configs/ti_armv7_common.h18
-rw-r--r--include/dm/uclass-internal.h13
-rw-r--r--include/fdtdec.h21
-rw-r--r--include/palmas.h5
-rw-r--r--include/power/tps65217.h2
-rw-r--r--include/power/tps65910.h1
-rw-r--r--include/twl4030.h6
-rw-r--r--include/twl6030.h5
11 files changed, 60 insertions, 23 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index dffd6b26026..78dcf40bff4 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -77,6 +77,10 @@ typedef struct global_data {
#ifdef CONFIG_OF_LIVE
struct device_node *of_root;
#endif
+
+#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
+ const void *multi_dtb_fit; /* uncompressed multi-dtb FIT image */
+#endif
struct jt_funcs *jt; /* jump table */
char env_buf[32]; /* buffer for env_get() before reloc. */
#ifdef CONFIG_TRACE
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 9d0d3424786..ed71f4ce56a 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -27,8 +27,10 @@
#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
/* Power */
+#ifndef CONFIG_DM_I2C
#define CONFIG_POWER
#define CONFIG_POWER_I2C
+#endif
#define CONFIG_POWER_TPS65218
#define CONFIG_POWER_TPS62362
diff --git a/include/configs/pdu001.h b/include/configs/pdu001.h
index 7b809e2329b..e4c2872fe95 100644
--- a/include/configs/pdu001.h
+++ b/include/configs/pdu001.h
@@ -12,12 +12,6 @@
#include <configs/ti_am335x_common.h>
-/* No more need for I2C legacy compatibility for this board.
- * CONFIG_DM_I2C_COMPAT is defined in ti_armv7_common.h. See the comment there
- * for the right moment to delete the following line.
- */
-#undef CONFIG_DM_I2C_COMPAT
-
/* Using 32K of volatile storage for environment */
#define CONFIG_ENV_SIZE 0x4000
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 0f892e51d19..1e2a62dd6fa 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -74,24 +74,10 @@
/* Timer information. */
#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
-/*
- * Disable DM_* for SPL build and can be re-enabled after adding
- * DM support in SPL
- */
-#ifdef CONFIG_SPL_BUILD
-#undef CONFIG_DM_I2C
-#endif
-
-/* I2C IP block */
+/* If DM_I2C, enable non-DM I2C support */
+#if !defined(CONFIG_DM_I2C)
#define CONFIG_I2C
-#ifndef CONFIG_DM_I2C
#define CONFIG_SYS_I2C
-#else
-/*
- * Enable CONFIG_DM_I2C_COMPAT temporarily until all the i2c client
- * devices are adopted to DM
- */
-#define CONFIG_DM_I2C_COMPAT
#endif
/*
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index 8a4839ee882..6977995246d 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -12,6 +12,19 @@
#include <dm/ofnode.h>
/**
+ * uclass_find_next_free_req_seq() - Get the next free req_seq number
+ *
+ * This returns the next free req_seq number. This is useful only if
+ * OF_CONTROL is not used. The next free req_seq number is simply the
+ * maximum req_seq of the uclass + 1.
+ * This allows assiging req_seq number in the binding order.
+ *
+ * @id: Id number of the uclass
+ * @return The next free req_seq number
+ */
+int uclass_find_next_free_req_seq(enum uclass_id id);
+
+/**
* uclass_get_device_tail() - handle the end of a get_device call
*
* This handles returning an error or probing a device as needed.
diff --git a/include/fdtdec.h b/include/fdtdec.h
index b15da00fb28..f1bcbf837ff 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -951,6 +951,27 @@ int fdtdec_setup_memory_banksize(void);
*/
int fdtdec_setup(void);
+#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
+/**
+ * fdtdec_resetup() - Set up the device tree again
+ *
+ * The main difference with fdtdec_setup() is that it returns if the fdt has
+ * changed because a better match has been found.
+ * This is typically used for boards that rely on a DM driver to detect the
+ * board type. This function sould be called by the board code after the stuff
+ * needed by board_fit_config_name_match() to operate porperly is available.
+ * If this functions signals that a rescan is necessary, the board code must
+ * unbind all the drivers using dm_uninit() and then rescan the DT with
+ * dm_init_and_scan().
+ *
+ * @param rescan Returns a flag indicating that fdt has changed and rescanning
+ * the fdt is required
+ *
+ * @return 0 if OK, -ve on error
+ */
+int fdtdec_resetup(int *rescan);
+#endif
+
/**
* Board-specific FDT initialization. Returns the address to a device tree blob.
* Called when CONFIG_OF_BOARD is defined, or if CONFIG_OF_SEPARATE is defined
diff --git a/include/palmas.h b/include/palmas.h
index 229de537157..20c7e489c1c 100644
--- a/include/palmas.h
+++ b/include/palmas.h
@@ -117,6 +117,7 @@
#define BB_VSEL_VBAT (3 << 1)
#define BB_CHRG_EN (1 << 0)
+#ifndef CONFIG_DM_I2C
/*
* Functions to read and write from TPS659038/TWL6035/TWL6037
* or other Palmas family of TI PMICs
@@ -130,6 +131,10 @@ static inline int palmas_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
{
return i2c_read(chip_no, reg, 1, val, 1);
}
+#else
+int palmas_i2c_write_u8(u8 chip_no, u8 reg, u8 val);
+int palmas_i2c_read_u8(u8 chip_no, u8 reg, u8 *val);
+#endif
void palmas_init_settings(void);
int palmas_mmc1_poweron_ldo(uint ldo_volt, uint ldo_ctrl, uint voltage);
diff --git a/include/power/tps65217.h b/include/power/tps65217.h
index 00fbab80cb8..669a94a6c87 100644
--- a/include/power/tps65217.h
+++ b/include/power/tps65217.h
@@ -80,6 +80,8 @@ enum {
#define TPS65217_PWR_SRC_USB_BITMASK 0x4
#define TPS65217_PWR_SRC_AC_BITMASK 0x8
+int power_tps65217_init(unsigned char bus);
+
int tps65217_reg_read(uchar src_reg, uchar *src_val);
int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
uchar mask);
diff --git a/include/power/tps65910.h b/include/power/tps65910.h
index 48e0b2c5aba..21b2a21ee04 100644
--- a/include/power/tps65910.h
+++ b/include/power/tps65910.h
@@ -72,6 +72,7 @@ enum {
#define TPS65910_DEVCTRL_REG_SR_CTL_I2C_SEL_SR_I2C (0x0 << 4)
#define TPS65910_DEVCTRL_REG_SR_CTL_I2C_SEL_CTL_I2C (0x1 << 4)
+int power_tps65910_init(unsigned char bus);
int tps65910_set_i2c_control(void);
int tps65910_voltage_update(unsigned int module, unsigned char vddx_op_vol_sel);
#endif /* __POWER_TPS65910_H__ */
diff --git a/include/twl4030.h b/include/twl4030.h
index 46a93062462..c27ad615eeb 100644
--- a/include/twl4030.h
+++ b/include/twl4030.h
@@ -648,6 +648,7 @@
* examples are TWL4030_PM_RECEIVER_VMMC1_DEV_GRP and
* TWL4030_LED_LEDEN.
*/
+#ifndef CONFIG_DM_I2C
static inline int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
{
return i2c_write(chip_no, reg, 1, &val, 1);
@@ -657,7 +658,10 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
{
return i2c_read(chip_no, reg, 1, val, 1);
}
-
+#else
+int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val);
+int twl4030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val);
+#endif
/*
* Power
*/
diff --git a/include/twl6030.h b/include/twl6030.h
index 66853439edb..41f17de3ab5 100644
--- a/include/twl6030.h
+++ b/include/twl6030.h
@@ -186,6 +186,7 @@ struct twl6030_data{
};
/* Functions to read and write from TWL6030 */
+#ifndef CONFIG_DM_I2C
static inline int twl6030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
{
return i2c_write(chip_no, reg, 1, &val, 1);
@@ -195,6 +196,10 @@ static inline int twl6030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
{
return i2c_read(chip_no, reg, 1, val, 1);
}
+#else
+int twl6030_i2c_write_u8(u8 chip_no, u8 reg, u8 val);
+int twl6030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val);
+#endif
/*
* Power