Rev 3664 | Rev 3770 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3664 | Rev 3742 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | /** Initialize tick and stick interrupt. */ |
48 | /** Initialize tick and stick interrupt. */ |
49 | void tick_init(void) |
49 | void tick_init(void) |
50 | { |
50 | { |
51 | /* initialize TICK interrupt */ |
51 | /* initialize TICK interrupt */ |
52 | tick_compare_reg_t compare; |
52 | tick_compare_reg_t compare; |
- | 53 | ||
53 | interrupt_register(14, "tick_int", tick_interrupt); |
54 | interrupt_register(14, "tick_int", tick_interrupt); |
54 | compare.int_dis = false; |
55 | compare.int_dis = false; |
55 | compare.tick_cmpr = CPU->arch.clock_frequency / HZ; |
56 | compare.tick_cmpr = CPU->arch.clock_frequency / HZ; |
56 | CPU->arch.next_tick_cmpr = compare.tick_cmpr; |
57 | CPU->arch.next_tick_cmpr = compare.tick_cmpr; |
57 | tick_compare_write(compare.value); |
58 | tick_compare_write(compare.value); |
Line 78... | Line 79... | ||
78 | * @param n Interrupt Level, 14, (can be ignored) |
79 | * @param n Interrupt Level, 14, (can be ignored) |
79 | * @param istate Interrupted state. |
80 | * @param istate Interrupted state. |
80 | */ |
81 | */ |
81 | void tick_interrupt(int n, istate_t *istate) |
82 | void tick_interrupt(int n, istate_t *istate) |
82 | { |
83 | { |
83 | - | ||
84 | softint_reg_t softint, clear; |
84 | softint_reg_t softint, clear; |
85 | uint64_t drift; |
85 | uint64_t drift; |
86 | 86 | ||
87 | softint.value = softint_read(); |
87 | softint.value = softint_read(); |
88 | 88 |