Lines Matching refs:dev
32 __FBSDID("$FreeBSD: releng/11.0/sys/dev/altera/avgen/altera_avgen_nexus.c 295883 2016-02-22 09:10:23Z skra $");
53 #include <dev/altera/avgen/altera_avgen.h>
56 altera_avgen_nexus_probe(device_t dev)
59 device_set_desc(dev, "Generic Altera Avalon device attachment");
64 altera_avgen_nexus_attach(device_t dev)
71 sc = device_get_softc(dev);
72 sc->avg_dev = dev;
73 sc->avg_unit = device_get_unit(dev);
84 error = resource_int_value(device_get_name(dev), device_get_unit(dev),
87 device_printf(dev, "invalid %s\n", ALTERA_AVALON_STR_WIDTH);
90 (void)resource_string_value(device_get_name(dev),
91 device_get_unit(dev), ALTERA_AVALON_STR_FILEIO, &str_fileio);
92 (void)resource_string_value(device_get_name(dev),
93 device_get_unit(dev), ALTERA_AVALON_STR_MMAPIO, &str_mmapio);
94 (void)resource_string_value(device_get_name(dev),
95 device_get_unit(dev), ALTERA_AVALON_STR_DEVNAME, &str_devname);
96 (void)resource_int_value(device_get_name(dev), device_get_unit(dev),
101 sc->avg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
104 device_printf(dev, "couldn't map memory\n");
110 bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid,
116 altera_avgen_nexus_detach(device_t dev)
120 sc = device_get_softc(dev);
122 bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res);