#include <linux/kernel.h>
 #include <linux/pci.h>
+#include <linux/debugfs.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 #include <linux/init.h>
 #include <asm/iommu.h>
 #include <asm/tce.h>
 #include <asm/xics.h>
+#include <asm/debug.h>
 
 #include "powernv.h"
 #include "pci.h"
        }
 }
 
+static void pnv_pci_ioda_create_dbgfs(void)
+{
+#ifdef CONFIG_DEBUG_FS
+       struct pci_controller *hose, *tmp;
+       struct pnv_phb *phb;
+       char name[16];
+
+       list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
+               phb = hose->private_data;
+
+               sprintf(name, "PCI%04x", hose->global_number);
+               phb->dbgfs = debugfs_create_dir(name, powerpc_debugfs_root);
+               if (!phb->dbgfs)
+                       pr_warning("%s: Error on creating debugfs on PHB#%x\n",
+                               __func__, hose->global_number);
+       }
+#endif /* CONFIG_DEBUG_FS */
+}
+
 static void pnv_pci_ioda_fixup(void)
 {
        pnv_pci_ioda_setup_PEs();
        pnv_pci_ioda_setup_seg();
        pnv_pci_ioda_setup_DMA();
 
+       pnv_pci_ioda_create_dbgfs();
+
 #ifdef CONFIG_EEH
        eeh_addr_cache_build();
        eeh_init();