~ubuntu-branches/ubuntu/hardy/linux-restricted-modules-envy-2.6.24/hardy-proposed

« back to all changes in this revision

Viewing changes to fritz/fcdsl/src/image.h

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Milone (tseliot)
  • Date: 2008-05-05 11:01:43 UTC
  • Revision ID: james.westby@ubuntu.com-20080505110143-gi9niqn3vkf11h6c
Tags: 2.6.24.500-500.26
* Removed ~envy in the package version
* nvidia-glx{-new, -legacy}-envy all provide nvidia-glx-dev
* Removed version from Conflicts of all the packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * image.h
 
3
 * Copyright (C) 2002, AVM GmbH. All rights reserved.
 
4
 * 
 
5
 * This Software is  free software. You can redistribute and/or
 
6
 * modify such free software under the terms of the GNU Lesser General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2.1 of the License, or (at your option) any later version.
 
9
 * 
 
10
 * The free software is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
13
 * Lesser General Public License for more details.
 
14
 * 
 
15
 * You should have received a copy of the GNU Lesser General Public
 
16
 * License along with this Software; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA, or see
 
18
 * http://www.opensource.org/licenses/lgpl-license.html
 
19
 * 
 
20
 * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: info@avm.de
 
21
 */
 
22
 
 
23
#ifndef __have_image_h__
 
24
#define __have_image_h__
 
25
 
 
26
#include "libdefs.h"
 
27
 
 
28
#define IMAGE_OK                0
 
29
#define IMAGE_RELOC_ERROR       -1
 
30
 
 
31
#define IMAGE_FREQUENCY         166665000
 
32
#define IMAGE_ADD_ROUND(x,y,z)  ((((unsigned int) (x))+(y)+(z)-1)&~((z)-1))
 
33
#define XFER_INFO_MAX           1
 
34
 
 
35
/*---------------------------------------------------------------------------*\
 
36
\*---------------------------------------------------------------------------*/
 
37
typedef struct __img image_t, * image_p;
 
38
 
 
39
typedef enum __xfers {
 
40
 
 
41
        INVALID,
 
42
        TM_PENDING,
 
43
        TM_ENQUEUED,
 
44
        TM_READY,
 
45
        PC_PENDING
 
46
} xfer_state_t;
 
47
 
 
48
typedef enum __xfert {
 
49
 
 
50
        TO_TM,
 
51
        TO_PC
 
52
} xfer_type_t;
 
53
 
 
54
typedef struct __xferi {
 
55
 
 
56
        xfer_state_t    state;
 
57
        void *          address;
 
58
        unsigned        length;
 
59
#if defined (TM_TIMESTAMP)
 
60
        unsigned        stamp;
 
61
#endif
 
62
} xfer_info_t, * xfer_info_p;
 
63
 
 
64
typedef struct __xferb {
 
65
 
 
66
        xfer_type_t     type;
 
67
        int             initialized;
 
68
        unsigned        __dummy1;
 
69
        xfer_info_t     info[XFER_INFO_MAX];
 
70
        unsigned        __dummy2;
 
71
} xfer_base_t, * xfer_base_p;
 
72
 
 
73
/*---------------------------------------------------------------------------*\
 
74
\*---------------------------------------------------------------------------*/
 
75
extern xfer_base_p      tx_info;
 
76
extern xfer_base_p      rx_info;
 
77
 
 
78
/*---------------------------------------------------------------------------*\
 
79
\*---------------------------------------------------------------------------*/
 
80
extern __attr2 image_p lib_init (void *, unsigned long, unsigned long, 
 
81
                                 unsigned long, void *, unsigned);
 
82
extern __attr2 void lib_remove (image_p *);
 
83
 
 
84
extern __attr2 const char * lib_error (int);
 
85
 
 
86
/*---------------------------------------------------------------------------*\
 
87
\*---------------------------------------------------------------------------*/
 
88
extern __attr2 int lib_reloc (image_p);
 
89
extern __attr2 int lib_patch (image_p, const char *, unsigned long);
 
90
extern __attr2 int lib_getsize (image_p, int *, int *);
 
91
extern __attr2 int lib_getimage (image_p, unsigned, unsigned);
 
92
extern __attr2 int lib_load_symtab (image_p);
 
93
extern __attr2 int lib_readsym (image_p, char *, unsigned long *);
 
94
extern __attr2 int lib_findsym (image_p, char *, unsigned long *);
 
95
extern __attr2 int lib_load (image_p);
 
96
 
 
97
/*---------------------------------------------------------------------------*\
 
98
\*---------------------------------------------------------------------------*/
 
99
extern __attr2 int xfer_info_init (xfer_base_p, xfer_type_t);
 
100
extern __attr2 void xfer_info_reset (xfer_base_p);
 
101
 
 
102
extern __attr2 void xfer_info_set (xfer_base_p, unsigned, xfer_info_p);
 
103
extern __attr2 void xfer_info_get (xfer_base_p, unsigned, xfer_info_p);
 
104
 
 
105
extern __attr2 void xfer_info_write (
 
106
                xfer_base_p, 
 
107
                unsigned, 
 
108
                xfer_state_t, 
 
109
                void *, 
 
110
                unsigned
 
111
                );
 
112
 
 
113
extern __attr2 void xfer_info_read (
 
114
                xfer_base_p,
 
115
                unsigned,
 
116
                xfer_state_t *,
 
117
                void **,
 
118
                unsigned *
 
119
#if defined (TM_TIMESTAMP)
 
120
,               unsigned *
 
121
#endif
 
122
                );
 
123
 
 
124
#define xfer_info_ptr(base)     (&base.pinfo[0])
 
125
#define xfer_info_num(base)     XFER_INFO_MAX
 
126
#define xfer_info_type(base)    (base.type)
 
127
 
 
128
/*---------------------------------------------------------------------------*\
 
129
\*---------------------------------------------------------------------------*/
 
130
 
 
131
#endif
 
132