1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 20 unchanged lines hidden (view full) ---
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
37 * $Id: intr_machdep.c,v 1.17 1999/04/14 14:26:36 bde Exp $
38 */
39
40#include "opt_auto_eoi.h"
41
42#include <sys/param.h>
43#ifndef SMP
44#include <machine/lock.h>
45#endif
--- 277 unchanged lines hidden (view full) ---
323 struct isa_device *dp;
324
325 if (id == -1)
326 return ("pci"); /* XXX may also be eisa */
327 if (id == 0)
328 return ("clk0"); /* XXX may also be sloppy driver */
329 if (id == 1)
330 return ("rtc0");
331#if 0
332 for (dp = isa_devtab_bio; dp->id_driver != NULL; dp++)
333 if (dp->id_id == id)
334 goto found_device;
335 for (dp = isa_devtab_cam; dp->id_driver != NULL; dp++)
336 if (dp->id_id == id)
337 goto found_device;
338 for (dp = isa_devtab_net; dp->id_driver != NULL; dp++)
339 if (dp->id_id == id)
340 goto found_device;
341 for (dp = isa_devtab_null; dp->id_driver != NULL; dp++)
342 if (dp->id_id == id)
343 goto found_device;
344 for (dp = isa_devtab_tty; dp->id_driver != NULL; dp++)
345 if (dp->id_id == id)
346 goto found_device;
347#endif
348 return "???";
349
350found_device:
351 snprintf(buf, sizeof(buf), "%s%d", dp->id_driver->name, dp->id_unit);
352 return (buf);
353}
354
355void
--- 163 unchanged lines hidden ---
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 20 unchanged lines hidden (view full) ---
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
37 * $Id: intr_machdep.c,v 1.17 1999/04/14 14:26:36 bde Exp $
38 */
39
40#include "opt_auto_eoi.h"
41
42#include <sys/param.h>
43#ifndef SMP
44#include <machine/lock.h>
45#endif
--- 277 unchanged lines hidden (view full) ---
323 struct isa_device *dp;
324
325 if (id == -1)
326 return ("pci"); /* XXX may also be eisa */
327 if (id == 0)
328 return ("clk0"); /* XXX may also be sloppy driver */
329 if (id == 1)
330 return ("rtc0");
331#if 0
332 for (dp = isa_devtab_bio; dp->id_driver != NULL; dp++)
333 if (dp->id_id == id)
334 goto found_device;
335 for (dp = isa_devtab_cam; dp->id_driver != NULL; dp++)
336 if (dp->id_id == id)
337 goto found_device;
338 for (dp = isa_devtab_net; dp->id_driver != NULL; dp++)
339 if (dp->id_id == id)
340 goto found_device;
341 for (dp = isa_devtab_null; dp->id_driver != NULL; dp++)
342 if (dp->id_id == id)
343 goto found_device;
344 for (dp = isa_devtab_tty; dp->id_driver != NULL; dp++)
345 if (dp->id_id == id)
346 goto found_device;
347#endif
348 return "???";
349
350found_device:
351 snprintf(buf, sizeof(buf), "%s%d", dp->id_driver->name, dp->id_unit);
352 return (buf);
353}
354
355void
--- 163 unchanged lines hidden ---