Lines Matching refs:dev
44 #include <dev/ofw/ofw_bus.h>
45 #include <dev/ofw/ofw_bus_subr.h>
46 #include <dev/ofw/ofw_subr.h>
47 #include <dev/fdt/fdt_common.h>
49 #include <dev/extres/clk/clk_gate.h>
107 aw_gate_create(device_t dev, bus_addr_t paddr, struct clkdom *clkdom,
128 aw_gate_add(device_t dev, struct clkdom *clkdom, phandle_t node,
138 nout = clk_parse_ofw_out_names(dev, node, &names, &indices);
140 device_printf(dev, "no clock outputs found\n");
144 device_printf(dev, "no clock-indices property\n");
148 error = clk_get_by_ofw_index(dev, node, 0, &clk_parent);
150 device_printf(dev, "cannot parse clock parent\n");
155 error = aw_gate_create(dev, paddr, clkdom,
165 aw_gate_probe(device_t dev)
169 if (!ofw_bus_status_okay(dev))
172 d = (const char *)ofw_bus_search_compatible(dev, compat_data)->ocd_data;
176 device_set_desc(dev, d);
181 aw_gate_attach(device_t dev)
188 node = ofw_bus_get_node(dev);
191 device_printf(dev, "cannot parse 'reg' property\n");
195 clkdom = clkdom_create(dev);
197 if (ofw_bus_is_compatible(dev, "allwinner,sunxi-multi-bus-gates-clk")) {
199 aw_gate_add(dev, clkdom, child, paddr);
201 aw_gate_add(dev, clkdom, node, paddr);
204 device_printf(dev, "cannot finalize clkdom initialization\n");