2 * Copyright (c) 1997, 2000 by Matthew Jacob
3 * NASA AMES Research Center.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice immediately at the beginning of the file, without modification,
11 * this list of conditions, and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * Dummy Node for TLSB Memory Modules found on
31 * AlphaServer 8200 and 8400 systems.
34 #include <sys/cdefs.h>
35 __FBSDID("$FreeBSD$");
37 #include <sys/param.h>
38 #include <sys/systm.h>
39 #include <sys/kernel.h>
40 #include <sys/module.h>
42 #include <sys/malloc.h>
44 #include <machine/rpb.h>
46 #include <alpha/tlsb/tlsbreg.h>
47 #include <alpha/tlsb/tlsbvar.h>
52 static int tlsbmem_probe(device_t);
54 static device_method_t tlsbmem_methods[] = {
55 /* Device interface */
56 DEVMETHOD(device_probe, tlsbmem_probe),
57 DEVMETHOD(device_attach, bus_generic_attach),
58 DEVMETHOD(device_detach, bus_generic_detach),
59 DEVMETHOD(device_shutdown, bus_generic_shutdown),
62 DEVMETHOD(bus_print_child, bus_generic_print_child),
63 DEVMETHOD(bus_read_ivar, bus_generic_read_ivar),
64 DEVMETHOD(bus_write_ivar, bus_generic_write_ivar),
65 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
66 DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
71 static devclass_t tlsbmem_devclass;
72 static driver_t tlsbmem_driver = {
73 "tlsbmem", tlsbmem_methods, 1
77 tlsbmem_probe(device_t dev)
79 struct tlsb_device *tdev = DEVTOTLSB(dev);
80 if (!TLDEV_ISMEM(tdev->td_tldev)) {
86 DRIVER_MODULE(tlsbmem, tlsb, tlsbmem_driver, tlsbmem_devclass, 0, 0);