All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH PPC_4xx V3] Print simple row of dots instead of spinning wheel
Date: Mon, 27 Oct 2008 15:18:37 +0100	[thread overview]
Message-ID: <200810271518.37541.matthias.fuchs@esd-electronics.com> (raw)
In-Reply-To: <1224759565-1334-1-git-send-email-wd@denx.de>

Hi Wolfgang,

please do not remove the spinning cursor from the 'esd' files.

a) Changing this will trigger some documentation update processes which
I do not like :-)
b) Your patch results in 10 dots per second. Sometimes the touched boards
stay a long time in the waiting states and I want to keep the previous messages
in my console. Lots of dots will scroll them out.
c) I like the spinning cursor :-)
d) The control characters did not cause trouble for me or our customers so far.

So please accept my NAK.

Matthias

On Thursday 23 October 2008 12:59, Wolfgang Denk wrote:
> Replace the "spinning wheel" eye candy by printing a simple  row  of
> dots. This avoids problems with control charactersin log files etc.
> 
> Also, it saves a few bytes.
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> Hey, seems I'm heading for the record of submitting the maximum
> number of patch versions in the shorted time :-(
> 
> This patch version fixes a few typos in the first version, and gets
> rid of a few variables no longer needed because of the changes.
> 
>  board/esd/common/cmd_loadpci.c      |    6 +-----
>  board/esd/pci405/cmd_pci405.c       |    6 +-----
>  board/esd/pmc440/cmd_pmc440.c       |    6 +-----
>  cpu/ppc4xx/44x_spd_ddr2.c           |   14 ++++----------
>  cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c |   16 ++++------------
>  5 files changed, 11 insertions(+), 37 deletions(-)
> 
> diff --git a/board/esd/common/cmd_loadpci.c b/board/esd/common/cmd_loadpci.c
> index d88b387..aaf8b0c 100644
> --- a/board/esd/common/cmd_loadpci.c
> +++ b/board/esd/common/cmd_loadpci.c
> @@ -38,9 +38,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  {
>  	unsigned int *ptr = 0;
>  	int count = 0;
> -	int count2 = 0;
>  	char addr[16];
> -	char str[] = "\\|/-";
>  	char *local_args[2];
>  
>  	while(1) {
> @@ -59,9 +57,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  		while (*ptr == 0xffffffff) {
>  			count++;
>  			if (!(count % 100)) {
> -				count2++;
> -				putc(0x08); /* backspace */
> -				putc(str[count2 % 4]);
> +				putc('.');
>  			}
>  
>  			/* Abort if ctrl-c was pressed */
> diff --git a/board/esd/pci405/cmd_pci405.c b/board/esd/pci405/cmd_pci405.c
> index 5c717e2..9ffe686 100644
> --- a/board/esd/pci405/cmd_pci405.c
> +++ b/board/esd/pci405/cmd_pci405.c
> @@ -47,11 +47,9 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  {
>  	unsigned int *ptr = 0;
>  	int count = 0;
> -	int count2 = 0;
>  	int status;
>  	int i;
>  	char addr[16];
> -	char str[] = "\\|/-";
>  	char *local_args[2];
>  
>  	/*
> @@ -67,9 +65,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  	while (*ptr == 0xffffffff) {
>  		count++;
>  		if (!(count % 100)) {
> -			count2++;
> -			putc(0x08); /* backspace */
> -			putc(str[count2 % 4]);
> +			putc('.');
>  		}
>  
>  		/* Abort if ctrl-c was pressed */
> diff --git a/board/esd/pmc440/cmd_pmc440.c b/board/esd/pmc440/cmd_pmc440.c
> index 38ee74e..42d2fe6 100644
> --- a/board/esd/pmc440/cmd_pmc440.c
> +++ b/board/esd/pmc440/cmd_pmc440.c
> @@ -121,10 +121,8 @@ int do_fifo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  	int i;
>  	int n = 0;
>  	u32 ctrl, data, f;
> -	char str[] = "\\|/-";
>  	int abort = 0;
>  	int count = 0;
> -	int count2 = 0;
>  
>  	switch (argc) {
>  	case 1:
> @@ -174,9 +172,7 @@ int do_fifo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  				while (!got_fifoirq) {
>  					count++;
>  					if (!(count % 100)) {
> -						count2++;
> -						putc(0x08); /* backspace */
> -						putc(str[count2 % 4]);
> +						putc('.');
>  					}
>  
>  					/* Abort if ctrl-c was pressed */
> diff --git a/cpu/ppc4xx/44x_spd_ddr2.c b/cpu/ppc4xx/44x_spd_ddr2.c
> index b40e4b1..586fa74 100644
> --- a/cpu/ppc4xx/44x_spd_ddr2.c
> +++ b/cpu/ppc4xx/44x_spd_ddr2.c
> @@ -2362,10 +2362,8 @@ static void program_ecc_addr(unsigned long start_address,
>  	unsigned long end_address;
>  	unsigned long address_increment;
>  	unsigned long mcopt1;
> -	char str[] = "ECC generation -";
> -	char slash[] = "\\|/-\\|/-";
> +	char str[] = "ECC generation: ";
>  	int loop = 0;
> -	int loopi = 0;
>  
>  	current_address = start_address;
>  	mfsdram(SDRAM_MCOPT1, mcopt1);
> @@ -2390,8 +2388,7 @@ static void program_ecc_addr(unsigned long start_address,
>  				current_address += address_increment;
>  
>  				if ((loop++ % (2 << 20)) == 0) {
> -					putc('\b');
> -					putc(slash[loopi++ % 8]);
> +					putc('.');
>  				}
>  			}
>  
> @@ -2571,9 +2568,7 @@ static void DQS_calibration_process(void)
>  	u32 rqfd;
>  	u32 rqfd_start;
>  	u32 rqfd_average;
> -	int loopi = 0;
> -	char str[] = "Auto calibration -";
> -	char slash[] = "\\|/-\\|/-";
> +	char str[] = "Auto calibration: ";
>  
>  	/*------------------------------------------------------------------
>  	 * Test to determine the best read clock delay tuning bits.
> @@ -2760,8 +2755,7 @@ calibration_loop:
>  	 *-----------------------------------------------------------------*/
>  	if (window_found == FALSE) {
>  		if (rqfd_start < SDRAM_RQDC_RQFD_MAX) {
> -			putc('\b');
> -			putc(slash[loopi++ % 8]);
> +			putc('.');
>  
>  			/* try again from with a different RQFD start value */
>  			rqfd_start++;
> diff --git a/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c b/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
> index 1e3e20d..109bcc7 100644
> --- a/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
> +++ b/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
> @@ -428,9 +428,6 @@ static u32 DQS_calibration_methodA(struct ddrautocal *cal)
>  #endif
>  	ulong rdcc;
>  
> -	char slash[] = "\\|/-\\|/-";
> -	int loopi = 0;
> -
>  	/* start */
>  	in_window = 0;
>  
> @@ -483,15 +480,13 @@ static u32 DQS_calibration_methodA(struct ddrautocal *cal)
>  	debug("<%s>SDRAM_RFDC=0x%x\n", __func__, temp);
>  #endif
>  
> -	putc(' ');
>  	for (rqfd = 0; rqfd <= SDRAM_RQDC_RQFD_MAX; rqfd++) {
>  
>  		mfsdram(SDRAM_RQDC, rqdc_reg);
>  		rqdc_reg &= ~(SDRAM_RQDC_RQFD_MASK);
>  		mtsdram(SDRAM_RQDC, rqdc_reg | SDRAM_RQDC_RQFD_ENCODE(rqfd));
>  
> -		putc('\b');
> -		putc(slash[loopi++ % 8]);
> +		putc('.');
>  
>  		curr_win_min.rffd = 0;
>  		curr_win_max.rffd = 0;
> @@ -944,8 +939,6 @@ u32 DQS_autocalibration(void)
>  	u32 val;
>  	int verbose_lvl = 0;
>  	char *str;
> -	char slash[] = "\\|/-\\|/-";
> -	int loopi = 0;
>  	struct sdram_timing *scan_list;
>  
>  #if defined(DEBUG_PPC4xx_DDR_AUTOCALIBRATION)
> @@ -962,9 +955,9 @@ u32 DQS_autocalibration(void)
>  
>  	mfsdram(SDRAM_MCOPT1, val);
>  	if ((val & SDRAM_MCOPT1_MCHK_CHK_REP) == SDRAM_MCOPT1_MCHK_CHK_REP)
> -		str = "ECC Auto calibration -";
> +		str = "ECC Auto calibration: ";
>  	else
> -		str = "Auto calibration -";
> +		str = "Auto calibration: ";
>  
>  	puts(str);
>  
> @@ -1000,8 +993,7 @@ u32 DQS_autocalibration(void)
>  
>  		relock_memory_DLL();
>  
> -		putc('\b');
> -		putc(slash[loopi++ % 8]);
> +		putc('.');
>  
>  #ifdef DEBUG
>  		debug("\n");

-- 
-------------------------------------------------------------------------
Dipl.-Ing. Matthias Fuchs
Head of System Design

esd electronic system design gmbh
Vahrenwalder Str. 207 - 30165 Hannover - GERMANY
Phone: +49-511-37298-0 - Fax: +49-511-37298-68
Please visit our homepage http://www.esd.eu
Quality Products - Made in Germany
-------------------------------------------------------------------------
Gesch?ftsf?hrer: Klaus Detering, Dr. Werner Schulze
Amtsgericht Hannover HRB 51373 - VAT-ID DE 115672832
-------------------------------------------------------------------------

  parent reply	other threads:[~2008-10-27 14:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 10:59 [U-Boot] [PATCH PPC_4xx V3] Print simple row of dots instead of spinning wheel Wolfgang Denk
2008-10-23 11:08 ` Stefan Roese
2008-10-23 11:17   ` Wolfgang Denk
2008-10-28 23:05   ` Wolfgang Denk
2008-10-27 14:18 ` Matthias Fuchs [this message]
2008-10-30 23:19 ` Wolfgang Denk
2008-10-31  7:54   ` Stefan Roese
2008-10-31  8:45     ` Wolfgang Denk
2008-10-31  9:09       ` Stefan Roese
2008-10-31 11:20         ` Wolfgang Denk
2008-10-31 12:06           ` Stefan Roese
2008-10-31 12:41             ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810271518.37541.matthias.fuchs@esd-electronics.com \
    --to=matthias.fuchs@esd-electronics.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.