Lines Matching refs:sp810
24 struct clk_sp810 *sp810; member
38 u32 val = readl(timerclken->sp810->base + SCCTRL); in clk_sp810_timerclken_get_parent()
46 struct clk_sp810 *sp810 = timerclken->sp810; in clk_sp810_timerclken_set_parent() local
53 spin_lock_irqsave(&sp810->lock, flags); in clk_sp810_timerclken_set_parent()
55 val = readl(sp810->base + SCCTRL); in clk_sp810_timerclken_set_parent()
58 writel(val, sp810->base + SCCTRL); in clk_sp810_timerclken_set_parent()
60 spin_unlock_irqrestore(&sp810->lock, flags); in clk_sp810_timerclken_set_parent()
74 struct clk_sp810 *sp810 = data; in clk_sp810_timerclken_of_get() local
77 clkspec->args[0] >= ARRAY_SIZE(sp810->timerclken))) in clk_sp810_timerclken_of_get()
80 return sp810->timerclken[clkspec->args[0]].clk; in clk_sp810_timerclken_of_get()
85 struct clk_sp810 *sp810 = kzalloc(sizeof(*sp810), GFP_KERNEL); in clk_sp810_of_setup() local
94 if (!sp810) in clk_sp810_of_setup()
99 kfree(sp810); in clk_sp810_of_setup()
103 sp810->node = node; in clk_sp810_of_setup()
104 sp810->base = of_iomap(node, 0); in clk_sp810_of_setup()
105 spin_lock_init(&sp810->lock); in clk_sp810_of_setup()
115 for (i = 0; i < ARRAY_SIZE(sp810->timerclken); i++) { in clk_sp810_of_setup()
118 sp810->timerclken[i].sp810 = sp810; in clk_sp810_of_setup()
119 sp810->timerclken[i].channel = i; in clk_sp810_of_setup()
120 sp810->timerclken[i].hw.init = &init; in clk_sp810_of_setup()
129 init.ops->set_parent(&sp810->timerclken[i].hw, 1); in clk_sp810_of_setup()
131 sp810->timerclken[i].clk = clk_register(NULL, in clk_sp810_of_setup()
132 &sp810->timerclken[i].hw); in clk_sp810_of_setup()
133 WARN_ON(IS_ERR(sp810->timerclken[i].clk)); in clk_sp810_of_setup()
136 of_clk_add_provider(node, clk_sp810_timerclken_of_get, sp810); in clk_sp810_of_setup()
139 CLK_OF_DECLARE(sp810, "arm,sp810", clk_sp810_of_setup);