Add reboot function back into ts7800.S
authorMichael Spang <mspang@csclub.uwaterloo.ca>
Thu, 24 Mar 2011 19:48:37 +0000 (15:48 -0400)
committerMichael Spang <mspang@csclub.uwaterloo.ca>
Thu, 24 Mar 2011 19:48:37 +0000 (15:48 -0400)
It's useful to hard reboot if everything crashes and burns or if you
don't want to bother tearing down everything for return to U-Boot.

ts7800.S

index fdad145..697fee2 100644 (file)
--- a/ts7800.S
+++ b/ts7800.S
@@ -4,3 +4,13 @@ ts7800_start:
   bl main
   ldr lr, [sp], #4
   bx lr
+
+ts7800_reboot:
+  ldr r0, =0xf1020000
+  ldr r1, [r0, #0x108]
+  orr r1, r1, #4
+  str r1, [r0, #0x108]
+  ldr r1, [r0, #0x10c]
+  orr r1, r1, #1
+  str r1, [r0, #0x10c]
+  b .