summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2005-04-12 18:38:38 +0200
committerMichael Brown2005-04-12 18:38:38 +0200
commit5e807dffe6b88023f36d87632c7a017155c9c1fd (patch)
treed3648aeb21dd601438925cb16efbeb63e40fff58
parentNew device probing mechanism (diff)
downloadipxe-5e807dffe6b88023f36d87632c7a017155c9c1fd.tar.gz
ipxe-5e807dffe6b88023f36d87632c7a017155c9c1fd.tar.xz
ipxe-5e807dffe6b88023f36d87632c7a017155c9c1fd.zip
Obsoleted by new device probing mechanism.
-rw-r--r--src/core/isa_probe.c66
-rw-r--r--src/core/pci_probe.c70
2 files changed, 0 insertions, 136 deletions
diff --git a/src/core/isa_probe.c b/src/core/isa_probe.c
deleted file mode 100644
index 2bc523e7f..000000000
--- a/src/core/isa_probe.c
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifdef CONFIG_ISA
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2, or (at
- * your option) any later version.
- */
-
-#include "etherboot.h"
-#include "nic.h"
-#include "isa.h"
-
-void isa_enumerate(void)
-{
- const struct isa_driver *driver;
- for(driver = isa_drivers; driver < isa_drivers_end; driver++) {
- printf("%s ", driver->name);
- }
-
-}
-
-int isa_probe(struct dev *dev, const char *type_name)
-{
-/*
- * NIC probing is in the order the drivers were linked togeter.
- * If for some reason you want to change the order,
- * just change the order you list the drivers in.
- */
- struct isa_probe_state *state = &dev->state.isa;
- printf("Probing isa %s...\n", type_name);
- if (dev->how_probe == PROBE_FIRST) {
- state->advance = 0;
- state->driver = isa_drivers;
- dev->index = -1;
- }
- for(;;)
- {
- if ((dev->how_probe != PROBE_AWAKE) && state->advance) {
- state->driver++;
- dev->index = -1;
- }
- state->advance = 1;
-
- if (state->driver >= isa_drivers_end)
- break;
-
- if (state->driver->type != dev->type)
- continue;
-
- if (dev->how_probe != PROBE_AWAKE) {
- dev->type_index++;
- }
- printf("[%s]", state->driver->name);
- dev->devid.bus_type = ISA_BUS_TYPE;
- /* FIXME how do I handle dev->index + PROBE_AGAIN?? */
- /* driver will fill in vendor and device IDs */
- if (state->driver->probe(dev, state->driver->ioaddrs)) {
- state->advance = (dev->index == -1);
- return PROBE_WORKED;
- }
- putchar('\n');
- }
- return PROBE_FAILED;
-}
-
-#endif
diff --git a/src/core/pci_probe.c b/src/core/pci_probe.c
deleted file mode 100644
index d7d55b2da..000000000
--- a/src/core/pci_probe.c
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifdef CONFIG_PCI
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2, or (at
- * your option) any later version.
- */
-
-#include "etherboot.h"
-#include "nic.h"
-#include "pci.h"
-
-void pci_enumerate(void)
-{
- const struct pci_driver *driver;
- for(driver = pci_drivers; driver < pci_drivers_end; driver++) {
- printf("%s ", driver->name);
- }
-}
-
-int pci_probe(struct dev *dev, const char *type_name)
-{
-/*
- * NIC probing is in pci device order, followed by the
- * link order of the drivers. A driver that matches
- * on vendor and device id will supersede a driver
- * that matches on pci class.
- *
- * If you want to probe for another device behind the same pci
- * device just increment index. And the previous probe call
- * will be repeated.
- */
- struct pci_probe_state *state = &dev->state.pci;
- printf("Probing pci %s...\n", type_name);
- if (dev->how_probe == PROBE_FIRST) {
- state->advance = 1;
- state->dev.driver = 0;
- state->dev.bus = 0;
- state->dev.devfn = 0;
- dev->index = -1;
- }
- for(;;) {
- if ((dev->how_probe != PROBE_AWAKE) && state->advance) {
- find_pci(dev->type, &state->dev);
- dev->index = -1;
- }
- state->advance = 1;
-
- if (state->dev.driver == 0)
- break;
-
- if (dev->how_probe != PROBE_AWAKE) {
- dev->type_index++;
- }
- dev->devid.bus_type = PCI_BUS_TYPE;
- dev->devid.vendor_id = htons(state->dev.vendor);
- dev->devid.device_id = htons(state->dev.dev_id);
- /* FIXME how do I handle dev->index + PROBE_AGAIN?? */
-
- printf("[%s]", state->dev.name);
- if (state->dev.driver->probe(dev, &state->dev)) {
- state->advance = (dev->index == -1);
- return PROBE_WORKED;
- }
- putchar('\n');
- }
- return PROBE_FAILED;
-}
-
-#endif