Always enable parent resources before child resources.
[coreboot.git] / src / southbridge / amd / cs5536 / cs5536.c
index 11679278f89fe9227481029f478f7987f142ebc8..c4ceaea4f7984af45b8a087bdb14362297528bb1 100644 (file)
@@ -518,9 +518,6 @@ static void enable_USB_port4(struct southbridge_amd_cs5536_config *sb)
  *
  *     Called from northbridge init (Pre-VSA).
  *
- *     NOTE! This function is NOT called if the CS5536 is combined with
- *     an AMD Geode GX2. It's ONLY used on Geode LX based systems.
- *
  ****************************************************************************/
 void chipsetinit(void)
 {
@@ -530,8 +527,7 @@ void chipsetinit(void)
        struct southbridge_amd_cs5536_config *sb;
        struct msrinit *csi;
 
-       dev = dev_find_device(PCI_VENDOR_ID_AMD,
-                       PCI_DEVICE_ID_AMD_CS5536_ISA, 0);
+       dev = dev_find_slot(0, PCI_DEVFN(0xf, 0));
 
        if (!dev) {
                printk(BIOS_ERR, "CS5536 not found.\n");
@@ -655,10 +651,9 @@ static void cs5536_read_resources(device_t dev)
 
        res = new_resource(dev, 1);
        res->base = 0x0UL;
-       res->size = 0x400UL;
+       res->size = 0x1000UL;
        res->limit = 0xffffUL;
-       res->flags = IORESOURCE_IO |
-                    IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
+       res->flags = IORESOURCE_IO | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
 
        res = new_resource(dev, 3); /* IOAPIC */
        res->base = 0xfec00000;
@@ -672,17 +667,10 @@ static void southbridge_enable(struct device *dev)
 
 }
 
-static void cs5536_pci_dev_enable_resources(device_t dev)
-{
-       printk(BIOS_ERR, "cs5536: %s()\n", __func__);
-       pci_dev_enable_resources(dev);
-       enable_childrens_resources(dev);
-}
-
 static struct device_operations southbridge_ops = {
        .read_resources = cs5536_read_resources,
        .set_resources = pci_dev_set_resources,
-       .enable_resources = cs5536_pci_dev_enable_resources,
+       .enable_resources = pci_dev_enable_resources,
        .init = southbridge_init,
 //      .enable                   = southbridge_enable,
        .scan_bus = scan_static_bus,