[PATCH] Update udbg_progress() to display the integer

Timur Tabi timur at freescale.com
Wed Feb 7 10:08:30 EST 2007


Olof Johansson wrote:
> On Mon, Feb 05, 2007 at 01:51:55PM -0600, Timur Tabi wrote:
>> Although udbg_progress() takes a string and a short as parameters, only
>> the string is displayed.  This patch also displays the integer, if it's not
>> equal to 0xFFFF.  This gives callers the option to display only the string.
> 
> Some platforms do this already, but they output the numbers first. It's
> a good idea to stay consistent with that.
> 
> See maple_progress, ps3_progress and friends for templates. They're
> quite verbose though.

Actually, they're just one line each:

static void __init maple_progress(char *s, unsigned short hex)
{
	printk("*** %04x : %s\n", hex, s ? s : "");
}

static void __init ps3_progress(char *s, unsigned short hex)
{
	printk("*** %04x : %s\n", hex, s ? s : "");
}

The reason I can't use the same exact printk() is because of this code in 
function ppc_init():

	/* clear the progress line */
	if ( ppc_md.progress ) ppc_md.progress("             ", 0xffff);

If I could get rid of this line, then I wouldn't need to check for "hex == 
0xFFFF", but I don't know why ppc_init() thinks it needs to "clear the progress 
line".  Maybe this is for some kind of LED display.

I'll submit a new patch in a minute.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale



More information about the Linuxppc-dev mailing list