nexus.c (5d94bbc2412822273465fc12905e25ce5a7e5e5b) nexus.c (698c14e189107f370e0b4523a914d3916d46e603)
1/*-
2 * Copyright 1998 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

--- 41 unchanged lines hidden (view full) ---

50#include <sys/bus.h>
51#include <sys/kernel.h>
52#include <sys/malloc.h>
53#include <sys/module.h>
54#include <machine/bus.h>
55#include <sys/rman.h>
56#include <sys/interrupt.h>
57
1/*-
2 * Copyright 1998 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

--- 41 unchanged lines hidden (view full) ---

50#include <sys/bus.h>
51#include <sys/kernel.h>
52#include <sys/malloc.h>
53#include <sys/module.h>
54#include <machine/bus.h>
55#include <sys/rman.h>
56#include <sys/interrupt.h>
57
58#include <machine/machdep.h>
58#include <machine/vmparam.h>
59#include <machine/pcb.h>
60#include <vm/vm.h>
61#include <vm/pmap.h>
62
63#include <machine/resource.h>
64#include <machine/intr.h>
65

--- 340 unchanged lines hidden (view full) ---

406
407EARLY_DRIVER_MODULE(nexus_fdt, root, nexus_fdt_driver, nexus_fdt_devclass,
408 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST);
409
410static int
411nexus_fdt_probe(device_t dev)
412{
413
59#include <machine/vmparam.h>
60#include <machine/pcb.h>
61#include <vm/vm.h>
62#include <vm/pmap.h>
63
64#include <machine/resource.h>
65#include <machine/intr.h>
66

--- 340 unchanged lines hidden (view full) ---

407
408EARLY_DRIVER_MODULE(nexus_fdt, root, nexus_fdt_driver, nexus_fdt_devclass,
409 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST);
410
411static int
412nexus_fdt_probe(device_t dev)
413{
414
414 if (OF_peer(0) == 0)
415 if (arm64_bus_method != ARM64_BUS_FDT)
415 return (ENXIO);
416
417 device_quiet(dev);
418 return (BUS_PROBE_DEFAULT);
419}
420
421static int
422nexus_fdt_attach(device_t dev)

--- 27 unchanged lines hidden (view full) ---

450
451EARLY_DRIVER_MODULE(nexus_acpi, root, nexus_acpi_driver, nexus_acpi_devclass,
452 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST);
453
454static int
455nexus_acpi_probe(device_t dev)
456{
457
416 return (ENXIO);
417
418 device_quiet(dev);
419 return (BUS_PROBE_DEFAULT);
420}
421
422static int
423nexus_fdt_attach(device_t dev)

--- 27 unchanged lines hidden (view full) ---

451
452EARLY_DRIVER_MODULE(nexus_acpi, root, nexus_acpi_driver, nexus_acpi_devclass,
453 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST);
454
455static int
456nexus_acpi_probe(device_t dev)
457{
458
458 if (acpi_identify() != 0)
459 if (arm64_bus_method != ARM64_BUS_ACPI || acpi_identify() != 0)
459 return (ENXIO);
460
461 device_quiet(dev);
462 return (BUS_PROBE_LOW_PRIORITY);
463}
464
465static int
466nexus_acpi_attach(device_t dev)
467{
468
469 nexus_add_child(dev, 10, "acpi", 0);
470 return (nexus_attach(dev));
471}
472#endif
460 return (ENXIO);
461
462 device_quiet(dev);
463 return (BUS_PROBE_LOW_PRIORITY);
464}
465
466static int
467nexus_acpi_attach(device_t dev)
468{
469
470 nexus_add_child(dev, 10, "acpi", 0);
471 return (nexus_attach(dev));
472}
473#endif