Lines Matching refs:dev
32 __FBSDID("$FreeBSD: releng/11.0/sys/dev/altera/sdcard/altera_sdcard_fdt.c 261410 2014-02-02 19:17:28Z ian $");
53 #include <dev/altera/sdcard/altera_sdcard.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_sdcard_fdt_probe(device_t dev)
67 if (!ofw_bus_status_okay(dev))
70 if (ofw_bus_is_compatible(dev, "altera,sdcard_11_2011")) {
71 device_set_desc(dev, "Altera Secure Data Card IP Core");
78 altera_sdcard_fdt_attach(device_t dev)
82 sc = device_get_softc(dev);
83 sc->as_dev = dev;
84 sc->as_unit = device_get_unit(dev);
86 sc->as_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
89 device_printf(dev, "couldn't map memory\n");
97 altera_sdcard_fdt_detach(device_t dev)
101 sc = device_get_softc(dev);
105 bus_release_resource(dev, SYS_RES_MEMORY, sc->as_rid, sc->as_res);