diff mbox

[U-Boot,RFC,4/7] fpga/spartan3: make output quieter

Message ID 20161122084902.20890-5-judge.packham@gmail.com
State RFC
Delegated to: Michal Simek
Headers show

Commit Message

Chris Packham Nov. 22, 2016, 8:48 a.m. UTC
Suppress some putc calls with CONFIG_SYS_FPGA_PROG_FEEDBACK.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

 drivers/fpga/spartan3.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Michal Simek Nov. 23, 2016, 12:14 p.m. UTC | #1
On 22.11.2016 09:48, Chris Packham wrote:
> Suppress some putc calls with CONFIG_SYS_FPGA_PROG_FEEDBACK.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
> 
>  drivers/fpga/spartan3.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c
> index 759ad95e2afc..34aa097ab6c2 100644
> --- a/drivers/fpga/spartan3.c
> +++ b/drivers/fpga/spartan3.c
> @@ -428,7 +428,9 @@ static int spartan3_ss_load(xilinx_desc *desc, const void *buf, size_t bsize)
>  			CONFIG_FPGA_DELAY ();
>  			(*fn->clk) (true, true, cookie);	/* Assert the clock pin */
>  
> +#ifdef CONFIG_FPGA_PROG_FEEDBACK
>  			putc ('*');
> +#endif
>  
>  			if (get_timer (ts) > CONFIG_SYS_FPGA_WAIT) {	/* check the time */
>  				puts ("** Timeout waiting for DONE to clear.\n");
> @@ -436,7 +438,9 @@ static int spartan3_ss_load(xilinx_desc *desc, const void *buf, size_t bsize)
>  				break;
>  			}
>  		}
> +#ifdef CONFIG_FPGA_PROG_FEEDBACK
>  		putc ('\n');			/* terminate the dotted line */
> +#endif
>  
>  		/*
>  		 * Run the post configuration function if there is one.
> 

How does the output look like?

Thanks,
Michal
diff mbox

Patch

diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c
index 759ad95e2afc..34aa097ab6c2 100644
--- a/drivers/fpga/spartan3.c
+++ b/drivers/fpga/spartan3.c
@@ -428,7 +428,9 @@  static int spartan3_ss_load(xilinx_desc *desc, const void *buf, size_t bsize)
 			CONFIG_FPGA_DELAY ();
 			(*fn->clk) (true, true, cookie);	/* Assert the clock pin */
 
+#ifdef CONFIG_FPGA_PROG_FEEDBACK
 			putc ('*');
+#endif
 
 			if (get_timer (ts) > CONFIG_SYS_FPGA_WAIT) {	/* check the time */
 				puts ("** Timeout waiting for DONE to clear.\n");
@@ -436,7 +438,9 @@  static int spartan3_ss_load(xilinx_desc *desc, const void *buf, size_t bsize)
 				break;
 			}
 		}
+#ifdef CONFIG_FPGA_PROG_FEEDBACK
 		putc ('\n');			/* terminate the dotted line */
+#endif
 
 		/*
 		 * Run the post configuration function if there is one.