mirror of https://github.com/ipxe/ipxe.git
print_drivers() is now unified.
parent
daad093c40
commit
6f37dc410a
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "dev.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#ifdef BUILD_SERIAL
|
#ifdef BUILD_SERIAL
|
||||||
#include ".buildserial.h"
|
#include ".buildserial.h"
|
||||||
|
@ -14,8 +14,7 @@
|
||||||
#define str(s) #s
|
#define str(s) #s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void print_config(void)
|
void print_config ( void ) {
|
||||||
{
|
|
||||||
printf( "Etherboot " VERSION
|
printf( "Etherboot " VERSION
|
||||||
#ifdef BUILD_SERIAL
|
#ifdef BUILD_SERIAL
|
||||||
" [build "
|
" [build "
|
||||||
|
@ -26,12 +25,7 @@ void print_config(void)
|
||||||
#endif /* BUILD_SERIAL */
|
#endif /* BUILD_SERIAL */
|
||||||
" (GPL) http://etherboot.org\n"
|
" (GPL) http://etherboot.org\n"
|
||||||
"Drivers: " );
|
"Drivers: " );
|
||||||
#ifdef CONFIG_PCI
|
print_drivers();
|
||||||
pci_enumerate();
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_ISA
|
|
||||||
isa_enumerate();
|
|
||||||
#endif
|
|
||||||
printf( " Images: "
|
printf( " Images: "
|
||||||
#ifdef TAGGED_IMAGE
|
#ifdef TAGGED_IMAGE
|
||||||
"NBI "
|
"NBI "
|
||||||
|
@ -110,61 +104,6 @@ void print_config(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *driver_name[] = {
|
|
||||||
"nic",
|
|
||||||
"disk",
|
|
||||||
"floppy",
|
|
||||||
};
|
|
||||||
|
|
||||||
int probe(struct dev *dev)
|
|
||||||
{
|
|
||||||
const char *type_name;
|
|
||||||
type_name = "";
|
|
||||||
if ((dev->type >= 0) &&
|
|
||||||
((unsigned)dev->type < sizeof(driver_name)/sizeof(driver_name[0]))) {
|
|
||||||
type_name = driver_name[dev->type];
|
|
||||||
}
|
|
||||||
if (dev->how_probe == PROBE_FIRST) {
|
|
||||||
dev->to_probe = PROBE_PCI;
|
|
||||||
memset(&dev->state, 0, sizeof(dev->state));
|
|
||||||
}
|
|
||||||
if (dev->to_probe == PROBE_PCI) {
|
|
||||||
#ifdef CONFIG_PCI
|
|
||||||
dev->how_probe = pci_probe(dev, type_name);
|
|
||||||
#else
|
|
||||||
dev->how_probe = PROBE_FAILED;
|
|
||||||
#endif
|
|
||||||
if (dev->how_probe == PROBE_FAILED) {
|
|
||||||
dev->to_probe = PROBE_ISA;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (dev->to_probe == PROBE_ISA) {
|
|
||||||
#ifdef CONFIG_ISA
|
|
||||||
dev->how_probe = isa_probe(dev, type_name);
|
|
||||||
#else
|
|
||||||
dev->how_probe = PROBE_FAILED;
|
|
||||||
#endif
|
|
||||||
if (dev->how_probe == PROBE_FAILED) {
|
|
||||||
dev->to_probe = PROBE_NONE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((dev->to_probe != PROBE_PCI) &&
|
|
||||||
(dev->to_probe != PROBE_ISA)) {
|
|
||||||
dev->how_probe = PROBE_FAILED;
|
|
||||||
|
|
||||||
}
|
|
||||||
return dev->how_probe;
|
|
||||||
}
|
|
||||||
|
|
||||||
void disable(struct dev *dev)
|
|
||||||
{
|
|
||||||
if (dev->disable) {
|
|
||||||
dev->disable(dev);
|
|
||||||
dev->disable = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Drag in all requested console types
|
* Drag in all requested console types
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue