Lines Matching refs:dev
36 __FBSDID("$FreeBSD: releng/11.0/sys/dev/altera/pio/pio.c 276670 2015-01-04 23:14:04Z br $");
48 #include <dev/fdt/fdt_common.h>
49 #include <dev/ofw/openfirm.h>
50 #include <dev/ofw/ofw_bus.h>
51 #include <dev/ofw/ofw_bus_subr.h>
57 #include <dev/altera/pio/pio.h>
71 device_t dev;
82 pio_setup_irq(device_t dev, void *intr_handler, void *ih_user)
86 sc = device_get_softc(dev);
89 if (bus_setup_intr(sc->dev, sc->res[1], INTR_TYPE_BIO | INTR_MPSAFE,
91 device_printf(sc->dev, "Unable to setup intr\n");
99 pio_teardown_irq(device_t dev)
103 sc = device_get_softc(dev);
105 bus_teardown_intr(sc->dev, sc->res[1], sc->ih);
111 pio_read(device_t dev)
115 sc = device_get_softc(dev);
121 pio_set(device_t dev, int bit, int enable)
125 sc = device_get_softc(dev);
136 pio_configure(device_t dev, int dir, int mask)
140 sc = device_get_softc(dev);
149 pio_probe(device_t dev)
152 if (!ofw_bus_status_okay(dev))
155 if (!ofw_bus_is_compatible(dev, "altr,pio"))
158 device_set_desc(dev, "Altera PIO");
163 pio_attach(device_t dev)
169 sc = device_get_softc(dev);
170 sc->dev = dev;
172 if (bus_alloc_resources(dev, pio_spec, sc->res)) {
173 device_printf(dev, "could not allocate resources\n");
181 if ((node = ofw_bus_get_node(sc->dev)) == -1)
186 fic->dev = dev;