2007-05-09 Joel Sherrill <joel.sherrill@OARcorp.com>

* console/uart.c, startup/bspclean.c, startup/bspstart.c: Remove debug
	print methods that are redundant with prntk and replace their usage
	with printk.
This commit is contained in:
Joel Sherrill
2007-05-09 17:40:24 +00:00
parent 6e08cf7b01
commit 0bb47ebd65
4 changed files with 17 additions and 67 deletions

View File

@@ -1,3 +1,9 @@
2007-05-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* console/uart.c, startup/bspclean.c, startup/bspstart.c: Remove debug
print methods that are redundant with prntk and replace their usage
with printk.
2007-05-01 Joel Sherrill <joel@OARcorp.com>
* Makefile.am: Tinkering to reduce .text size of minimum executable

View File

@@ -168,8 +168,7 @@ static int uart_read(int minor)
return -1;
}
} else {
debug_printk("Unknown console minor number");
printi(minor);
printk("Unknown console minor number %d\n", minor);
return -1;
}
@@ -197,10 +196,9 @@ static int uart_write(int minor, const char *buf, int len)
continue; /* also either WDOG() or swap()*/
U0THR = (char) buf[i];
}
}else {
debug_printk("Unknown console minor number");
printi(minor);
return -1;
} else {
printk("Unknown console minor number %d\n", minor);
return -1;
}
return 1;
@@ -334,43 +332,3 @@ void UART0_SendStr(char const *str)
UART0_SendByte(*str++); // Send the char
}
}
debug_printk(char *dg_str)
{
UART0_SendStr(dg_str);
UART0_SendStr("\r\n");
}
void printi(unsigned long value)
{
static char istring[9]={0,0,0,0,0,0,0,0,0};
static char tmp[9]={0,0,0,0,0,0,0,0,0};
char *sp;
char *tp = tmp;
long i;
unsigned long v = value;
int index;
for(index=0;index<9;index++)
istring[index]=tmp[index]=0x0;
while (v || tp == tmp)
{
i = v % 16;
v = v / 16;
if (i < 10)
*tp++ = i+'0';
else
*tp++ = i + 'a' - 10;
}
sp = istring;
while (tp > tmp)
*sp++ = *--tp;
tp=tmp;
sp=istring;
debug_printk(istring);
}

View File

@@ -25,14 +25,12 @@ void rtemsReboot (void)
void bsp_cleanup(void)
{
static char line[]="\nEXECUTIVE SHUTDOWN! Any key to reboot...";
/*
* AT this point, the console driver is disconnected => we must
* use polled output/input. This is exactly what printk
* does.
*/
debug_printk("\n");
debug_printk(line);
printk("\nEXECUTIVE SHUTDOWN! Any key to reboot...");
while (uart_poll_read(0) < 0) continue;
/* rtemsReboot(); */

View File

@@ -60,7 +60,6 @@ void bsp_libc_init( void *, uint32_t, int );
void bsp_postdriver_hook(void);
extern void UART0_Ini(void);
extern void printi(unsigned long);
extern void debug_printk(char*);
/**************************************************************************/
/* */
/* NAME: bps_pretasking_hook - Function to setup system before startup */
@@ -201,23 +200,12 @@ void bsp_start_default( void )
UART0_Ini();
#if 0
debug_printk(" bsp_start_defalt");
printi((int)&bsp_start_defalt);
debug_printk(" _bss_free_start");
printi((int)&_bss_free_start);
debug_printk(" free_mem_start");
printi((int)free_mem_start);
debug_printk(" _sdram_base");
printi((int)&_sdram_base);
debug_printk(" _sdram_size");
printi((int)&_sdram_size);
debug_printk(" free_mem_end");
printi((int)free_mem_end);
printk(" bsp_start_default 0x%08x\n", (int)&bsp_start_defalt);
printk(" _bss_free_start 0x%08x\n", (int)&_bss_free_start);
printk(" free_mem_start 0x%08x\n", (int)free_mem_start);
printk(" _sdram_base 0x%08x\n", (int)&_sdram_base);
printk(" _sdram_size 0x%08x\n", (int)&_sdram_size);
printk(" free_mem_end 0x%08x\n", (int)free_mem_end);
#endif
/*