From 18d66533ac773f59efc93e5c19971fad5e6af82f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 10 Apr 2014 20:01:25 -0600 Subject: move CLI prototypes to cli.h and add comments Move the CLI prototypes from common.h to cli.h as part of an effort to reduce the size of common.h. Signed-off-by: Simon Glass --- common/cmd_pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common/cmd_pci.c') diff --git a/common/cmd_pci.c b/common/cmd_pci.c index d3e7c08..ddda207 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include -- cgit v1.1 From e1bf824dfd6881f6f633238c275bfa1e5d83c433 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 10 Apr 2014 20:01:27 -0600 Subject: Add cli_ prefix to readline functions This makes it clear where the code resides. Signed-off-by: Simon Glass --- common/cmd_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/cmd_pci.c') diff --git a/common/cmd_pci.c b/common/cmd_pci.c index ddda207..1ed55ce 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -346,7 +346,7 @@ pci_cfg_modify (pci_dev_t bdf, ulong addr, ulong size, ulong value, int incrflag printf(" %02x", val1); } - nbytes = readline (" ? "); + nbytes = cli_readline(" ? "); if (nbytes == 0 || (nbytes == 1 && console_buffer[0] == '-')) { /* pressed as only input, don't modify current * location and move to next. "-" pressed will go back. -- cgit v1.1 From 0098e179e1afacb3cf595c67a98b8739dc7edcde Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 10 Apr 2014 20:01:30 -0600 Subject: Move bootretry code into bootretry.c and clean up This code is only used by one board, so it seems a shame to clutter up the readline code with it. Move it into its own file. Signed-off-by: Simon Glass --- common/cmd_pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common/cmd_pci.c') diff --git a/common/cmd_pci.c b/common/cmd_pci.c index 1ed55ce..180b35a 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include -- cgit v1.1 From b26440f1fa243396000536028ea00e5e185b6b6a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 10 Apr 2014 20:01:31 -0600 Subject: 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 --- common/cmd_pci.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'common/cmd_pci.c') diff --git a/common/cmd_pci.c b/common/cmd_pci.c index 180b35a..a1ba42e 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -355,9 +355,8 @@ pci_cfg_modify (pci_dev_t bdf, ulong addr, ulong size, ulong value, int incrflag if (incrflag) addr += nbytes ? -size : size; nbytes = 1; -#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) { @@ -369,11 +368,9 @@ pci_cfg_modify (pci_dev_t bdf, ulong addr, ulong size, ulong value, int incrflag i = simple_strtoul(console_buffer, &endp, 16); 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(); pci_cfg_write (bdf, addr, size, i); if (incrflag) addr += size; -- cgit v1.1