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>
48 #include <dev/extres/clk/clk_gate.h>
49 #include <dev/extres/hwreset/hwreset.h>
61 aw_codecclk_create(device_t dev, bus_addr_t paddr, struct clkdom *clkdom,
82 aw_codecclk_probe(device_t dev)
84 if (!ofw_bus_status_okay(dev))
87 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
90 device_set_desc(dev, "Allwinner CODEC Clock");
95 aw_codecclk_attach(device_t dev)
106 node = ofw_bus_get_node(dev);
110 device_printf(dev, "cannot parse 'reg' property\n");
114 clkdom = clkdom_create(dev);
116 nout = clk_parse_ofw_out_names(dev, node, &names, &indices);
118 device_printf(dev, "must have exactly one output clock\n");
123 error = clk_get_by_ofw_index(dev, 0, &clk_parent);
125 device_printf(dev, "cannot parse clock parent\n");
129 error = aw_codecclk_create(dev, paddr, clkdom,
133 device_printf(dev, "cannot finalize clkdom initialization\n");