summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/sdma/iapi/src/iapiLowDsp.c
blob: df7d44a9bd46dea21de1cbae5f119a19a7ba67a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/******************************************************************************
 *
 * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
 *
 *
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 *
 ******************************************************************************
 *
 * File: iapiLowDsp.c
 *
 * $Id iapiLowDsp.c $
 *
 * Description:
 *  This library is written in C to guarantee functionality and integrity in
 * the usage of SDMA virtual DMA channels. This API (Application Programming
 * Interface)  allow SDMA channels' access in an OPEN, READ, WRITE, CLOSE
 * fashion.
 *  These are the LOW level functions of the I.API specific to MCU.
 *
 *
 *
 *
 * $Log iapiLowDsp.c $
 *
 *****************************************************************************/

/* ****************************************************************************
 * Include File Section
 *****************************************************************************/
#include "epm.h"
#include "iapiLow.h"

/* ****************************************************************************
 * Function Section
 *****************************************************************************/
#ifdef DSP

/* ***************************************************************************/
/**Starts the channel (core specific register)
 *
 * <b>Algorithm:</b>\n
 *   - Bit numbered "channel" of DspEnStartReg register is set
 *
 * @param channel channel to start
 *
 * @return none
 */
void
iapi_lowStartChannel (unsigned char channel)
{
  SDMA_D_START |= (1 << channel);
}

/* ***************************************************************************/
/**Stops the channel (core specific register)
 *
 * <b>Algorithm:</b>
 *   - Bit numbered "channel" of DspEnStopReg register is cleared
 *
 * <b>Notes:</b>\n
 *   - This is a write one to clear register
 *
 * @param channel channel to stop
 *
 * @return none
 */
void
iapi_lowStopChannel (unsigned char channel)
{
  SDMA_D_STATSTOP &= (1 << channel);
}

#endif /* DSP */