~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/plat-omap/include/syslink/igatempsupport.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  igatempsupport.h
3
 
 *
4
 
 *  Interface implemented by all multiprocessor gates.
5
 
 *
6
 
 *  Copyright (C) 2008-2009 Texas Instruments, Inc.
7
 
 *
8
 
 *  This package is free software; you can redistribute it and/or modify
9
 
 *  it under the terms of the GNU General Public License version 2 as
10
 
 *  published by the Free Software Foundation.
11
 
 *
12
 
 *  THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13
 
 *  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14
 
 *  WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
15
 
 *  PURPOSE.
16
 
 *
17
 
 */
18
 
 
19
 
#ifndef _IGATEMPSUPPORT_H_
20
 
#define _IGATEMPSUPPORT_H_
21
 
 
22
 
 
23
 
/* Invalid Igate */
24
 
#define IGATEMPSUPPORT_NULL             (void *)0xFFFFFFFF
25
 
 
26
 
/* Gates with this "quality" may cause the calling thread to block;
27
 
 *  i.e., suspend execution until another thread leaves the gate. */
28
 
#define IGATEMPSUPPORT_Q_BLOCKING       1
29
 
 
30
 
/* Gates with this "quality" allow other threads to preempt the thread
31
 
 *  that has already entered the gate. */
32
 
#define IGATEMPSUPPORT_Q_PREEMPTING     2
33
 
 
34
 
/* Object embedded in other Gate modules. (Inheritance) */
35
 
#define IGATEMPSUPPORT_SUPERPARAMS              \
36
 
        u32 resource_id;                        \
37
 
        bool open_flag;                         \
38
 
        u16 region_id;                          \
39
 
        void *shared_addr
40
 
 
41
 
/* All other GateMP modules inherit this. */
42
 
#define IGATEMPSUPPORT_INHERIT(X)               \
43
 
enum X##_local_protect {                        \
44
 
        X##_LOCALPROTECT_NONE = 0,              \
45
 
        X##_LOCALPROTECT_INTERRUPT = 1,         \
46
 
        X##_LOCALPROTECT_TASKLET = 2,           \
47
 
        X##_LOCALPROTECT_THREAD = 3,            \
48
 
        X##_LOCALPROTECT_PROCESS = 4            \
49
 
};
50
 
 
51
 
/* Paramter initializer. */
52
 
#define IGATEMPSUPPORT_PARAMSINTIALIZER(x)      \
53
 
        do {                                    \
54
 
                (x)->resource_id = 0;           \
55
 
                (x)->open_flag = true;          \
56
 
                (x)->region_id = 0;             \
57
 
                (x)->shared_addr = NULL;        \
58
 
        } while (0)
59
 
 
60
 
enum igatempsupport_local_protect {
61
 
        IGATEMPSUPPORT_LOCALPROTECT_NONE = 0,
62
 
        IGATEMPSUPPORT_LOCALPROTECT_INTERRUPT = 1,
63
 
        IGATEMPSUPPORT_LOCALPROTECT_TASKLET = 2,
64
 
        IGATEMPSUPPORT_LOCALPROTECT_THREAD = 3,
65
 
        IGATEMPSUPPORT_LOCALPROTECT_PROCESS = 4
66
 
};
67
 
 
68
 
struct igatempsupport_params {
69
 
        u32 resource_id;
70
 
        bool open_flag;
71
 
        u16 region_id;
72
 
        void *shared_addr;
73
 
};
74
 
 
75
 
 
76
 
#endif /* ifndef __IGATEMPSUPPORT_H__ */