Convert PCI_DEBUG parameter to a configuration parameter

Change-Id: Ie0272b52bbba56e3381cf33fded873aaa0709af6
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
This commit is contained in:
Dmitriy Korovkin 2015-05-27 13:08:34 -04:00 committed by Anas Nashif
commit a91736ab9a
4 changed files with 14 additions and 8 deletions

View file

@ -143,6 +143,14 @@ config PCI
This options enables support of PCI bus enumeration for device This options enables support of PCI bus enumeration for device
drivers. 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. #FIXME This symbols is not being used.
config CUSTOM_RANDOM_GENERATOR config CUSTOM_RANDOM_GENERATOR
bool "Custom random generator" bool "Custom random generator"

View file

@ -123,7 +123,7 @@ void _InitHardware(void)
consoleInit(); /* NOP if not needed */ consoleInit(); /* NOP if not needed */
#ifdef PCI_DEBUG #ifdef CONFIG_PCI_DEBUG
/* Rescan PCI and display the list of PCI attached devices */ /* Rescan PCI and display the list of PCI attached devices */
struct pci_dev_info info = { struct pci_dev_info info = {
.bar = PCI_BAR_ANY, .bar = PCI_BAR_ANY,
@ -139,5 +139,5 @@ void _InitHardware(void)
info.device_id = 0; info.device_id = 0;
info.bar = PCI_BAR_ANY; info.bar = PCI_BAR_ANY;
} }
#endif /* PCI_DEBUG */ #endif /* CONFIG_PCI_DEBUG */
} }

View file

@ -427,7 +427,7 @@ int pci_bus_scan(struct pci_dev_info *dev_info)
return 0; return 0;
} }
#ifdef PCI_DEBUG #ifdef CONFIG_PCI_DEBUG
/****************************************************************************** /******************************************************************************
* *
* pci_show - Show PCI device * 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), (uint32_t)(dev_info->addr + dev_info->size - 1),
dev_info->irq); dev_info->irq);
} }
#endif /* PCI_DEBUG */ #endif /* CONFIG_PCI_DEBUG */

View file

@ -38,8 +38,6 @@ Module declares routines of PCI bus initialization and query
#ifndef _PCI_H_ #ifndef _PCI_H_
#define _PCI_H_ #define _PCI_H_
#undef PCI_DEBUG
#define BAR_SPACE_MEM 0 #define BAR_SPACE_MEM 0
#define BAR_SPACE_IO 1 #define BAR_SPACE_IO 1
@ -64,8 +62,8 @@ struct pci_dev_info {
extern void pci_bus_scan_init(void); extern void pci_bus_scan_init(void);
extern int pci_bus_scan(struct pci_dev_info *dev_info); 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); extern void pci_show(struct pci_dev_info *dev_info);
#endif /* PCI_DEBUG */ #endif
#endif /* _PCI_H_ */ #endif /* _PCI_H_ */