summaryrefslogtreecommitdiff
path: root/firmware/src/os/dbgu.c
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-27 17:26:01 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-27 17:26:01 +0000
commit568a1b28f402496a7867e4d4a8cee0f2094228c3 (patch)
tree9effbcfb5712af3a57ed61e78501d05db35343d7 /firmware/src/os/dbgu.c
parent2db7d2d9d9d5825fd200ebe29962cf42dd998015 (diff)
- add dbgu key '9' for software reset
- fix dbgu welcome message git-svn-id: https://svn.openpcd.org:2342/trunk@233 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/os/dbgu.c')
-rw-r--r--firmware/src/os/dbgu.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/firmware/src/os/dbgu.c b/firmware/src/os/dbgu.c
index d47e7cd..c9016a0 100644
--- a/firmware/src/os/dbgu.c
+++ b/firmware/src/os/dbgu.c
@@ -99,6 +99,11 @@ static void DBGU_irq_handler(void)
AT91F_DBGU_Printk("Toggling LED 2\n\r");
led_toggle(2);
break;
+ case '9':
+ AT91F_DBGU_Printk("Resetting SAM7\n\r");
+ AT91F_RSTSoftReset(AT91C_BASE_RSTC, AT91C_RSTC_PROCRST|
+ AT91C_RSTC_PERRST|AT91C_RSTC_EXTRST);
+ break;
default:
if (_main_dbgu(value) < 0)
AT91F_DBGU_Printk("\n\r");
@@ -146,10 +151,9 @@ void AT91F_DBGU_Init(void)
AT91F_DBGU_Printk(" ");
AT91F_DBGU_Printk(opcd_version.by);
AT91F_DBGU_Printk("\n\r");
- AT91F_DBGU_Printk
- ("\n\r-I- OpenPCD test mode\n\r 0) Set Pull-up 1) Clear Pull-up "
- "2) Toggle LED1 3) Toggle LED2 4) Test RC632\n\r"
- "5) Read RxWait 6) Write RxWait 7) Dump RC632 Regs\n\r");
+ 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");
}
//*----------------------------------------------------------------------------
personal git repositories of Harald Welte. Your mileage may vary