summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-07-21 08:38:04 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-07-21 08:38:04 +0000
commitd374492cc69fa8bd041852d868ae379b79c59ba4 (patch)
tree14fa506e5c9564844d5fa0436ae4d2d456a74dda /c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h
parentUpdate to binutils-2.19.51-20090721. (diff)
downloadrtems-d374492cc69fa8bd041852d868ae379b79c59ba4.tar.bz2
Update for MPC55XX changes
Diffstat (limited to 'c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h73
1 files changed, 13 insertions, 60 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h b/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h
index 5d4751955c..a8ff09a101 100644
--- a/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h
+++ b/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h
@@ -22,78 +22,31 @@
#define LIBCPU_POWERPC_MPC55XX_EDMA_H
#include <stdbool.h>
+#include <stdint.h>
#include <rtems.h>
+#include <rtems/chain.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#define MPC55XX_EDMA_TCD_DEFAULT { \
- .SADDR = 0, \
- .SMOD = 0, \
- .SSIZE = 0x2, \
- .SOFF = 4, \
- .DADDR = 0, \
- .DMOD = 0, \
- .DSIZE = 0x2, \
- .DOFF = 4, \
- .NBYTES = 0, \
- .SLAST = 0, \
- .CITER = 1, \
- .BITER = 1, \
- .MAJORLINKCH = 0, \
- .CITERE_LINK = 0, \
- .BITERE_LINK = 0, \
- .MAJORE_LINK = 0, \
- .E_SG = 0, \
- .DLAST_SGA = 0, \
- .D_REQ = 0, \
- .BWC = 0, \
- .INT_HALF = 0, \
- .INT_MAJ = 0, \
- .DONE = 0, \
- .ACTIVE = 0, \
- .START = 0, \
-}
-
-#define MPC55XX_EDMA_TCD_ALT_DEFAULT { \
- .SADDR = 0, \
- .SMOD = 0, \
- .SSIZE = 2, \
- .DMOD = 0, \
- .DSIZE = 2, \
- .SOFF = 4, \
- .NBYTES = 0, \
- .SLAST = 0, \
- .DADDR = 0, \
- .CITERE_LINK = 0, \
- .CITERLINKCH = 0, \
- .CITER = 0, \
- .DOFF = 4, \
- .DLAST_SGA = 0, \
- .BITERE_LINK = 0, \
- .BITERLINKCH = 0, \
- .BITER = 0, \
- .BWC = 0, \
- .MAJORLINKCH = 0, \
- .DONE = 0, \
- .ACTIVE = 0, \
- .MAJORE_LINK = 0, \
- .E_SG = 0, \
- .D_REQ = 0, \
- .INT_HALF = 0, \
- .INT_MAJ = 0, \
- .START = 0, \
-}
+typedef struct mpc55xx_edma_channel_entry {
+ rtems_chain_node node;
+ unsigned channel;
+ void (*done)( struct mpc55xx_edma_channel_entry *, uint32_t);
+ rtems_id id;
+} mpc55xx_edma_channel_entry;
rtems_status_code mpc55xx_edma_init();
-rtems_status_code mpc55xx_edma_obtain_channel( int channel, uint32_t *error_status, rtems_id transfer_update);
+rtems_status_code mpc55xx_edma_obtain_channel( mpc55xx_edma_channel_entry *e);
+
+rtems_status_code mpc55xx_edma_release_channel( mpc55xx_edma_channel_entry *e);
-rtems_status_code mpc55xx_edma_enable_hardware_requests( int channel, bool enable);
+void mpc55xx_edma_enable_hardware_requests( unsigned channel, bool enable);
-rtems_status_code mpc55xx_edma_enable_error_interrupts( int channel, bool enable);
+void mpc55xx_edma_enable_error_interrupts( unsigned channel, bool enable);
#ifdef __cplusplus
}