diff options
author | jchandra <jchandra@FreeBSD.org> | 2015-02-26 02:05:45 +0000 |
---|---|---|
committer | jchandra <jchandra@FreeBSD.org> | 2015-02-26 02:05:45 +0000 |
commit | 00251f90bcb81d7d54b7e22b013d6c9d499c0950 (patch) | |
tree | c5d8de5851136a813231fd93ee714a2fb3616127 /sys/mips/nlm | |
parent | 05a9f93ae4647ad953724a6a110bf7dc945bab98 (diff) | |
download | FreeBSD-src-00251f90bcb81d7d54b7e22b013d6c9d499c0950.zip FreeBSD-src-00251f90bcb81d7d54b7e22b013d6c9d499c0950.tar.gz |
Add netlogic,xlp-pic as interrupt controller for XLP
Add an empty driver for netlogic,xlp-pic to ensure that the device tree
is correct and has an interrupt controller.
Diffstat (limited to 'sys/mips/nlm')
-rw-r--r-- | sys/mips/nlm/intr_machdep.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sys/mips/nlm/intr_machdep.c b/sys/mips/nlm/intr_machdep.c index 84a5fbb..442cdce 100644 --- a/sys/mips/nlm/intr_machdep.c +++ b/sys/mips/nlm/intr_machdep.c @@ -35,6 +35,10 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <sys/interrupt.h> #include <sys/kernel.h> +#include <sys/module.h> + +#include <dev/ofw/ofw_bus.h> +#include <dev/ofw/ofw_bus_subr.h> #include <machine/cpu.h> #include <machine/cpufunc.h> @@ -251,3 +255,39 @@ cpu_init_interrupts() mips_intr_counters[i] = mips_intrcnt_create(name); } } + +static int xlp_pic_probe(device_t); +static int xlp_pic_attach(device_t); + +static int +xlp_pic_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "netlogic,xlp-pic")) + return (ENXIO); + device_set_desc(dev, "XLP PIC"); + return (0); +} + +static int +xlp_pic_attach(device_t dev) +{ + + return (0); +} + +static device_method_t xlp_pic_methods[] = { + DEVMETHOD(device_probe, xlp_pic_probe), + DEVMETHOD(device_attach, xlp_pic_attach), + + DEVMETHOD_END +}; + +static driver_t xlp_pic_driver = { + "xlp_pic", + xlp_pic_methods, + 1, /* no softc */ +}; + +static devclass_t xlp_pic_devclass; +DRIVER_MODULE(xlp_pic, simplebus, xlp_pic_driver, xlp_pic_devclass, 0, 0); |