Subversion Repositories Kolibri OS

Rev

Rev 5060 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5060 Rev 5354
1
/*
1
/*
2
 * AGPGART
2
 * AGPGART
3
 * Copyright (C) 2004 Silicon Graphics, Inc.
3
 * Copyright (C) 2004 Silicon Graphics, Inc.
4
 * Copyright (C) 2002-2004 Dave Jones
4
 * Copyright (C) 2002-2004 Dave Jones
5
 * Copyright (C) 1999 Jeff Hartmann
5
 * Copyright (C) 1999 Jeff Hartmann
6
 * Copyright (C) 1999 Precision Insight, Inc.
6
 * Copyright (C) 1999 Precision Insight, Inc.
7
 * Copyright (C) 1999 Xi Graphics, Inc.
7
 * Copyright (C) 1999 Xi Graphics, Inc.
8
 *
8
 *
9
 * Permission is hereby granted, free of charge, to any person obtaining a
9
 * Permission is hereby granted, free of charge, to any person obtaining a
10
 * copy of this software and associated documentation files (the "Software"),
10
 * copy of this software and associated documentation files (the "Software"),
11
 * to deal in the Software without restriction, including without limitation
11
 * to deal in the Software without restriction, including without limitation
12
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13
 * and/or sell copies of the Software, and to permit persons to whom the
13
 * and/or sell copies of the Software, and to permit persons to whom the
14
 * Software is furnished to do so, subject to the following conditions:
14
 * Software is furnished to do so, subject to the following conditions:
15
 *
15
 *
16
 * The above copyright notice and this permission notice shall be included
16
 * The above copyright notice and this permission notice shall be included
17
 * in all copies or substantial portions of the Software.
17
 * in all copies or substantial portions of the Software.
18
 *
18
 *
19
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
22
 * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
22
 * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
23
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
24
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
25
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
 *
26
 *
27
 */
27
 */
28
 
28
 
29
#ifndef _AGP_BACKEND_PRIV_H
29
#ifndef _AGP_BACKEND_PRIV_H
30
#define _AGP_BACKEND_PRIV_H 1
30
#define _AGP_BACKEND_PRIV_H 1
31
 
31
 
32
//#include 	/* for flush_agp_cache() */
-
 
33
 
-
 
34
 
-
 
35
enum chipset_type {
-
 
36
       NOT_SUPPORTED,
-
 
37
       SUPPORTED,
-
 
38
};
-
 
39
 
-
 
40
struct agp_memory;
32
#include 	/* for flush_agp_cache() */
41
 
33
 
42
#define PFX "agpgart: "
34
#define PFX "agpgart: "
43
 
35
 
44
//#define AGP_DEBUG 1
36
//#define AGP_DEBUG 1
45
#ifdef AGP_DEBUG
37
#ifdef AGP_DEBUG
46
#define DBG(x,y...) printk (KERN_DEBUG PFX "%s: " x "\n", __func__ , ## y)
38
#define DBG(x,y...) printk (KERN_DEBUG PFX "%s: " x "\n", __func__ , ## y)
47
#else
39
#else
48
#define DBG(x,y...) do { } while (0)
40
#define DBG(x,y...) do { } while (0)
49
#endif
41
#endif
50
 
42
 
51
extern struct agp_bridge_data *agp_bridge;
43
extern struct agp_bridge_data *agp_bridge;
52
 
44
 
53
enum aper_size_type {
45
enum aper_size_type {
54
	U8_APER_SIZE,
46
	U8_APER_SIZE,
55
	U16_APER_SIZE,
47
	U16_APER_SIZE,
56
	U32_APER_SIZE,
48
	U32_APER_SIZE,
57
	LVL2_APER_SIZE,
49
	LVL2_APER_SIZE,
58
	FIXED_APER_SIZE
50
	FIXED_APER_SIZE
59
};
51
};
60
 
52
 
61
struct gatt_mask {
53
struct gatt_mask {
62
	unsigned long mask;
54
	unsigned long mask;
63
	u32 type;
55
	u32 type;
64
	/* totally device specific, for integrated chipsets that
56
	/* totally device specific, for integrated chipsets that
65
	 * might have different types of memory masks.  For other
57
	 * might have different types of memory masks.  For other
66
	 * devices this will probably be ignored */
58
	 * devices this will probably be ignored */
67
};
59
};
68
 
60
 
69
#define AGP_PAGE_DESTROY_UNMAP 1
61
#define AGP_PAGE_DESTROY_UNMAP 1
70
#define AGP_PAGE_DESTROY_FREE 2
62
#define AGP_PAGE_DESTROY_FREE 2
71
 
63
 
72
struct aper_size_info_8 {
64
struct aper_size_info_8 {
73
	int size;
65
	int size;
74
	int num_entries;
66
	int num_entries;
75
	int page_order;
67
	int page_order;
76
	u8 size_value;
68
	u8 size_value;
77
};
69
};
78
 
70
 
79
struct aper_size_info_16 {
71
struct aper_size_info_16 {
80
	int size;
72
	int size;
81
	int num_entries;
73
	int num_entries;
82
	int page_order;
74
	int page_order;
83
	u16 size_value;
75
	u16 size_value;
84
};
76
};
85
 
77
 
86
struct aper_size_info_32 {
78
struct aper_size_info_32 {
87
	int size;
79
	int size;
88
	int num_entries;
80
	int num_entries;
89
	int page_order;
81
	int page_order;
90
	u32 size_value;
82
	u32 size_value;
91
};
83
};
92
 
84
 
93
struct aper_size_info_lvl2 {
85
struct aper_size_info_lvl2 {
94
	int size;
86
	int size;
95
	int num_entries;
87
	int num_entries;
96
	u32 size_value;
88
	u32 size_value;
97
};
89
};
98
 
90
 
99
struct aper_size_info_fixed {
91
struct aper_size_info_fixed {
100
	int size;
92
	int size;
101
	int num_entries;
93
	int num_entries;
102
	int page_order;
94
	int page_order;
103
};
95
};
104
 
96
 
105
struct agp_bridge_driver {
97
struct agp_bridge_driver {
106
	struct module *owner;
98
	struct module *owner;
107
	const void *aperture_sizes;
99
	const void *aperture_sizes;
108
	int num_aperture_sizes;
100
	int num_aperture_sizes;
109
	enum aper_size_type size_type;
101
	enum aper_size_type size_type;
110
	bool cant_use_aperture;
102
	bool cant_use_aperture;
111
	bool needs_scratch_page;
103
	bool needs_scratch_page;
112
	const struct gatt_mask *masks;
104
	const struct gatt_mask *masks;
113
	int (*fetch_size)(void);
105
	int (*fetch_size)(void);
114
	int (*configure)(void);
106
	int (*configure)(void);
115
	void (*agp_enable)(struct agp_bridge_data *, u32);
107
	void (*agp_enable)(struct agp_bridge_data *, u32);
116
	void (*cleanup)(void);
108
	void (*cleanup)(void);
117
	void (*tlb_flush)(struct agp_memory *);
109
	void (*tlb_flush)(struct agp_memory *);
118
	unsigned long (*mask_memory)(struct agp_bridge_data *, dma_addr_t, int);
110
	unsigned long (*mask_memory)(struct agp_bridge_data *, dma_addr_t, int);
119
	void (*cache_flush)(void);
111
	void (*cache_flush)(void);
120
	int (*create_gatt_table)(struct agp_bridge_data *);
112
	int (*create_gatt_table)(struct agp_bridge_data *);
121
	int (*free_gatt_table)(struct agp_bridge_data *);
113
	int (*free_gatt_table)(struct agp_bridge_data *);
122
	int (*insert_memory)(struct agp_memory *, off_t, int);
114
	int (*insert_memory)(struct agp_memory *, off_t, int);
123
	int (*remove_memory)(struct agp_memory *, off_t, int);
115
	int (*remove_memory)(struct agp_memory *, off_t, int);
124
	struct agp_memory *(*alloc_by_type) (size_t, int);
116
	struct agp_memory *(*alloc_by_type) (size_t, int);
125
	void (*free_by_type)(struct agp_memory *);
117
	void (*free_by_type)(struct agp_memory *);
126
	struct page *(*agp_alloc_page)(struct agp_bridge_data *);
118
	struct page *(*agp_alloc_page)(struct agp_bridge_data *);
127
	int (*agp_alloc_pages)(struct agp_bridge_data *, struct agp_memory *, size_t);
119
	int (*agp_alloc_pages)(struct agp_bridge_data *, struct agp_memory *, size_t);
128
	void (*agp_destroy_page)(struct page *, int flags);
120
	void (*agp_destroy_page)(struct page *, int flags);
129
	void (*agp_destroy_pages)(struct agp_memory *);
121
	void (*agp_destroy_pages)(struct agp_memory *);
130
	int (*agp_type_to_mask_type) (struct agp_bridge_data *, int);
122
	int (*agp_type_to_mask_type) (struct agp_bridge_data *, int);
131
};
123
};
132
 
124
 
133
struct agp_bridge_data {
125
struct agp_bridge_data {
134
	const struct agp_version *version;
126
	const struct agp_version *version;
135
	const struct agp_bridge_driver *driver;
127
	const struct agp_bridge_driver *driver;
136
	const struct vm_operations_struct *vm_ops;
128
	const struct vm_operations_struct *vm_ops;
137
	void *previous_size;
129
	void *previous_size;
138
	void *current_size;
130
	void *current_size;
139
	void *dev_private_data;
131
	void *dev_private_data;
140
	struct pci_dev *dev;
132
	struct pci_dev *dev;
141
	u32 __iomem *gatt_table;
133
	u32 __iomem *gatt_table;
142
	u32 *gatt_table_real;
134
	u32 *gatt_table_real;
143
	unsigned long scratch_page;
135
	unsigned long scratch_page;
144
	struct page *scratch_page_page;
136
	struct page *scratch_page_page;
145
	dma_addr_t scratch_page_dma;
137
	dma_addr_t scratch_page_dma;
146
	unsigned long gart_bus_addr;
138
	unsigned long gart_bus_addr;
147
	unsigned long gatt_bus_addr;
139
	unsigned long gatt_bus_addr;
148
	u32 mode;
140
	u32 mode;
149
	enum chipset_type type;
141
	enum chipset_type type;
150
	unsigned long *key_list;
142
	unsigned long *key_list;
151
	atomic_t current_memory_agp;
143
	atomic_t current_memory_agp;
152
	atomic_t agp_in_use;
144
	atomic_t agp_in_use;
153
	int max_memory_agp;	/* in number of pages */
145
	int max_memory_agp;	/* in number of pages */
154
	int aperture_size_idx;
146
	int aperture_size_idx;
155
	int capndx;
147
	int capndx;
156
	int flags;
148
	int flags;
157
	char major_version;
149
	char major_version;
158
	char minor_version;
150
	char minor_version;
159
	struct list_head list;
151
	struct list_head list;
160
	u32 apbase_config;
152
	u32 apbase_config;
161
	/* list of agp_memory mapped to the aperture */
153
	/* list of agp_memory mapped to the aperture */
162
	struct list_head mapped_list;
154
	struct list_head mapped_list;
163
	spinlock_t mapped_lock;
155
	spinlock_t mapped_lock;
164
};
156
};
165
 
157
 
166
#define KB(x)	((x) * 1024)
158
#define KB(x)	((x) * 1024)
167
#define MB(x)	(KB (KB (x)))
159
#define MB(x)	(KB (KB (x)))
168
#define GB(x)	(MB (KB (x)))
160
#define GB(x)	(MB (KB (x)))
169
 
161
 
170
#define A_SIZE_8(x)	((struct aper_size_info_8 *) x)
162
#define A_SIZE_8(x)	((struct aper_size_info_8 *) x)
171
#define A_SIZE_16(x)	((struct aper_size_info_16 *) x)
163
#define A_SIZE_16(x)	((struct aper_size_info_16 *) x)
172
#define A_SIZE_32(x)	((struct aper_size_info_32 *) x)
164
#define A_SIZE_32(x)	((struct aper_size_info_32 *) x)
173
#define A_SIZE_LVL2(x)	((struct aper_size_info_lvl2 *) x)
165
#define A_SIZE_LVL2(x)	((struct aper_size_info_lvl2 *) x)
174
#define A_SIZE_FIX(x)	((struct aper_size_info_fixed *) x)
166
#define A_SIZE_FIX(x)	((struct aper_size_info_fixed *) x)
175
#define A_IDX8(bridge)	(A_SIZE_8((bridge)->driver->aperture_sizes) + i)
167
#define A_IDX8(bridge)	(A_SIZE_8((bridge)->driver->aperture_sizes) + i)
176
#define A_IDX16(bridge)	(A_SIZE_16((bridge)->driver->aperture_sizes) + i)
168
#define A_IDX16(bridge)	(A_SIZE_16((bridge)->driver->aperture_sizes) + i)
177
#define A_IDX32(bridge)	(A_SIZE_32((bridge)->driver->aperture_sizes) + i)
169
#define A_IDX32(bridge)	(A_SIZE_32((bridge)->driver->aperture_sizes) + i)
178
#define MAXKEY		(4096 * 32)
170
#define MAXKEY		(4096 * 32)
179
 
171
 
180
#define PGE_EMPTY(b, p)	(!(p) || (p) == (unsigned long) (b)->scratch_page)
172
#define PGE_EMPTY(b, p)	(!(p) || (p) == (unsigned long) (b)->scratch_page)
181
 
173
 
182
 
174
 
183
struct agp_device_ids {
175
struct agp_device_ids {
184
	unsigned short device_id; /* first, to make table easier to read */
176
	unsigned short device_id; /* first, to make table easier to read */
185
	enum chipset_type chipset;
177
	enum chipset_type chipset;
186
	const char *chipset_name;
178
	const char *chipset_name;
187
	int (*chipset_setup) (struct pci_dev *pdev);	/* used to override generic */
179
	int (*chipset_setup) (struct pci_dev *pdev);	/* used to override generic */
188
};
180
};
189
 
181
 
190
/* Driver registration */
182
/* Driver registration */
191
struct agp_bridge_data *agp_alloc_bridge(void);
183
struct agp_bridge_data *agp_alloc_bridge(void);
192
void agp_put_bridge(struct agp_bridge_data *bridge);
184
void agp_put_bridge(struct agp_bridge_data *bridge);
193
int agp_add_bridge(struct agp_bridge_data *bridge);
185
int agp_add_bridge(struct agp_bridge_data *bridge);
194
void agp_remove_bridge(struct agp_bridge_data *bridge);
186
void agp_remove_bridge(struct agp_bridge_data *bridge);
195
 
187
 
196
/* Frontend routines. */
188
/* Frontend routines. */
197
int agp_frontend_initialize(void);
189
int agp_frontend_initialize(void);
198
void agp_frontend_cleanup(void);
190
void agp_frontend_cleanup(void);
199
 
191
 
200
/* Generic routines. */
192
/* Generic routines. */
201
void agp_generic_enable(struct agp_bridge_data *bridge, u32 mode);
193
void agp_generic_enable(struct agp_bridge_data *bridge, u32 mode);
202
int agp_generic_create_gatt_table(struct agp_bridge_data *bridge);
194
int agp_generic_create_gatt_table(struct agp_bridge_data *bridge);
203
int agp_generic_free_gatt_table(struct agp_bridge_data *bridge);
195
int agp_generic_free_gatt_table(struct agp_bridge_data *bridge);
204
struct agp_memory *agp_create_memory(int scratch_pages);
196
struct agp_memory *agp_create_memory(int scratch_pages);
205
int agp_generic_insert_memory(struct agp_memory *mem, off_t pg_start, int type);
197
int agp_generic_insert_memory(struct agp_memory *mem, off_t pg_start, int type);
206
int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type);
198
int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type);
207
struct agp_memory *agp_generic_alloc_by_type(size_t page_count, int type);
199
struct agp_memory *agp_generic_alloc_by_type(size_t page_count, int type);
208
void agp_generic_free_by_type(struct agp_memory *curr);
200
void agp_generic_free_by_type(struct agp_memory *curr);
209
struct page *agp_generic_alloc_page(struct agp_bridge_data *bridge);
201
struct page *agp_generic_alloc_page(struct agp_bridge_data *bridge);
210
int agp_generic_alloc_pages(struct agp_bridge_data *agp_bridge,
202
int agp_generic_alloc_pages(struct agp_bridge_data *agp_bridge,
211
			    struct agp_memory *memory, size_t page_count);
203
			    struct agp_memory *memory, size_t page_count);
212
void agp_generic_destroy_page(struct page *page, int flags);
204
void agp_generic_destroy_page(struct page *page, int flags);
213
void agp_generic_destroy_pages(struct agp_memory *memory);
205
void agp_generic_destroy_pages(struct agp_memory *memory);
214
void agp_free_key(int key);
206
void agp_free_key(int key);
215
int agp_num_entries(void);
207
int agp_num_entries(void);
216
u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command);
208
u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command);
217
void agp_device_command(u32 command, bool agp_v3);
209
void agp_device_command(u32 command, bool agp_v3);
218
int agp_3_5_enable(struct agp_bridge_data *bridge);
210
int agp_3_5_enable(struct agp_bridge_data *bridge);
219
void global_cache_flush(void);
211
void global_cache_flush(void);
220
void get_agp_version(struct agp_bridge_data *bridge);
212
void get_agp_version(struct agp_bridge_data *bridge);
221
unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge,
213
unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge,
222
				      dma_addr_t phys, int type);
214
				      dma_addr_t phys, int type);
223
int agp_generic_type_to_mask_type(struct agp_bridge_data *bridge,
215
int agp_generic_type_to_mask_type(struct agp_bridge_data *bridge,
224
				  int type);
216
				  int type);
225
struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev);
217
struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev);
226
 
218
 
227
/* generic functions for user-populated AGP memory types */
219
/* generic functions for user-populated AGP memory types */
228
struct agp_memory *agp_generic_alloc_user(size_t page_count, int type);
220
struct agp_memory *agp_generic_alloc_user(size_t page_count, int type);
229
void agp_alloc_page_array(size_t size, struct agp_memory *mem);
221
void agp_alloc_page_array(size_t size, struct agp_memory *mem);
230
void agp_free_page_array(struct agp_memory *mem);
222
void agp_free_page_array(struct agp_memory *mem);
231
 
223
 
232
 
224
 
233
/* generic routines for agp>=3 */
225
/* generic routines for agp>=3 */
234
int agp3_generic_fetch_size(void);
226
int agp3_generic_fetch_size(void);
235
void agp3_generic_tlbflush(struct agp_memory *mem);
227
void agp3_generic_tlbflush(struct agp_memory *mem);
236
int agp3_generic_configure(void);
228
int agp3_generic_configure(void);
237
void agp3_generic_cleanup(void);
229
void agp3_generic_cleanup(void);
238
 
230
 
239
/* aperture sizes have been standardised since v3 */
231
/* aperture sizes have been standardised since v3 */
240
#define AGP_GENERIC_SIZES_ENTRIES 11
232
#define AGP_GENERIC_SIZES_ENTRIES 11
241
extern const struct aper_size_info_16 agp3_generic_sizes[];
233
extern const struct aper_size_info_16 agp3_generic_sizes[];
242
 
234
 
243
extern int agp_off;
235
extern int agp_off;
244
extern int agp_try_unsupported_boot;
236
extern int agp_try_unsupported_boot;
245
 
237
 
246
long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
238
long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
247
 
239
 
248
/* Chipset independent registers (from AGP Spec) */
240
/* Chipset independent registers (from AGP Spec) */
249
#define AGP_APBASE	0x10
241
#define AGP_APBASE	0x10
250
#define AGP_APERTURE_BAR	0
242
#define AGP_APERTURE_BAR	0
251
 
243
 
252
#define AGPSTAT		0x4
244
#define AGPSTAT		0x4
253
#define AGPCMD		0x8
245
#define AGPCMD		0x8
254
#define AGPNISTAT	0xc
246
#define AGPNISTAT	0xc
255
#define AGPCTRL		0x10
247
#define AGPCTRL		0x10
256
#define AGPAPSIZE	0x14
248
#define AGPAPSIZE	0x14
257
#define AGPNEPG		0x16
249
#define AGPNEPG		0x16
258
#define AGPGARTLO	0x18
250
#define AGPGARTLO	0x18
259
#define AGPGARTHI	0x1c
251
#define AGPGARTHI	0x1c
260
#define AGPNICMD	0x20
252
#define AGPNICMD	0x20
261
 
253
 
262
#define AGP_MAJOR_VERSION_SHIFT	(20)
254
#define AGP_MAJOR_VERSION_SHIFT	(20)
263
#define AGP_MINOR_VERSION_SHIFT	(16)
255
#define AGP_MINOR_VERSION_SHIFT	(16)
264
 
256
 
265
#define AGPSTAT_RQ_DEPTH	(0xff000000)
257
#define AGPSTAT_RQ_DEPTH	(0xff000000)
266
#define AGPSTAT_RQ_DEPTH_SHIFT	24
258
#define AGPSTAT_RQ_DEPTH_SHIFT	24
267
 
259
 
268
#define AGPSTAT_CAL_MASK	(1<<12|1<<11|1<<10)
260
#define AGPSTAT_CAL_MASK	(1<<12|1<<11|1<<10)
269
#define AGPSTAT_ARQSZ		(1<<15|1<<14|1<<13)
261
#define AGPSTAT_ARQSZ		(1<<15|1<<14|1<<13)
270
#define AGPSTAT_ARQSZ_SHIFT	13
262
#define AGPSTAT_ARQSZ_SHIFT	13
271
 
263
 
272
#define AGPSTAT_SBA		(1<<9)
264
#define AGPSTAT_SBA		(1<<9)
273
#define AGPSTAT_AGP_ENABLE	(1<<8)
265
#define AGPSTAT_AGP_ENABLE	(1<<8)
274
#define AGPSTAT_FW		(1<<4)
266
#define AGPSTAT_FW		(1<<4)
275
#define AGPSTAT_MODE_3_0	(1<<3)
267
#define AGPSTAT_MODE_3_0	(1<<3)
276
 
268
 
277
#define AGPSTAT2_1X		(1<<0)
269
#define AGPSTAT2_1X		(1<<0)
278
#define AGPSTAT2_2X		(1<<1)
270
#define AGPSTAT2_2X		(1<<1)
279
#define AGPSTAT2_4X		(1<<2)
271
#define AGPSTAT2_4X		(1<<2)
280
 
272
 
281
#define AGPSTAT3_RSVD		(1<<2)
273
#define AGPSTAT3_RSVD		(1<<2)
282
#define AGPSTAT3_8X		(1<<1)
274
#define AGPSTAT3_8X		(1<<1)
283
#define AGPSTAT3_4X		(1)
275
#define AGPSTAT3_4X		(1)
284
 
276
 
285
#define AGPCTRL_APERENB		(1<<8)
277
#define AGPCTRL_APERENB		(1<<8)
286
#define AGPCTRL_GTLBEN		(1<<7)
278
#define AGPCTRL_GTLBEN		(1<<7)
287
 
279
 
288
#define AGP2_RESERVED_MASK 0x00fffcc8
280
#define AGP2_RESERVED_MASK 0x00fffcc8
289
#define AGP3_RESERVED_MASK 0x00ff00c4
281
#define AGP3_RESERVED_MASK 0x00ff00c4
290
 
282
 
291
#define AGP_ERRATA_FASTWRITES 1<<0
283
#define AGP_ERRATA_FASTWRITES 1<<0
292
#define AGP_ERRATA_SBA	 1<<1
284
#define AGP_ERRATA_SBA	 1<<1
293
#define AGP_ERRATA_1X 1<<2
285
#define AGP_ERRATA_1X 1<<2
294
 
286
 
295
#endif	/* _AGP_BACKEND_PRIV_H */
287
#endif	/* _AGP_BACKEND_PRIV_H */
296
 
288
 
297
#endif>
289
#endif>
298
 
290
 
299
#endif>
291
#endif>
300
#define>
292
#define>
301
#define>
293
#define>
302
#define>
294
#define>
303
#define>
295
#define>
304
 
296
 
305
#define>
297
#define>
306
 
298
 
307
#define>
299
#define>
308
#define>
300
#define>
309
#define>
301
#define>
310
#define>
302
#define>
311
#define>
303
#define>
312
#define>
304
#define>
313
#define>
305
#define>
314
 
306
 
315
#define>
307
#define>
316
 
308
 
317
#define>
309
#define>
318
#define>
310
#define>
319
#define>
311
#define>
320
#define>
312
#define>
321
#define>
313
#define>
322
 
314
 
323
#define>
315
#define>
324
 
316
 
325
#define>
317
#define>
326
#define>
318
#define>
327
#define>
319
#define>
328
#define>
320
#define>
329
#define>
321
#define>
330
#define>
322
#define>
331
#define>
323
#define>
332
#define>
324
#define>
333
#define>
325
#define>
334
#define>
326
#define>
335
#define>
327
#define>
336
#define>
328
#define>
337
#define>
329
#define>
338
#define>
330
#define>
339
#define>
331
#define>
340
#define>
332
#define>
341
#define>
333
#define>
342
#define>
334
#define>
343
#define>
335
#define>