1 /* (c) 2005 Linux Networx GPL see COPYING for details */
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <device/pci_ids.h>
7 #include <device/agp.h>
9 static void agp_tune_dev(device_t dev)
12 cap = pci_find_capability(dev, PCI_CAP_ID_AGP);
16 /* The OS is responsible for AGP tuning so do nothing here */
19 unsigned int agp_scan_bus(struct bus *bus,
20 unsigned min_devfn, unsigned max_devfn, unsigned int max)
23 max = pci_scan_bus(bus, min_devfn, max_devfn, max);
24 for(child = bus->children; child; child = child->sibling) {
25 if ( (child->path.u.pci.devfn < min_devfn) ||
26 (child->path.u.pci.devfn > max_devfn))
35 unsigned int agp_scan_bridge(device_t dev, unsigned int max)
37 return do_pci_scan_bridge(dev, max, agp_scan_bus);
40 /** Default device operations for AGP bridges */
41 static struct pci_operations agp_bus_ops_pci = {
45 struct device_operations default_agp_ops_bus = {
46 .read_resources = pci_bus_read_resources,
47 .set_resources = pci_dev_set_resources,
48 .enable_resources = pci_bus_enable_resources,
50 .scan_bus = agp_scan_bridge,
52 .reset_bus = pci_bus_reset,
53 .ops_pci = &agp_bus_ops_pci,