5 #include <linux/module.h>
12 #define SIS_ATTBASE 0x90
13 #define SIS_APSIZE 0x94
14 #define SIS_TLBCNTRL 0x97
15 #define SIS_TLBFLUSH 0x98
17 #define PCI_DEVICE_ID_SI_662 0x0662
18 #define PCI_DEVICE_ID_SI_671 0x0671
23 static int sis_fetch_size(
void)
31 for (i = 0; i <
agp_bridge->driver->num_aperture_sizes; i++) {
33 ((temp_size & ~(0x07)) ==
34 (values[i].size_value & ~(0x07)))) {
36 agp_bridge->current_size = (
void *) (values + i);
39 return values[
i].
size;
51 static int sis_configure(
void)
67 static void sis_cleanup(
void)
88 rate = (command & 0x7) << 2;
96 pci_name(device), rate);
105 if (device->
device == bridge->
dev->device) {
106 dev_info(&
agp_bridge->dev->dev,
"SiS delay workaround: giving bridge time to recover\n");
125 .aperture_sizes = sis_generic_sizes,
127 .num_aperture_sizes = 7,
128 .needs_scratch_page =
true,
129 .configure = sis_configure,
130 .fetch_size = sis_fetch_size,
131 .cleanup = sis_cleanup,
132 .tlb_flush = sis_tlbflush,
161 for (i=0; sis_broken_chipsets[
i]!=0; ++
i)
162 if (bridge->
dev->device==sis_broken_chipsets[i])
165 if (sis_broken_chipsets[i] || agp_sis_force_delay)
171 && agp_sis_agp_spec!=0) || agp_sis_agp_spec==1) {
200 bridge->
driver = &sis_driver;
208 sis_get_driver(bridge);
210 pci_set_drvdata(pdev, bridge);
232 static int agp_sis_resume(
struct pci_dev *pdev)
424 static struct pci_driver agp_sis_pci_driver = {
425 .name =
"agpgart-sis",
426 .id_table = agp_sis_pci_table,
427 .probe = agp_sis_probe,
428 .remove = agp_sis_remove,
430 .suspend = agp_sis_suspend,
431 .resume = agp_sis_resume,
435 static int __init agp_sis_init(
void)
439 return pci_register_driver(&agp_sis_pci_driver);
442 static void __exit agp_sis_cleanup(
void)
453 MODULE_PARM_DESC(agp_sis_agp_spec,
"0=force sis init, 1=force generic agp3 init, default: autodetect");