blob: c72b64cd70935926baebf8801866b370b1a2ec21 (
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
|
/*
* Copyright (C) ST-Ericsson SA 2010. All rights reserved.
* This code is ST-Ericsson proprietary and confidential.
* Any use of the code for whatever purpose is subject to
* specific written permission of ST-Ericsson SA.
*/
#ifndef __INC_SHARED_SEMAPHORE_H
#define __INC_SHARED_SEMAPHORE_H
#include <share/inc/nmf.h>
typedef t_uint16 t_semaphore_id;
/*
* HW semaphore allocation
* -----------------------
* We want to optimize interrupt demultiplexing at dsp interrupt handler level
* so a good solution would be to have sequentially the semaphores for each neighbors
*
* STn8500 :
* ---------
* ARM <- SVA COMS => 0
* ARM <- SIA COMS => 1
* SVA <- ARM COMS => 2
* SVA <- SIA COMS => 3
* SIA <- ARM COMS => 4
* SIA <- SVA COMS => 5
* The first neighbor is always the ARM, then the other ones (SVA,SIA)
*/
/*
* Local semaphore allocation
* -----------------------
* 0 : ARM <- DSP
* 1 : DSP <- ARM
*/
#define NB_USED_HSEM_PER_CORE (NB_CORE_IDS - 1)
#define FIRST_NEIGHBOR_SEMID(coreId) ((coreId)*NB_USED_HSEM_PER_CORE)
#endif /* __INC_SHARED_SEMAPHORE_H */
|