Lines Matching refs:dev
48 #include <dev/fdt/fdt_common.h>
49 #include <dev/ofw/ofw_bus.h>
50 #include <dev/ofw/ofw_bus_subr.h>
57 device_t dev;
71 mtx_init(&(sc)->mtx, device_get_nameunit((sc)->dev), \
89 node = ofw_bus_get_node(sc->dev);
95 device_printf(sc->dev, "missing functions attribute in FDT\n");
108 device_printf(sc->dev,
150 aml8726_ccm_probe(device_t dev)
153 if (!ofw_bus_status_okay(dev))
156 if (!ofw_bus_is_compatible(dev, "amlogic,aml8726-ccm"))
159 device_set_desc(dev, "Amlogic aml8726 ccm");
165 aml8726_ccm_attach(device_t dev)
167 struct aml8726_ccm_softc *sc = device_get_softc(dev);
169 sc->dev = dev;
185 device_printf(dev, "unsupported SoC\n");
190 if (bus_alloc_resources(dev, aml8726_ccm_spec, sc->res)) {
191 device_printf(dev, "can not allocate resources for device\n");
201 aml8726_ccm_detach(device_t dev)
203 struct aml8726_ccm_softc *sc = device_get_softc(dev);
207 bus_release_resources(dev, aml8726_ccm_spec, sc->res);