1.1 --- a/pkg/devices/lib/dma/src/jz4730.cc Wed Jun 05 13:51:55 2024 +0200
1.2 +++ b/pkg/devices/lib/dma/src/jz4730.cc Thu Jun 06 23:57:07 2024 +0200
1.3 @@ -251,7 +251,10 @@
1.4 // Ensure an absence of address error and halt conditions globally and in this channel.
1.5
1.6 if (error() || halted())
1.7 - return 0;
1.8 + {
1.9 + printf("Cleared:%s%s\n", error() ? " error" : "", halted() ? " halted" : "");
1.10 + clear_errors();
1.11 + }
1.12
1.13 // Ensure an absence of transaction completed and zero transfer count for this channel.
1.14
1.15 @@ -371,6 +374,14 @@
1.16 _regs[Dma_control_status] = _regs[Dma_control_status] & ~Dma_trans_completed;
1.17 }
1.18
1.19 +// Clear error conditions.
1.20 +
1.21 +void
1.22 +Dma_jz4730_channel::clear_errors()
1.23 +{
1.24 + _regs[Dma_control_status] = _regs[Dma_control_status] & ~(Dma_address_error | Dma_trans_halted);
1.25 +}
1.26 +
1.27 // Return whether a transfer has completed.
1.28
1.29 bool