You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/11 16:48:44 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6034: arch/risc-v: Apply common mtime driver to mtime based chps

pkarashchenko commented on code in PR #6034:
URL: https://github.com/apache/incubator-nuttx/pull/6034#discussion_r847538224


##########
arch/risc-v/src/c906/c906_timerisr.c:
##########
@@ -117,15 +64,7 @@ static int c906_timerisr(int irq, void *context, void *arg)
 
 void up_timer_initialize(void)
 {
-  /* Attach timer interrupt handler */
-
-  irq_attach(RISCV_IRQ_MTIMER, c906_timerisr, NULL);
-
-  /* Reload CLINT mtimecmp */
-
-  c906_reload_mtimecmp();
-
-  /* And enable the timer interrupt */
-
-  up_enable_irq(RISCV_IRQ_MTIMER);
+  up_alarm_set_lowerhalf(riscv_mtimer_initialize(

Review Comment:
   can we use temp variable here, just for easy reading?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org