summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-08-15 21:40:35 +0200
committerHarald Welte <laforge@gnumonks.org>2011-08-15 21:40:35 +0200
commitea85282e09d635c64b4a304dd9d556695e74830f (patch)
tree9790d6ee8bfb1520e15643fea686737151c1042a
parent7d31d475b63e058dad4e1d0b9b5b21fdd1193af9 (diff)
DBGU: Print Reset controller Status Register on boot
This helps us to discover _why_ the CPU has been rebooted.
-rw-r--r--firmware/src/os/dbgu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/src/os/dbgu.c b/firmware/src/os/dbgu.c
index 28d86a4..113208e 100644
--- a/firmware/src/os/dbgu.c
+++ b/firmware/src/os/dbgu.c
@@ -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);
}
/*
personal git repositories of Harald Welte. Your mileage may vary