ppc_md.pci_dma_bus_setup(bus);
 }
 
+void pcibios_setup_device(struct pci_dev *dev)
+{
+       /* Fixup NUMA node as it may not be setup yet by the generic
+        * code and is needed by the DMA init
+        */
+       set_dev_node(&dev->dev, pcibus_to_node(dev->bus));
+
+       /* Hook up default DMA ops */
+       set_dma_ops(&dev->dev, pci_dma_ops);
+       set_dma_offset(&dev->dev, PCI_DRAM_OFFSET);
+
+       /* Additional platform DMA/iommu setup */
+       if (ppc_md.pci_dma_dev_setup)
+               ppc_md.pci_dma_dev_setup(dev);
+
+       /* Read default IRQs and fixup if necessary */
+       pci_read_irq_line(dev);
+       if (ppc_md.pci_irq_fixup)
+               ppc_md.pci_irq_fixup(dev);
+}
+
 void pcibios_setup_bus_devices(struct pci_bus *bus)
 {
        struct pci_dev *dev;
                if (dev->is_added)
                        continue;
 
-               /* Fixup NUMA node as it may not be setup yet by the generic
-                * code and is needed by the DMA init
-                */
-               set_dev_node(&dev->dev, pcibus_to_node(dev->bus));
-
-               /* Hook up default DMA ops */
-               set_dma_ops(&dev->dev, pci_dma_ops);
-               set_dma_offset(&dev->dev, PCI_DRAM_OFFSET);
-
-               /* Additional platform DMA/iommu setup */
-               if (ppc_md.pci_dma_dev_setup)
-                       ppc_md.pci_dma_dev_setup(dev);
-
-               /* Read default IRQs and fixup if necessary */
-               pci_read_irq_line(dev);
-               if (ppc_md.pci_irq_fixup)
-                       ppc_md.pci_irq_fixup(dev);
+               pcibios_setup_device(dev);
        }
 }
 
                if (ppc_md.pcibios_enable_device_hook(dev))
                        return -EINVAL;
 
+       /* avoid pcie irq fix up impact on cardbus */
+       if (dev->hdr_type != PCI_HEADER_TYPE_CARDBUS)
+               pcibios_setup_device(dev);
+
        return pci_enable_resources(dev, mask);
 }