diff options
Diffstat (limited to 'firmware/target/arm/imx31/sdma-imx31.c')
-rw-r--r-- | firmware/target/arm/imx31/sdma-imx31.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/target/arm/imx31/sdma-imx31.c b/firmware/target/arm/imx31/sdma-imx31.c index d1611d6332..4c5674afb9 100644 --- a/firmware/target/arm/imx31/sdma-imx31.c +++ b/firmware/target/arm/imx31/sdma-imx31.c | |||
@@ -468,6 +468,8 @@ static bool setup_channel(struct channel_control_block *ccb_p) | |||
468 | CHANNEL_CONTEXT_ADDR(channel), | 468 | CHANNEL_CONTEXT_ADDR(channel), |
469 | sizeof (context_buffer)/4); | 469 | sizeof (context_buffer)/4); |
470 | 470 | ||
471 | ccb_p->status.error = 0; /* Clear channel-wide error flag */ | ||
472 | |||
471 | if (cd_p->is_setup != 0) | 473 | if (cd_p->is_setup != 0) |
472 | return true; /* No more to do */ | 474 | return true; /* No more to do */ |
473 | 475 | ||
@@ -759,6 +761,12 @@ void sdma_channel_close(unsigned int channel) | |||
759 | memset(ccb_p, 0x00, sizeof (struct channel_control_block)); | 761 | memset(ccb_p, 0x00, sizeof (struct channel_control_block)); |
760 | } | 762 | } |
761 | 763 | ||
764 | /* Check channel-wide error flag */ | ||
765 | bool sdma_channel_is_error(unsigned int channel) | ||
766 | { | ||
767 | return channel < CH_NUM && ccb_array[channel].status.error; | ||
768 | } | ||
769 | |||
762 | /* Write 32-bit words to SDMA core memory. Host endian->SDMA endian. */ | 770 | /* Write 32-bit words to SDMA core memory. Host endian->SDMA endian. */ |
763 | void sdma_write_words(const unsigned long *buf, unsigned long start, int count) | 771 | void sdma_write_words(const unsigned long *buf, unsigned long start, int count) |
764 | { | 772 | { |