Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
395423f9
Commit
395423f9
authored
Jan 02, 2003
by
Dave Jones
Committed by
Dave Jones
Jan 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGP] Flesh out the VIA KT400 driver some more.
parent
28b0724a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
drivers/char/agp/agp.h
drivers/char/agp/agp.h
+2
-0
drivers/char/agp/via-kt400.c
drivers/char/agp/via-kt400.c
+24
-3
No files found.
drivers/char/agp/agp.h
View file @
395423f9
...
...
@@ -294,7 +294,9 @@ struct agp_bridge_data {
#define VIA_ATTBASE 0x88
/* VIA KT400 */
#define VIA_AGP3_GARTCTRL 0x90
#define VIA_AGP3_APSIZE 0x94
#define VIA_AGP3_ATTBASE 0x98
#define VIA_AGPSEL 0xfd
/* SiS registers */
...
...
drivers/char/agp/via-kt400.c
View file @
395423f9
...
...
@@ -18,9 +18,9 @@ static int via_fetch_size(void)
{
int
i
;
u8
temp
;
struct
aper_size_info_
32
*
values
;
struct
aper_size_info_
16
*
values
;
values
=
A_SIZE_
32
(
agp_bridge
.
aperture_sizes
);
values
=
A_SIZE_
16
(
agp_bridge
.
aperture_sizes
);
pci_read_config_byte
(
agp_bridge
.
dev
,
VIA_AGP3_APSIZE
,
&
temp
);
for
(
i
=
0
;
i
<
agp_bridge
.
num_aperture_sizes
;
i
++
)
{
if
(
temp
==
values
[
i
].
size_value
)
{
...
...
@@ -35,15 +35,36 @@ static int via_fetch_size(void)
static
int
via_configure
(
void
)
{
u32
temp
;
struct
aper_size_info_16
*
current_size
;
current_size
=
A_SIZE_16
(
agp_bridge
.
current_size
);
/* address to map too */
pci_read_config_dword
(
agp_bridge
.
dev
,
VIA_APBASE
,
&
temp
);
agp_bridge
.
gart_bus_addr
=
(
temp
&
PCI_BASE_ADDRESS_MEM_MASK
);
/* attbase - aperture GATT base */
pci_write_config_dword
(
agp_bridge
.
dev
,
VIA_AGP3_ATTBASE
,
agp_bridge
.
gatt_bus_addr
&
0xfffff000
);
return
0
;
}
static
void
via_cleanup
(
void
)
{
struct
aper_size_info_16
*
previous_size
;
previous_size
=
A_SIZE_16
(
agp_bridge
.
previous_size
);
pci_write_config_byte
(
agp_bridge
.
dev
,
VIA_APSIZE
,
previous_size
->
size_value
);
}
static
void
via_tlbflush
(
agp_memory
*
mem
)
{
u32
temp
;
pci_read_config_dword
(
agp_bridge
.
dev
,
VIA_AGP3_GARTCTRL
,
&
temp
);
pci_write_config_dword
(
agp_bridge
.
dev
,
VIA_AGP3_GARTCTRL
,
temp
&
~
(
1
<<
7
));
pci_write_config_dword
(
agp_bridge
.
dev
,
VIA_AGP3_GARTCTRL
,
temp
);
}
static
unsigned
long
via_mask_memory
(
unsigned
long
addr
,
int
type
)
...
...
@@ -53,7 +74,7 @@ static unsigned long via_mask_memory(unsigned long addr, int type)
return
addr
|
agp_bridge
.
masks
[
0
].
mask
;
}
static
struct
aper_size_info_
32
via_generic_sizes
[
11
]
=
static
struct
aper_size_info_
16
via_generic_sizes
[
11
]
=
{
{
4
,
1024
,
0
,
1
<<
11
|
1
<<
10
|
1
<<
9
|
1
<<
8
|
1
<<
5
|
1
<<
4
|
1
<<
3
|
1
<<
2
|
1
<<
1
|
1
<<
0
},
{
8
,
2048
,
1
,
1
<<
11
|
1
<<
10
|
1
<<
9
|
1
<<
8
|
1
<<
5
|
1
<<
4
|
1
<<
3
|
1
<<
2
|
1
<<
1
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment