1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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.
This commit is contained in:
Jayachandran C. 2015-02-26 02:05:45 +00:00
parent fb3ba470da
commit 70abc1ff8e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279305
2 changed files with 49 additions and 0 deletions

View File

@ -47,12 +47,21 @@
ranges = <0x0 0x18000000 0x04000000>;
bus-frequency = <0>;
pic: pic@4000 {
compatible = "netlogic,xlp-pic";
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <1>;
reg = <0x4000 0x200>;
};
serial0: serial@30100 {
compatible = "ns16550";
reg = <0x30100 0x200>;
reg-shift = <2>;
current-speed = <115200>;
clock-frequency = <133000000>;
interrupt-parent = <&pic>;
interrupts = <9>;
};

View File

@ -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);