Lines Matching defs:dev
38 #include <dev/fdt/simplebus.h>
39 #include <dev/ofw/ofw_bus.h>
40 #include <dev/ofw/ofw_bus_subr.h>
41 #include <dev/clk/clk.h>
42 #include <dev/clk/clk_gate.h>
230 static int armada38x_gateclk_probe(device_t dev);
231 static int armada38x_gateclk_attach(device_t dev);
234 armada38x_gateclk_write_4(device_t dev, bus_addr_t addr, uint32_t val)
236 struct armada38x_gateclk_softc *sc = device_get_softc(dev);
246 armada38x_gateclk_read_4(device_t dev, bus_addr_t addr, uint32_t *val)
248 struct armada38x_gateclk_softc *sc = device_get_softc(dev);
258 armada38x_gateclk_modify_4(device_t dev, bus_addr_t addr, uint32_t clr,
261 struct armada38x_gateclk_softc *sc = device_get_softc(dev);
276 armada38x_gateclk_device_lock(device_t dev)
278 struct armada38x_gateclk_softc *sc = device_get_softc(dev);
284 armada38x_gateclk_device_unlock(device_t dev)
286 struct armada38x_gateclk_softc *sc = device_get_softc(dev);
315 armada38x_gateclk_probe(device_t dev)
318 if (!ofw_bus_status_okay(dev))
321 if(!ofw_bus_is_compatible(dev, "marvell,armada-380-gating-clock"))
324 device_set_desc(dev, "ARMADA38X gateclk");
330 armada38x_gateclk_attach(device_t dev)
338 sc = device_get_softc(dev);
339 node = ofw_bus_get_node(dev);
341 if (bus_alloc_resources(dev, armada38x_gateclk_specs, &sc->res) != 0) {
342 device_printf(dev, "Cannot allocate resources.\n");
346 mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF);
348 sc->clkdom = clkdom_create(dev);
350 device_printf(dev, "Cannot create clock domain.\n");
354 error = clk_get_by_ofw_index(dev, node, 0, &clock);
371 device_printf(dev, "Cannot create gate nodes\n");