diff options
author | Markus Niebel <Markus.Niebel@tq-group.com> | 2014-11-18 13:22:56 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-11-20 10:30:21 +0100 |
commit | fd53ec5bafc36db37f6ced7b3a27b98b6311a2ee (patch) | |
tree | 6248cebbc85961f0f453a2fd41a6d2c9bb25e42b /board/tqc/tqma6 | |
parent | 8cc65d383eed2a51ecb549b1c5ca244159af4cad (diff) | |
download | u-boot-fd53ec5bafc36db37f6ced7b3a27b98b6311a2ee.tar.gz u-boot-fd53ec5bafc36db37f6ced7b3a27b98b6311a2ee.tar.xz u-boot-fd53ec5bafc36db37f6ced7b3a27b98b6311a2ee.zip |
tqma6: add warning on failed setup_i2c
setup_i2c has a return value. Use it to give feedback
on error.
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
Diffstat (limited to 'board/tqc/tqma6')
-rw-r--r-- | board/tqc/tqma6/tqma6.c | 10 | ||||
-rw-r--r-- | board/tqc/tqma6/tqma6_mba6.c | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 5e913d7cf7..b7f4eb7633 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -181,8 +181,14 @@ static struct i2c_pads_info tqma6_i2c3_pads = { static void tqma6_setup_i2c(void) { - /* use logical index for bus, e.g. I2C1 -> 0 */ - setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &tqma6_i2c3_pads); + int ret; + /* + * use logical index for bus, e.g. I2C1 -> 0 + * warn on error + */ + ret = setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &tqma6_i2c3_pads); + if (ret) + printf("setup I2C3 failed: %d\n", ret); } int board_early_init_f(void) diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c index fd592875d8..6f4cffd95e 100644 --- a/board/tqc/tqma6/tqma6_mba6.c +++ b/board/tqc/tqma6/tqma6_mba6.c @@ -224,8 +224,14 @@ static struct i2c_pads_info mba6_i2c1_pads = { static void mba6_setup_i2c(void) { - /* use logical index for bus, e.g. I2C1 -> 0 */ - setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &mba6_i2c1_pads); + int ret; + /* + * use logical index for bus, e.g. I2C1 -> 0 + * warn on error + */ + ret = setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &mba6_i2c1_pads); + if (ret) + printf("setup I2C1 failed: %d\n", ret); } |