aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c23
-rw-r--r--arch/powerpc/platforms/powernv/pci.h4
2 files changed, 27 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 319ed61d674a..dc4ec7956967 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/pci.h> 15#include <linux/pci.h>
16#include <linux/debugfs.h>
16#include <linux/delay.h> 17#include <linux/delay.h>
17#include <linux/string.h> 18#include <linux/string.h>
18#include <linux/init.h> 19#include <linux/init.h>
@@ -32,6 +33,7 @@
32#include <asm/iommu.h> 33#include <asm/iommu.h>
33#include <asm/tce.h> 34#include <asm/tce.h>
34#include <asm/xics.h> 35#include <asm/xics.h>
36#include <asm/debug.h>
35 37
36#include "powernv.h" 38#include "powernv.h"
37#include "pci.h" 39#include "pci.h"
@@ -969,12 +971,33 @@ static void pnv_pci_ioda_setup_DMA(void)
969 } 971 }
970} 972}
971 973
974static void pnv_pci_ioda_create_dbgfs(void)
975{
976#ifdef CONFIG_DEBUG_FS
977 struct pci_controller *hose, *tmp;
978 struct pnv_phb *phb;
979 char name[16];
980
981 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
982 phb = hose->private_data;
983
984 sprintf(name, "PCI%04x", hose->global_number);
985 phb->dbgfs = debugfs_create_dir(name, powerpc_debugfs_root);
986 if (!phb->dbgfs)
987 pr_warning("%s: Error on creating debugfs on PHB#%x\n",
988 __func__, hose->global_number);
989 }
990#endif /* CONFIG_DEBUG_FS */
991}
992
972static void pnv_pci_ioda_fixup(void) 993static void pnv_pci_ioda_fixup(void)
973{ 994{
974 pnv_pci_ioda_setup_PEs(); 995 pnv_pci_ioda_setup_PEs();
975 pnv_pci_ioda_setup_seg(); 996 pnv_pci_ioda_setup_seg();
976 pnv_pci_ioda_setup_DMA(); 997 pnv_pci_ioda_setup_DMA();
977 998
999 pnv_pci_ioda_create_dbgfs();
1000
978#ifdef CONFIG_EEH 1001#ifdef CONFIG_EEH
979 eeh_addr_cache_build(); 1002 eeh_addr_cache_build();
980 eeh_init(); 1003 eeh_init();
diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h
index 3656a2409e9a..43906e3ab26f 100644
--- a/arch/powerpc/platforms/powernv/pci.h
+++ b/arch/powerpc/platforms/powernv/pci.h
@@ -96,6 +96,10 @@ struct pnv_phb {
96 int removed; 96 int removed;
97#endif 97#endif
98 98
99#ifdef CONFIG_DEBUG_FS
100 struct dentry *dbgfs;
101#endif
102
99#ifdef CONFIG_PCI_MSI 103#ifdef CONFIG_PCI_MSI
100 unsigned int msi_base; 104 unsigned int msi_base;
101 unsigned int msi32_support; 105 unsigned int msi32_support;