From a91736ab9aa8a4af4d98d821ff00ea1e7ea57a12 Mon Sep 17 00:00:00 2001 From: Dmitriy Korovkin Date: Wed, 27 May 2015 13:08:34 -0400 Subject: [PATCH] Convert PCI_DEBUG parameter to a configuration parameter Change-Id: Ie0272b52bbba56e3381cf33fded873aaa0709af6 Signed-off-by: Dmitriy Korovkin --- arch/x86/Kconfig | 8 ++++++++ arch/x86/quark/system.c | 4 ++-- drivers/pci/pci.c | 4 ++-- include/drivers/pci/pci.h | 6 ++---- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 3876ae5b583..694a5e52410 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -143,6 +143,14 @@ config PCI This options enables support of PCI bus enumeration for device drivers. +config PCI_DEBUG + bool + prompt "Enable PCI debugging" + depends on PCI + default n + help + This options enables PCI debigging functions + #FIXME This symbols is not being used. config CUSTOM_RANDOM_GENERATOR bool "Custom random generator" diff --git a/arch/x86/quark/system.c b/arch/x86/quark/system.c index a97b8384903..d49ec4c1ce8 100644 --- a/arch/x86/quark/system.c +++ b/arch/x86/quark/system.c @@ -123,7 +123,7 @@ void _InitHardware(void) consoleInit(); /* NOP if not needed */ -#ifdef PCI_DEBUG +#ifdef CONFIG_PCI_DEBUG /* Rescan PCI and display the list of PCI attached devices */ struct pci_dev_info info = { .bar = PCI_BAR_ANY, @@ -139,5 +139,5 @@ void _InitHardware(void) info.device_id = 0; info.bar = PCI_BAR_ANY; } -#endif /* PCI_DEBUG */ +#endif /* CONFIG_PCI_DEBUG */ } diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 2493b102084..0427727816d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -427,7 +427,7 @@ int pci_bus_scan(struct pci_dev_info *dev_info) return 0; } -#ifdef PCI_DEBUG +#ifdef CONFIG_PCI_DEBUG /****************************************************************************** * * pci_show - Show PCI device @@ -451,4 +451,4 @@ void pci_show(struct pci_dev_info *dev_info) (uint32_t)(dev_info->addr + dev_info->size - 1), dev_info->irq); } -#endif /* PCI_DEBUG */ +#endif /* CONFIG_PCI_DEBUG */ diff --git a/include/drivers/pci/pci.h b/include/drivers/pci/pci.h index 752b5a62eab..51c0b27ed18 100644 --- a/include/drivers/pci/pci.h +++ b/include/drivers/pci/pci.h @@ -38,8 +38,6 @@ Module declares routines of PCI bus initialization and query #ifndef _PCI_H_ #define _PCI_H_ -#undef PCI_DEBUG - #define BAR_SPACE_MEM 0 #define BAR_SPACE_IO 1 @@ -64,8 +62,8 @@ struct pci_dev_info { extern void pci_bus_scan_init(void); extern int pci_bus_scan(struct pci_dev_info *dev_info); -#ifdef PCI_DEBUG +#ifdef CONFIG_PCI_DEBUG extern void pci_show(struct pci_dev_info *dev_info); -#endif /* PCI_DEBUG */ +#endif #endif /* _PCI_H_ */