Skip to content

Commit

Permalink
rockpro64 ltimer: Use IRQ number for second timer
Browse files Browse the repository at this point in the history
The second timer in the rockpro should be initialised using the IRQ
number assigned to the first timer rather than that handler ID.

Fixes seL4/sel4test#25

Signed-off-by: Curtis Millar <[email protected]>
  • Loading branch information
xurtis committed Sep 9, 2020
1 parent 6d97b4d commit 040ccee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libplatsupport/src/plat/rockpro64/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int rk_init_secondary(rk_t *rk, rk_t *rkp, ps_io_ops_t ops, rk_config_t config)
rk->hw = (void *)((uintptr_t) rkp->rk_map_base) + 0x20;
/* similarly, the IRQ for this secondary timer is offset by 1 */
rk->irq_id = PS_INVALID_IRQ_ID;
ps_irq_t irq2 = { .type = PS_INTERRUPT, .irq.number = rkp->irq_id + 1 };
ps_irq_t irq2 = { .type = PS_INTERRUPT, .irq.number = rkp->irq.irq.number + 1 };
irq_id_t irq2_id = ps_irq_register(&ops.irq_ops, irq2, rk_handle_irq, rk);
if (irq2_id < 0) {
ZF_LOGE("Failed to register secondary irq for rk timer");
Expand Down

0 comments on commit 040ccee

Please sign in to comment.