1.1 --- a/stage2/board-minipc.c Tue Jun 23 23:05:00 2015 +0200
1.2 +++ b/stage2/board-minipc.c Tue Jun 23 23:08:19 2015 +0200
1.3 @@ -62,7 +62,7 @@
1.4 unsigned long lastdec;
1.5
1.6 /*
1.7 - * timer without interrupts
1.8 + * Timer without interrupts.
1.9 */
1.10
1.11 int timer_init(void)
1.12 @@ -72,12 +72,25 @@
1.13 __ost_set_count(TIMER_CHAN, TIMER_FDATA);
1.14 __ost_enable_channel(TIMER_CHAN);
1.15
1.16 + __cpm_start_ost();
1.17 +
1.18 lastdec = TIMER_FDATA;
1.19 timestamp = 0;
1.20
1.21 return 0;
1.22 }
1.23
1.24 +/* Timer interrupt activation. */
1.25 +
1.26 +void timer_init_irq(void)
1.27 +{
1.28 + __ost_enable_interrupt(TIMER_CHAN);
1.29 + /* NOTE: Need flag clearing? */
1.30 + __intc_unmask_irq(TIMER_CHAN_IRQ);
1.31 +}
1.32 +
1.33 +/* Board startup detection. */
1.34 +
1.35 int is_started(void)
1.36 {
1.37 return REG_CPM_MSCR != 0;