Lines Matching refs:gear
30 struct uniphier_clk_cpugear *gear = to_uniphier_clk_cpugear(hw); in uniphier_clk_cpugear_set_parent() local
34 ret = regmap_write_bits(gear->regmap, in uniphier_clk_cpugear_set_parent()
35 gear->regbase + UNIPHIER_CLK_CPUGEAR_SET, in uniphier_clk_cpugear_set_parent()
36 gear->mask, index); in uniphier_clk_cpugear_set_parent()
40 ret = regmap_write_bits(gear->regmap, in uniphier_clk_cpugear_set_parent()
41 gear->regbase + UNIPHIER_CLK_CPUGEAR_UPD, in uniphier_clk_cpugear_set_parent()
47 return regmap_read_poll_timeout(gear->regmap, in uniphier_clk_cpugear_set_parent()
48 gear->regbase + UNIPHIER_CLK_CPUGEAR_UPD, in uniphier_clk_cpugear_set_parent()
55 struct uniphier_clk_cpugear *gear = to_uniphier_clk_cpugear(hw); in uniphier_clk_cpugear_get_parent() local
60 ret = regmap_read(gear->regmap, in uniphier_clk_cpugear_get_parent()
61 gear->regbase + UNIPHIER_CLK_CPUGEAR_STAT, &val); in uniphier_clk_cpugear_get_parent()
65 val &= gear->mask; in uniphier_clk_cpugear_get_parent()
81 struct uniphier_clk_cpugear *gear; in uniphier_clk_register_cpugear() local
85 gear = devm_kzalloc(dev, sizeof(*gear), GFP_KERNEL); in uniphier_clk_register_cpugear()
86 if (!gear) in uniphier_clk_register_cpugear()
95 gear->regmap = regmap; in uniphier_clk_register_cpugear()
96 gear->regbase = data->regbase; in uniphier_clk_register_cpugear()
97 gear->mask = data->mask; in uniphier_clk_register_cpugear()
98 gear->hw.init = &init; in uniphier_clk_register_cpugear()
100 ret = devm_clk_hw_register(dev, &gear->hw); in uniphier_clk_register_cpugear()
104 return &gear->hw; in uniphier_clk_register_cpugear()