From 574fb675105b77dfe9598915207f1f32790f905f Mon Sep 17 00:00:00 2001 From: Thomas Doerfler Date: Mon, 14 Jul 2008 16:15:28 +0000 Subject: updated gen83xx BSP updated haleakala BSP added MPC55xx BSP --- c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h | 102 ++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h (limited to 'c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h') diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h b/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h new file mode 100644 index 0000000000..5d4751955c --- /dev/null +++ b/c/src/lib/libcpu/powerpc/mpc55xx/include/edma.h @@ -0,0 +1,102 @@ +/** + * @file + * + * @ingroup mpc55xx + * + * @brief Enhanced Direct Memory Access (eDMA). + */ + +/* + * Copyright (c) 2008 + * Embedded Brains GmbH + * Obere Lagerstr. 30 + * D-82178 Puchheim + * Germany + * rtems@embedded-brains.de + * + * The license and distribution terms for this file may be found in the file + * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. + */ + +#ifndef LIBCPU_POWERPC_MPC55XX_EDMA_H +#define LIBCPU_POWERPC_MPC55XX_EDMA_H + +#include + +#include + +#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, \ +} + +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_enable_hardware_requests( int channel, bool enable); + +rtems_status_code mpc55xx_edma_enable_error_interrupts( int channel, bool enable); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* LIBCPU_POWERPC_MPC55XX_EDMA_H */ -- cgit v1.2.3