- Moved hlt() to it's own header.
[coreboot.git] / src / include / device / device.h
index 1b2b0169dc05417411e190a37522ce6f5c1e35af..20d9c222983569815b9e443b8a7247aac45d9ec7 100644 (file)
@@ -28,7 +28,7 @@ struct bus {
        unsigned char   cap;            /* PCi capability offset */
 };
 
-#define MAX_RESOURCES 6
+#define MAX_RESOURCES 8
 #define MAX_LINKS     3
 /*
  * There is one device structure for each slot-number/function-number
@@ -49,18 +49,6 @@ struct device {
        unsigned int    enable : 1;     /* set if we should enable the device */
 
        uint8_t command;
-       /*
-        * In theory, the irq level can be read from configuration
-        * space and all would be fine.  However, old PCI chips don't
-        * support these registers and return 0 instead.  For example,
-        * the Vision864-P rev 0 chip can uses INTA, but returns 0 in
-        * the interrupt line and pin registers.  pci_init()
-        * initializes this field with the value at PCI_INTERRUPT_LINE
-        * and it is the job of pcibios_fixup() to change it if
-        * necessary.  The field must not be 0 unless the device
-        * cannot generate interrupts at all.
-        */
-       unsigned int    irq;            /* irq generated by this device */
 
        /* Base registers for this device, can be adjusted by
         * pcibios_fixup() as necessary.
@@ -94,6 +82,8 @@ extern void assign_resources(struct bus *bus);
 extern void enable_resources(struct device *dev);
 extern void enumerate_static_device(void);
 extern const char *dev_path(device_t dev);
+extern void compact_resources(device_t dev);
+extern struct resource *get_resource(device_t dev, unsigned index);
 
 /* Helper functions */
 device_t alloc_find_dev(struct bus *parent, struct device_path *path);