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

« back to all changes in this revision

Viewing changes to arch/arm/plat-omap/include/syslink/multiproc.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
 
* multiproc.h
3
 
*
4
 
* Many multi-processor modules have the concept of processor id. multiproc
5
 
* centeralizes the processor id management.
6
 
*
7
 
* Copyright (C) 2008-2009 Texas Instruments, Inc.
8
 
*
9
 
* This package is free software; you can redistribute it and/or modify
10
 
* it under the terms of the GNU General Public License version 2 as
11
 
* published by the Free Software Foundation.
12
 
*
13
 
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14
 
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15
 
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
16
 
* PURPOSE.
17
 
*/
18
 
 
19
 
#ifndef _MULTIPROC_H_
20
 
#define _MULTIPROC_H_
21
 
 
22
 
#include <linux/types.h>
23
 
 
24
 
 
25
 
#define VOLATILE volatile
26
 
 
27
 
/*
28
 
 *  Unique module ID
29
 
 */
30
 
#define MULTIPROC_MODULEID              (u16)0xB522
31
 
 
32
 
/* Macro to define invalid processor id */
33
 
#define MULTIPROC_INVALIDID             ((u16)0xFFFF)
34
 
 
35
 
/*
36
 
 *  Maximum number of processors in the system
37
 
 *  OMAP4 has 4 processors in single core.
38
 
 */
39
 
#define MULTIPROC_MAXPROCESSORS 4
40
 
 
41
 
/*
42
 
 *  Max name length for a processor name
43
 
 */
44
 
#define MULTIPROC_MAXNAMELENGTH 32
45
 
 
46
 
/*
47
 
 *  Configuration structure for multiproc module
48
 
 */
49
 
struct multiproc_config {
50
 
        s32 num_processors; /* Number of procs for particular system */
51
 
        char name_list[MULTIPROC_MAXPROCESSORS][MULTIPROC_MAXNAMELENGTH];
52
 
        /* Name List for processors in the system */
53
 
        u16 id; /* Local Proc ID. This needs to be set before calling any
54
 
                        other APIs */
55
 
};
56
 
 
57
 
/* =============================================================================
58
 
 *  APIs
59
 
 * =============================================================================
60
 
 */
61
 
 
62
 
/* Function to get the default configuration for the multiproc module. */
63
 
void multiproc_get_config(struct multiproc_config *cfg);
64
 
 
65
 
/* Function to setup the multiproc Module */
66
 
s32 multiproc_setup(struct multiproc_config *cfg);
67
 
 
68
 
/* Function to destroy the multiproc module */
69
 
s32 multiproc_destroy(void);
70
 
 
71
 
/* Function to set local processor Id */
72
 
int multiproc_set_local_id(u16 proc_id);
73
 
 
74
 
/* Function to get processor id from processor name. */
75
 
u16  multiproc_get_id(const char *proc_name);
76
 
 
77
 
/* Function to get name from processor id. */
78
 
char *multiproc_get_name(u16 proc_id);
79
 
 
80
 
/* Function to get number of processors in the system. */
81
 
u16 multiproc_get_num_processors(void);
82
 
 
83
 
/* Return Id of current processor */
84
 
u16 multiproc_self(void);
85
 
 
86
 
/* Determines the offset for any two processors. */
87
 
u32 multiproc_get_slot(u16 remote_proc_id);
88
 
 
89
 
#endif  /* _MULTIPROC_H_ */