Always enable parent resources before child resources.
[coreboot.git] / src / northbridge / via / cx700 / cx700_lpc.c
index 943838720a66e462dff5ccab863031831b45f4eb..f0fc86cd829f8ea419030719a6f2032a7a2f6c21 100644 (file)
@@ -56,7 +56,7 @@ static unsigned char *pin_to_irq(const unsigned char *pin)
 
 static void pci_routing_fixup(struct device *dev)
 {
-       printk_debug("%s: device is %p\n", __FUNCTION__, dev);
+       printk(BIOS_DEBUG, "%s: device is %p\n", __FUNCTION__, dev);
 
        /* set up PCI IRQ routing */
        pci_write_config8(dev, 0x55, pci_irqs[0] << 4);
@@ -64,17 +64,17 @@ static void pci_routing_fixup(struct device *dev)
        pci_write_config8(dev, 0x57, pci_irqs[3] << 4);
 
        /* Assigning IRQs */
-       printk_debug("Setting up USB interrupts.\n");
+       printk(BIOS_DEBUG, "Setting up USB interrupts.\n");
        pci_assign_irqs(0, 0x10, pin_to_irq(usb_pins));
 
-       printk_debug("Setting up VGA interrupts.\n");
+       printk(BIOS_DEBUG, "Setting up VGA interrupts.\n");
        pci_assign_irqs(1, 0x00, pin_to_irq(vga_pins));
 
-       printk_debug("Setting up PCI slot interrupts.\n");
+       printk(BIOS_DEBUG, "Setting up PCI slot interrupts.\n");
        pci_assign_irqs(2, 0x04, pin_to_irq(slot_pins));
        // more?
 
-       printk_debug("Setting up AC97 interrupts.\n");
+       printk(BIOS_DEBUG, "Setting up AC97 interrupts.\n");
        pci_assign_irqs(0x80, 0x1, pin_to_irq(ac97_pins));
 }
 
@@ -84,7 +84,7 @@ static void pci_routing_fixup(struct device *dev)
  * can't figure out how to do !!!!
  */
 
-void setup_pm(device_t dev)
+static void setup_pm(device_t dev)
 {
        /* Debounce LID and PWRBTN# Inputs for 16ms. */
        pci_write_config8(dev, 0x80, 0x20);
@@ -169,7 +169,7 @@ static void cx700_set_lpc_registers(struct device *dev)
 {
        unsigned char enables;
 
-       printk_debug("VIA CX700 LPC bridge init\n");
+       printk(BIOS_DEBUG, "VIA CX700 LPC bridge init\n");
 
        // enable the internal I/O decode
        enables = pci_read_config8(dev, 0x6C);
@@ -236,7 +236,7 @@ static void cx700_set_lpc_registers(struct device *dev)
 
 }
 
-void cx700_read_resources(device_t dev)
+static void cx700_read_resources(device_t dev)
 {
        struct resource *res;
 
@@ -258,7 +258,7 @@ void cx700_read_resources(device_t dev)
        res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
 }
 
-void cx700_set_resources(device_t dev)
+static void cx700_set_resources(device_t dev)
 {
        struct resource *resource;
        resource = find_resource(dev, 1);
@@ -266,11 +266,10 @@ void cx700_set_resources(device_t dev)
        pci_dev_set_resources(dev);
 }
 
-void cx700_enable_resources(device_t dev)
+static void cx700_enable_resources(device_t dev)
 {
        /* Enable SuperIO decoding */
        pci_dev_enable_resources(dev);
-       enable_childrens_resources(dev);
 }
 
 static void cx700_lpc_init(struct device *dev)