Lines Matching refs:drc
28 struct sun6i_drc *drc; in sun6i_drc_bind() local
31 drc = devm_kzalloc(dev, sizeof(*drc), GFP_KERNEL); in sun6i_drc_bind()
32 if (!drc) in sun6i_drc_bind()
34 dev_set_drvdata(dev, drc); in sun6i_drc_bind()
36 drc->reset = devm_reset_control_get(dev, NULL); in sun6i_drc_bind()
37 if (IS_ERR(drc->reset)) { in sun6i_drc_bind()
39 return PTR_ERR(drc->reset); in sun6i_drc_bind()
42 ret = reset_control_deassert(drc->reset); in sun6i_drc_bind()
48 drc->bus_clk = devm_clk_get(dev, "ahb"); in sun6i_drc_bind()
49 if (IS_ERR(drc->bus_clk)) { in sun6i_drc_bind()
51 ret = PTR_ERR(drc->bus_clk); in sun6i_drc_bind()
54 clk_prepare_enable(drc->bus_clk); in sun6i_drc_bind()
56 drc->mod_clk = devm_clk_get(dev, "mod"); in sun6i_drc_bind()
57 if (IS_ERR(drc->mod_clk)) { in sun6i_drc_bind()
59 ret = PTR_ERR(drc->mod_clk); in sun6i_drc_bind()
62 clk_prepare_enable(drc->mod_clk); in sun6i_drc_bind()
67 clk_disable_unprepare(drc->bus_clk); in sun6i_drc_bind()
69 reset_control_assert(drc->reset); in sun6i_drc_bind()
76 struct sun6i_drc *drc = dev_get_drvdata(dev); in sun6i_drc_unbind() local
78 clk_disable_unprepare(drc->mod_clk); in sun6i_drc_unbind()
79 clk_disable_unprepare(drc->bus_clk); in sun6i_drc_unbind()
80 reset_control_assert(drc->reset); in sun6i_drc_unbind()