Lines Matching refs:dev
32 __FBSDID("$FreeBSD: releng/11.0/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c 261410 2014-02-02 19:17:28Z ian $");
53 #include <dev/altera/jtag_uart/altera_jtag_uart.h>
55 #include <dev/fdt/fdt_common.h>
56 #include <dev/ofw/openfirm.h>
57 #include <dev/ofw/ofw_bus.h>
58 #include <dev/ofw/ofw_bus_subr.h>
64 altera_jtag_uart_fdt_probe(device_t dev)
67 if (!ofw_bus_status_okay(dev))
70 if (ofw_bus_is_compatible(dev, "altera,jtag_uart-11_0")) {
71 device_set_desc(dev, "Altera JTAG UART");
78 altera_jtag_uart_fdt_attach(device_t dev)
84 sc = device_get_softc(dev);
85 sc->ajus_dev = dev;
86 sc->ajus_unit = device_get_unit(dev);
88 sc->ajus_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
91 device_printf(dev, "couldn't map memory\n");
101 sc->ajus_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
104 device_printf(dev,
110 bus_release_resource(dev, SYS_RES_IRQ,
113 bus_release_resource(dev, SYS_RES_MEMORY,
120 altera_jtag_uart_fdt_detach(device_t dev)
124 sc = device_get_softc(dev);
129 bus_release_resource(dev, SYS_RES_IRQ, sc->ajus_irq_rid,
131 bus_release_resource(dev, SYS_RES_MEMORY, sc->ajus_mem_rid,