DBGU: Print Reset controller Status Register on boot

This helps us to discover _why_ the CPU has been rebooted.
This commit is contained in:
Harald Welte 2011-08-15 21:40:35 +02:00
parent 7d31d475b6
commit ea85282e09
1 changed files with 4 additions and 0 deletions

View File

@ -123,6 +123,8 @@ void dbgu_rb_init(void);
//*----------------------------------------------------------------------------
void AT91F_DBGU_Init(void)
{
unsigned int rst_status = AT91F_RSTGetStatus(AT91C_BASE_RSTC);
dbgu_rb_init();
//* Open PIO for DBGU
@ -155,6 +157,8 @@ void AT91F_DBGU_Init(void)
AT91F_DBGU_Printk("\n\rDEBUG Interface:\n\r"
"0) Set Pull-up 1) Clear Pull-up 2) Toggle LED1 3) "
"Toggle LED2\r\n9) Reset\n\r");
debugp("RSTC_SR=0x%08x\n", rst_status);
}
/*