diff options
author | Yinghai Lu <yinghailu@gmail.com> | 2005-07-08 02:49:49 +0000 |
---|---|---|
committer | Yinghai Lu <yinghailu@gmail.com> | 2005-07-08 02:49:49 +0000 |
commit | 13f1c2af8be2cd7f7e99a678f5d428a65b771811 (patch) | |
tree | 27cad5581f1fa150f573149d48e82f70ba1b1d9f /src/include/device/device.h | |
parent | 14cde9e96a777f9d75016a13b23fab0480515f58 (diff) |
eric patch
1. x86_setup_mtrr take address bit.
2. generic ht, pcix, pcie beidge...
3. scan bus and reset_bus
4. ht read ctrl to decide if the ht chain
is ready
5. Intel e7520 and e7525 support
6. new ich5r support
7. intel sb 6300 support.
yhlu patch
1. split x86_setup_mtrrs to fixed and var
2. if (resource->flags & IORESOURCE_FIXED ) return; in device.c pick_largest_resource
3. in_conherent.c K8_SCAN_PCI_BUS
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1982 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/include/device/device.h')
-rw-r--r-- | src/include/device/device.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h index be93f554fa..aff5616a88 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -26,6 +26,8 @@ struct chip_operations { #define CHIP_NAME(X) #endif +struct bus; + struct device_operations { void (*read_resources)(device_t dev); void (*set_resources)(device_t dev); @@ -34,6 +36,7 @@ struct device_operations { unsigned int (*scan_bus)(device_t bus, unsigned int max); void (*enable)(device_t dev); void (*set_link)(device_t dev, unsigned int link); + void (*reset_bus)(struct bus *bus); const struct pci_operations *ops_pci; const struct smbus_bus_operations *ops_smbus_bus; const struct pci_bus_operations *ops_pci_bus; @@ -48,6 +51,8 @@ struct bus { unsigned char secondary; /* secondary bus number */ unsigned char subordinate; /* max subordinate bus number */ unsigned char cap; /* PCi capability offset */ + unsigned reset_needed : 1; + unsigned disable_relaxed_ordering : 1; }; #define MAX_RESOURCES 12 @@ -81,7 +86,8 @@ struct device { unsigned int resources; /* link are (down sream) buses attached to the device, usually a leaf - * device with no child have 0 bus attached and a bridge has 1 bus */ + * device with no children have 0 buses attached and a bridge has 1 bus + */ struct bus link[MAX_LINKS]; /* number of buses attached to the device */ unsigned int links; @@ -101,8 +107,11 @@ extern void dev_enumerate(void); extern void dev_configure(void); extern void dev_enable(void); extern void dev_initialize(void); +extern void dev_optimize(void); /* Generic device helper functions */ +extern int reset_bus(struct bus *bus); +extern unsigned int scan_bus(struct device *bus, unsigned int max); extern void compute_allocate_resource(struct bus *bus, struct resource *bridge, unsigned long type_mask, unsigned long type); extern void assign_resources(struct bus *bus); @@ -110,6 +119,9 @@ extern void enable_resources(struct device *dev); extern void enumerate_static_device(void); extern void enumerate_static_devices(void); extern const char *dev_path(device_t dev); +const char *bus_path(struct bus *bus); +extern void dev_set_enabled(device_t dev, int enable); +extern void disable_children(struct bus *bus); /* Helper functions */ device_t find_dev_path(struct bus *parent, struct device_path *path); @@ -134,5 +146,4 @@ extern void enable_childrens_resources(device_t dev); extern void root_dev_enable_resources(device_t dev); extern unsigned int root_dev_scan_bus(device_t root, unsigned int max); extern void root_dev_init(device_t dev); - #endif /* DEVICE_H */ |