Commit 511be5fb authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Dave Jones

[AGP] use PCI_AGP_* constants

parent 28681d62
......@@ -350,7 +350,7 @@ static int __init agp_ali_probe (struct pci_dev *dev, const struct pci_device_id
agp_bridge.dev = dev;
agp_bridge.capndx = cap_ptr;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode);
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode);
agp_register_driver(dev);
return 0;
}
......
......@@ -451,7 +451,7 @@ static int __init agp_amdk7_probe (struct pci_dev *dev, const struct pci_device_
agp_bridge.dev = dev;
agp_bridge.capndx = cap_ptr;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode);
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode);
agp_register_driver(dev);
return 0;
}
......
......@@ -368,12 +368,12 @@ static void agp_x86_64_agp_enable(u32 mode)
}
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &command);
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &command);
command = agp_collect_device_status(mode, command);
command |= 0x100;
pci_write_config_dword(agp_bridge.dev, agp_bridge.capndx+8, command);
pci_write_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_COMMAND, command);
agp_device_command(command, 1);
}
......@@ -421,7 +421,7 @@ static int __init agp_amdk8_probe (struct pci_dev *dev, const struct pci_device_
agp_bridge.capndx = cap_ptr;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode);
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode);
amd_8151_setup(dev);
agp_register_driver(dev);
return 0;
......
......@@ -329,7 +329,7 @@ u32 agp_collect_device_status(u32 mode, u32 command)
* Ok, here we have a AGP device. Disable impossible
* settings, and adjust the readqueue to the minimum.
*/
pci_read_config_dword(device, agp + 4, &scratch);
pci_read_config_dword(device, agp + PCI_AGP_STATUS, &scratch);
/* adjust RQ depth */
command = ((command & ~0xff000000) |
......@@ -393,7 +393,7 @@ void agp_device_command(u32 command, int agp_v3)
printk(KERN_INFO PFX "Putting AGP V%d device at %s into %dx mode\n",
agp_v3 ? 3 : 2, device->slot_name, mode);
pci_write_config_dword(device, agp + 8, command);
pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command);
}
}
......@@ -401,13 +401,15 @@ void agp_generic_agp_enable(u32 mode)
{
u32 command;
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx + 4, &command);
pci_read_config_dword(agp_bridge.dev,
agp_bridge.capndx + PCI_AGP_STATUS,
&command);
command = agp_collect_device_status(mode, command);
command |= 0x100;
pci_write_config_dword(agp_bridge.dev,
agp_bridge.capndx + 8,
agp_bridge.capndx + PCI_AGP_COMMAND,
command);
agp_device_command(command, 0);
......
......@@ -177,7 +177,7 @@ static int __init agp_i7x05_probe (struct pci_dev *dev, const struct pci_device_
agp_bridge.dev = dev;
agp_bridge.capndx = cap_ptr;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode)
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode)
agp_register_driver(dev);
return 0;
}
......
......@@ -1423,7 +1423,7 @@ static int __init agp_find_supported_device(struct pci_dev *dev)
agp_bridge.capndx = cap_ptr;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode);
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode);
/* probe for known chipsets */
return agp_lookup_host_bridge(dev);
......
......@@ -235,7 +235,7 @@ static int __init agp_sis_probe (struct pci_dev *dev, const struct pci_device_id
agp_bridge.dev = dev;
agp_bridge.capndx = cap_ptr;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode);
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode);
agp_register_driver(dev);
return 0;
}
......
......@@ -272,7 +272,7 @@ static int serverworks_configure(void)
/* Fill in the mode register */
pci_read_config_dword(serverworks_private.svrwrks_dev,
agp_bridge.capndx+4, &agp_bridge.mode);
agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode);
pci_read_config_byte(agp_bridge.dev, SVWRKS_CACHING, &enable_reg);
enable_reg &= ~0x3;
......@@ -416,7 +416,7 @@ static void serverworks_agp_enable(u32 mode)
u32 command;
pci_read_config_dword(serverworks_private.svrwrks_dev,
agp_bridge.capndx + 4,
agp_bridge.capndx + PCI_AGP_STATUS,
&command);
command = agp_collect_device_status(mode, command);
......@@ -427,7 +427,7 @@ static void serverworks_agp_enable(u32 mode)
command |= 0x100;
pci_write_config_dword(serverworks_private.svrwrks_dev,
agp_bridge.capndx + 8,
agp_bridge.capndx + PCI_AGP_COMMAND,
command);
agp_device_command(command, 0);
......
......@@ -258,7 +258,7 @@ static int __init agp_via_probe (struct pci_dev *dev, const struct pci_device_id
agp_bridge.dev = dev;
agp_bridge.capndx = cap_ptr;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode);
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode);
agp_register_driver(dev);
return 0;
}
......
......@@ -147,7 +147,7 @@ static int __init agp_via_probe (struct pci_dev *dev, const struct pci_device_id
agp_bridge.cant_use_aperture = 0;
/* Fill in the mode register */
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode);
pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+PCI_AGP_STATUS, &agp_bridge.mode);
agp_register_driver(dev);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment