[rtems commit] leon,gr740: start ASR22: 23 up-counter on boot by writing ASR22

Daniel Hellstrom danielh at rtems.org
Wed Oct 25 10:54:00 UTC 2017


Module:    rtems
Branch:    master
Commit:    cfc360410014bec4043f92122d880857e4544974
Changeset: http://git.rtems.org/rtems/commit/?id=cfc360410014bec4043f92122d880857e4544974

Author:    Daniel Hellstrom <daniel at gaisler.com>
Date:      Tue Sep 12 11:24:48 2017 +0200

leon,gr740: start ASR22:23 up-counter on boot by writing ASR22

According to data sheet bit 31 in ASR22 must be written with a zero
to start the up-counter. GRMON starts the up-counter for us. This
patch is important when running in "flight" from ROM without GRMON.

---

 c/src/lib/libbsp/sparc/leon3/include/leon.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
index 9b2597f..758b760 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
@@ -482,7 +482,7 @@ static inline uint32_t leon3_up_counter_high(void)
 static inline void leon3_up_counter_enable(void)
 {
   __asm__ volatile (
-    "mov %g0, %asr23"
+    "mov %g0, %asr22"
   );
 }
 



More information about the vc mailing list