Lines Matching refs:dev
38 #include <dev/dwc/if_dwc.h>
39 #include <dev/dwc/if_dwcvar.h>
40 #include <dev/ofw/ofw_bus.h>
41 #include <dev/ofw/ofw_bus_subr.h>
44 #include <dev/extres/clk/clk.h>
45 #include <dev/extres/regulator/regulator.h>
50 a20_if_dwc_probe(device_t dev)
53 if (!ofw_bus_status_okay(dev))
55 if (!ofw_bus_is_compatible(dev, "allwinner,sun7i-a20-gmac"))
57 device_set_desc(dev, "A20 Gigabit Ethernet Controller");
63 a20_if_dwc_init(device_t dev)
72 node = ofw_bus_get_node(dev);
76 error = clk_get_by_ofw_name(dev, "allwinner_gmac_tx", &clk_tx);
78 device_printf(dev, "could not get tx clk\n");
87 error = clk_get_by_name(dev, tx_parent_name, &clk_tx_parent);
89 device_printf(dev, "could not get clock '%s'\n",
96 device_printf(dev, "could not set tx clk parent\n");
102 if (regulator_get_by_ofw_property(dev, "phy-supply", ®) == 0) {
105 device_printf(dev, "could not enable PHY regulator\n");
114 a20_if_dwc_mac_type(device_t dev)
121 a20_if_dwc_mii_clk(device_t dev)