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()
73 struct clk_sp810 *sp810 = data; in clk_sp810_timerclken_of_get() local
76 clkspec->args[0] >= ARRAY_SIZE(sp810->timerclken))) in clk_sp810_timerclken_of_get()
79 return sp810->timerclken[clkspec->args[0]].clk; in clk_sp810_timerclken_of_get()
84 struct clk_sp810 *sp810 = kzalloc(sizeof(*sp810), GFP_KERNEL); in clk_sp810_of_setup() local
93 if (!sp810) in clk_sp810_of_setup()
98 kfree(sp810); in clk_sp810_of_setup()
102 sp810->node = node; in clk_sp810_of_setup()
103 sp810->base = of_iomap(node, 0); in clk_sp810_of_setup()
104 spin_lock_init(&sp810->lock); in clk_sp810_of_setup()
114 for (i = 0; i < ARRAY_SIZE(sp810->timerclken); i++) { in clk_sp810_of_setup()
117 sp810->timerclken[i].sp810 = sp810; in clk_sp810_of_setup()
118 sp810->timerclken[i].channel = i; in clk_sp810_of_setup()
119 sp810->timerclken[i].hw.init = &init; in clk_sp810_of_setup()
128 init.ops->set_parent(&sp810->timerclken[i].hw, 1); in clk_sp810_of_setup()
130 sp810->timerclken[i].clk = clk_register(NULL, in clk_sp810_of_setup()
131 &sp810->timerclken[i].hw); in clk_sp810_of_setup()
132 WARN_ON(IS_ERR(sp810->timerclken[i].clk)); in clk_sp810_of_setup()
135 of_clk_add_provider(node, clk_sp810_timerclken_of_get, sp810); in clk_sp810_of_setup()
138 CLK_OF_DECLARE(sp810, "arm,sp810", clk_sp810_of_setup);