Lines Matching refs:sys
42 struct clk_system *sys = to_clk_system(hw); in clk_system_prepare() local
44 regmap_write(sys->regmap, AT91_PMC_SCER, 1 << sys->id); in clk_system_prepare()
46 if (!is_pck(sys->id)) in clk_system_prepare()
49 while (!clk_system_ready(sys->regmap, sys->id)) in clk_system_prepare()
57 struct clk_system *sys = to_clk_system(hw); in clk_system_unprepare() local
59 regmap_write(sys->regmap, AT91_PMC_SCDR, 1 << sys->id); in clk_system_unprepare()
64 struct clk_system *sys = to_clk_system(hw); in clk_system_is_prepared() local
67 regmap_read(sys->regmap, AT91_PMC_SCSR, &status); in clk_system_is_prepared()
69 if (!(status & (1 << sys->id))) in clk_system_is_prepared()
72 if (!is_pck(sys->id)) in clk_system_is_prepared()
75 regmap_read(sys->regmap, AT91_PMC_SR, &status); in clk_system_is_prepared()
77 return !!(status & (1 << sys->id)); in clk_system_is_prepared()
90 struct clk_system *sys; in at91_clk_register_system() local
98 sys = kzalloc(sizeof(*sys), GFP_KERNEL); in at91_clk_register_system()
99 if (!sys) in at91_clk_register_system()
108 sys->id = id; in at91_clk_register_system()
109 sys->hw.init = &init; in at91_clk_register_system()
110 sys->regmap = regmap; in at91_clk_register_system()
112 hw = &sys->hw; in at91_clk_register_system()
113 ret = clk_hw_register(NULL, &sys->hw); in at91_clk_register_system()
115 kfree(sys); in at91_clk_register_system()