pci: Add an option for enumerating PCI devices

This option will be used to disable PCI enumeration (not PCI bus) to
gain in code size and execution as long as driver will be properly
configured statically. Thus setting this option as set by default.

Change-Id: I7da5d154c8ee89e44fc2bad8e85a5a20f498927e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2015-08-25 19:16:07 +03:00 committed by Anas Nashif
commit 018bcfe8d4
4 changed files with 55 additions and 32 deletions

View file

@ -66,8 +66,17 @@ struct pci_dev_info {
uint16_t device_id;
};
#ifdef CONFIG_PCI_ENUMERATION
extern void pci_bus_scan_init(void);
extern int pci_bus_scan(struct pci_dev_info *dev_info);
#else
#define pci_bus_scan_init(void) {;}
static inline int pci_bus_scan(struct pci_dev_info *dev_info)
{
return 1;
}
#endif /* CONFIG_PCI_ENUMERATION */
void pci_enable_regs(struct pci_dev_info *dev_info);
#ifdef CONFIG_PCI_DEBUG