summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/sdma-imx31.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2009-03-12 06:31:40 +0000
committerMichael Sevakis <jethead71@rockbox.org>2009-03-12 06:31:40 +0000
commita1a332e04bf937d164746f06c8f71fab547fc271 (patch)
tree71fbd805fb2689746e69fabf980e88ed661ab893 /firmware/target/arm/imx31/sdma-imx31.c
parentbc8cab4c24a0891182ac9711c67165a9e3373b1c (diff)
downloadrockbox-a1a332e04bf937d164746f06c8f71fab547fc271.tar.gz
rockbox-a1a332e04bf937d164746f06c8f71fab547fc271.zip
Gigabeat S: Implement MDMA and UDMA disk access for bootloader and main binary. Add a needed SDMA API to check channel errors. Increase audio DMA channels' priority as required. Reads and writes measure faster accross all test_disk tests and especially at 4KB and 1MB.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20299 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/sdma-imx31.c')
-rw-r--r--firmware/target/arm/imx31/sdma-imx31.c8
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 */
765bool 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. */
763void sdma_write_words(const unsigned long *buf, unsigned long start, int count) 771void sdma_write_words(const unsigned long *buf, unsigned long start, int count)
764{ 772{