Lines Matching refs:dev
32 __FBSDID("$FreeBSD: releng/11.0/sys/dev/altera/atse/if_atse_fdt.c 261410 2014-02-02 19:17:28Z ian $");
50 #include <dev/mii/mii.h>
51 #include <dev/mii/miivar.h>
54 #include <dev/fdt/fdt_common.h>
55 #include <dev/ofw/openfirm.h>
56 #include <dev/ofw/ofw_bus.h>
57 #include <dev/ofw/ofw_bus_subr.h>
59 #include <dev/altera/atse/if_atsereg.h>
65 atse_probe_fdt(device_t dev)
68 if (!ofw_bus_status_okay(dev))
71 if (ofw_bus_is_compatible(dev, "altera,atse")) {
72 device_set_desc(dev, "Altera Triple-Speed Ethernet MegaCore");
79 atse_attach_fdt(device_t dev)
84 sc = device_get_softc(dev);
85 sc->atse_dev = dev;
86 sc->atse_unit = device_get_unit(dev);
97 sc->atse_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
100 device_printf(dev, "failed to map memory for ctrl region\n");
116 sc->atse_rx_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
119 device_printf(dev, "failed to map memory for RX FIFO\n");
130 sc->atse_rxc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
133 device_printf(dev, "failed to map memory for RXC FIFO\n");
149 sc->atse_tx_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
152 device_printf(dev, "failed to map memory for TX FIFO\n");
163 sc->atse_txc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
166 device_printf(dev, "failed to map memory for TXC FIFO\n");
178 sc->atse_rx_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
181 sc->atse_tx_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
184 error = atse_attach(dev);
192 atse_detach_resources(dev);