diff options
author | Simon Glass <sjg@chromium.org> | 2014-04-10 20:01:31 -0600 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-05-29 17:49:00 -0400 |
commit | b26440f1fa243396000536028ea00e5e185b6b6a (patch) | |
tree | 5a49215c1ccf6fcb80d4abc476f04df39556b6d0 /common/cmd_i2c.c | |
parent | 0098e179e1afacb3cf595c67a98b8739dc7edcde (diff) |
Rename bootretry functions and remove #ifdefs
Add a bootretry_ prefix to these two functions, and remove the need for
the #ifdef around everything (it moves to the Makefile).
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_i2c.c')
-rw-r--r-- | common/cmd_i2c.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 4fa12138c35..d714658d7f5 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -564,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. @@ -623,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) @@ -642,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 |