# HG changeset patch # User Paul Boddie # Date 1713536527 -7200 # Node ID 596485dfef517b505be084ec27f37e0eb2fd75b9 # Parent 4ada53e03ac6bb2cff0c520103a54edecf226887 Parameterised TCU interrupt usage, avoiding TCU0 on the JZ4780 which is currently reserved for the kernel timer. diff -r 4ada53e03ac6 -r 596485dfef51 pkg/landfall-examples/hw_info/defs.h --- a/pkg/landfall-examples/hw_info/defs.h Fri Apr 19 16:19:49 2024 +0200 +++ b/pkg/landfall-examples/hw_info/defs.h Fri Apr 19 16:22:07 2024 +0200 @@ -104,5 +104,6 @@ extern void *tcu_channels[]; extern const unsigned int num_tcu_channels; +extern const unsigned int tcu_irq_num; extern l4_cap_idx_t tcu_irq; diff -r 4ada53e03ac6 -r 596485dfef51 pkg/landfall-examples/hw_info/hw_info.c --- a/pkg/landfall-examples/hw_info/hw_info.c Fri Apr 19 16:19:49 2024 +0200 +++ b/pkg/landfall-examples/hw_info/hw_info.c Fri Apr 19 16:22:07 2024 +0200 @@ -1527,7 +1527,7 @@ /* Here, only one IRQ is used. */ tcu_irq = l4re_util_cap_alloc(); - return init_irq(0, tcu_irq, tcu_irq_start, tcu_irq_end); + return init_irq(tcu_irq_num, tcu_irq, tcu_irq_start, tcu_irq_end); } static void disable_tcu_counter(void) diff -r 4ada53e03ac6 -r 596485dfef51 pkg/landfall-examples/hw_info/jz4780.c --- a/pkg/landfall-examples/hw_info/jz4780.c Fri Apr 19 16:19:49 2024 +0200 +++ b/pkg/landfall-examples/hw_info/jz4780.c Fri Apr 19 16:22:07 2024 +0200 @@ -770,5 +770,6 @@ void *tcu_channels[] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; const unsigned int num_tcu_channels = 8; +const unsigned int tcu_irq_num = 1; l4_cap_idx_t tcu_irq = L4_INVALID_CAP; diff -r 4ada53e03ac6 -r 596485dfef51 pkg/landfall-examples/hw_info/x1600.c --- a/pkg/landfall-examples/hw_info/x1600.c Fri Apr 19 16:19:49 2024 +0200 +++ b/pkg/landfall-examples/hw_info/x1600.c Fri Apr 19 16:22:07 2024 +0200 @@ -742,5 +742,6 @@ void *tcu_channels[] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; const unsigned int num_tcu_channels = 8; +const unsigned int tcu_irq_num = 0; l4_cap_idx_t tcu_irq = L4_INVALID_CAP;