Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/terasic/mtl/terasic_mtl_nexus.c
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
#include <machine/resource.h> | #include <machine/resource.h> | ||||
#include <dev/terasic/mtl/terasic_mtl.h> | #include <dev/terasic/mtl/terasic_mtl.h> | ||||
#include "fb_if.h" | |||||
static int | static int | ||||
terasic_mtl_nexus_probe(device_t dev) | terasic_mtl_nexus_probe(device_t dev) | ||||
{ | { | ||||
device_set_desc(dev, "Terasic Multi-touch LCD (MTL)"); | device_set_desc(dev, "Terasic Multi-touch LCD (MTL)"); | ||||
return (BUS_PROBE_NOWILDCARD); | return (BUS_PROBE_NOWILDCARD); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_text_rid, | ||||
sc->mtl_text_res); | sc->mtl_text_res); | ||||
bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_pixel_rid, | bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_pixel_rid, | ||||
sc->mtl_pixel_res); | sc->mtl_pixel_res); | ||||
bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_reg_rid, | bus_release_resource(dev, SYS_RES_MEMORY, sc->mtl_reg_rid, | ||||
sc->mtl_reg_res); | sc->mtl_reg_res); | ||||
return (0); | return (0); | ||||
} | } | ||||
static struct fb_info * | |||||
terasic_mtl_fb_getinfo(device_t dev) | |||||
{ | |||||
struct terasic_mtl_softc *sc; | |||||
sc = device_get_softc(dev); | |||||
return (&sc->mtl_fb_info); | |||||
} | |||||
static device_method_t terasic_mtl_nexus_methods[] = { | static device_method_t terasic_mtl_nexus_methods[] = { | ||||
DEVMETHOD(device_probe, terasic_mtl_nexus_probe), | DEVMETHOD(device_probe, terasic_mtl_nexus_probe), | ||||
DEVMETHOD(device_attach, terasic_mtl_nexus_attach), | DEVMETHOD(device_attach, terasic_mtl_nexus_attach), | ||||
DEVMETHOD(device_detach, terasic_mtl_nexus_detach), | DEVMETHOD(device_detach, terasic_mtl_nexus_detach), | ||||
DEVMETHOD(fb_getinfo, terasic_mtl_fb_getinfo), | |||||
{ 0, 0 } | { 0, 0 } | ||||
}; | }; | ||||
static driver_t terasic_mtl_nexus_driver = { | static driver_t terasic_mtl_nexus_driver = { | ||||
"terasic_mtl", | "terasic_mtl", | ||||
terasic_mtl_nexus_methods, | terasic_mtl_nexus_methods, | ||||
sizeof(struct terasic_mtl_softc), | sizeof(struct terasic_mtl_softc), | ||||
}; | }; | ||||
DRIVER_MODULE(mtl, nexus, terasic_mtl_nexus_driver, terasic_mtl_devclass, 0, | DRIVER_MODULE(mtl, nexus, terasic_mtl_nexus_driver, terasic_mtl_devclass, 0, | ||||
0); | 0); |