summaryrefslogtreecommitdiff
path: root/common/cmd_i2c.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-06-25 10:39:58 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-06-25 10:39:58 +0200
commited1d98d801dfb6384d0f2fff45ce1ebf884944ca (patch)
tree5a9487c67b75606d3a723b7acb9eda8da200c871 /common/cmd_i2c.c
parent754466ac95e92ebf40e25c6af6f13ab9b4d7c87b (diff)
parentba9b42c81b0734d53edfbb1fe4a6ded7de78c5ab (diff)
downloadu-boot-imx-ed1d98d801dfb6384d0f2fff45ce1ebf884944ca.zip
u-boot-imx-ed1d98d801dfb6384d0f2fff45ce1ebf884944ca.tar.gz
u-boot-imx-ed1d98d801dfb6384d0f2fff45ce1ebf884944ca.tar.bz2
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Diffstat (limited to 'common/cmd_i2c.c')
-rw-r--r--common/cmd_i2c.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index ebce7d4..d714658 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -66,6 +66,8 @@
*/
#include <common.h>
+#include <bootretry.h>
+#include <cli.h>
#include <command.h>
#include <edid.h>
#include <environment.h>
@@ -562,9 +564,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg
if (argc != 3)
return CMD_RET_USAGE;
-#ifdef CONFIG_BOOT_RETRY_TIME
- reset_cmd_timeout(); /* got a good command to get here */
-#endif
+ bootretry_reset_cmd_timeout(); /* got a good command to get here */
/*
* We use the last specified parameters, unless new ones are
* entered.
@@ -612,7 +612,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg
printf(" %08lx", data);
}
- nbytes = readline (" ? ");
+ nbytes = cli_readline(" ? ");
if (nbytes == 0) {
/*
* <CR> pressed as only input, don't modify current
@@ -621,9 +621,8 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg
if (incrflag)
addr += size;
nbytes = size;
-#ifdef CONFIG_BOOT_RETRY_TIME
- reset_cmd_timeout(); /* good enough to not time out */
-#endif
+ /* good enough to not time out */
+ bootretry_reset_cmd_timeout();
}
#ifdef CONFIG_BOOT_RETRY_TIME
else if (nbytes == -2)
@@ -640,12 +639,10 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg
data = be32_to_cpu(data);
nbytes = endp - console_buffer;
if (nbytes) {
-#ifdef CONFIG_BOOT_RETRY_TIME
/*
* good enough to not time out
*/
- reset_cmd_timeout();
-#endif
+ bootretry_reset_cmd_timeout();
if (i2c_write(chip, addr, alen, (uchar *)&data, size) != 0)
puts ("Error writing the chip.\n");
#ifdef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS