Lines Matching refs:rcdev
10 #define rcdev_to_unit(rcdev) container_of(rcdev, struct mmp_clk_reset_unit, rcdev) argument
12 static int mmp_of_reset_xlate(struct reset_controller_dev *rcdev, in mmp_of_reset_xlate() argument
15 struct mmp_clk_reset_unit *unit = rcdev_to_unit(rcdev); in mmp_of_reset_xlate()
19 if (WARN_ON(reset_spec->args_count != rcdev->of_reset_n_cells)) in mmp_of_reset_xlate()
22 for (i = 0; i < rcdev->nr_resets; i++) { in mmp_of_reset_xlate()
28 if (i == rcdev->nr_resets) in mmp_of_reset_xlate()
34 static int mmp_clk_reset_assert(struct reset_controller_dev *rcdev, in mmp_clk_reset_assert() argument
37 struct mmp_clk_reset_unit *unit = rcdev_to_unit(rcdev); in mmp_clk_reset_assert()
56 static int mmp_clk_reset_deassert(struct reset_controller_dev *rcdev, in mmp_clk_reset_deassert() argument
59 struct mmp_clk_reset_unit *unit = rcdev_to_unit(rcdev); in mmp_clk_reset_deassert()
93 unit->rcdev.of_reset_n_cells = 1; in mmp_clk_reset_register()
94 unit->rcdev.nr_resets = nr_resets; in mmp_clk_reset_register()
95 unit->rcdev.ops = &mmp_clk_reset_ops; in mmp_clk_reset_register()
96 unit->rcdev.of_node = np; in mmp_clk_reset_register()
97 unit->rcdev.of_xlate = mmp_of_reset_xlate; in mmp_clk_reset_register()
99 reset_controller_register(&unit->rcdev); in mmp_clk_reset_register()