blob: 808d9eb1861ec381c453d5d99d8bee698d177fe2 (
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
|
/*
* Copyright 2004-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
*/
/*!
* @defgroup SPBA Shared Peripheral Bus Arbiter (SPBA)
* @ingroup MSL_MX31 MSL_MXC91321
*/
/*!
* @file arch-mxc/spba.h
* @brief This file contains the Shared Peripheral Bus Arbiter (spba) API.
*
* @ingroup SPBA
*/
#ifndef __ASM_ARCH_MXC_SPBA_H__
#define __ASM_ARCH_MXC_SPBA_H__
#ifdef __KERNEL__
#define MXC_SPBA_RAR_MASK 0x7
/*!
* Defines three SPBA masters: A - ARM, C - SDMA (no master B for MX31)
*/
enum spba_masters {
SPBA_MASTER_A = 1,
SPBA_MASTER_B = 2,
SPBA_MASTER_C = 4,
};
/*!
* This function allows the three masters (A, B, C) to take ownership of a
* shared peripheral.
*
* @param mod specified module as defined in \b enum \b #spba_module
* @param master one of more (or-ed together) masters as defined in \b enum \b #spba_masters
*
* @return 0 if successful; -1 otherwise.
*/
int spba_take_ownership(int mod, int master);
/*!
* This function releases the ownership for a shared peripheral.
*
* @param mod specified module as defined in \b enum \b #spba_module
* @param master one of more (or-ed together) masters as defined in \b enum \b #spba_masters
*
* @return 0 if successful; -1 otherwise.
*/
int spba_rel_ownership(int mod, int master);
#endif /* __KERNEL__ */
#endif /* __ASM_ARCH_MXC_SPBA_H__ */
|