Lines Matching full:tcon_top
30 struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev); in sun8i_tcon_top_set_hdmi_src() local
44 spin_lock_irqsave(&tcon_top->reg_lock, flags); in sun8i_tcon_top_set_hdmi_src()
46 val = readl(tcon_top->regs + TCON_TOP_GATE_SRC_REG); in sun8i_tcon_top_set_hdmi_src()
49 writel(val, tcon_top->regs + TCON_TOP_GATE_SRC_REG); in sun8i_tcon_top_set_hdmi_src()
51 spin_unlock_irqrestore(&tcon_top->reg_lock, flags); in sun8i_tcon_top_set_hdmi_src()
59 struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev); in sun8i_tcon_top_de_config() local
78 spin_lock_irqsave(&tcon_top->reg_lock, flags); in sun8i_tcon_top_de_config()
80 reg = readl(tcon_top->regs + TCON_TOP_PORT_SEL_REG); in sun8i_tcon_top_de_config()
88 writel(reg, tcon_top->regs + TCON_TOP_PORT_SEL_REG); in sun8i_tcon_top_de_config()
90 spin_unlock_irqrestore(&tcon_top->reg_lock, flags); in sun8i_tcon_top_de_config()
129 struct sun8i_tcon_top *tcon_top; in sun8i_tcon_top_bind() local
136 tcon_top = devm_kzalloc(dev, sizeof(*tcon_top), GFP_KERNEL); in sun8i_tcon_top_bind()
137 if (!tcon_top) in sun8i_tcon_top_bind()
145 tcon_top->clk_data = clk_data; in sun8i_tcon_top_bind()
147 spin_lock_init(&tcon_top->reg_lock); in sun8i_tcon_top_bind()
149 tcon_top->rst = devm_reset_control_get(dev, NULL); in sun8i_tcon_top_bind()
150 if (IS_ERR(tcon_top->rst)) { in sun8i_tcon_top_bind()
152 return PTR_ERR(tcon_top->rst); in sun8i_tcon_top_bind()
155 tcon_top->bus = devm_clk_get(dev, "bus"); in sun8i_tcon_top_bind()
156 if (IS_ERR(tcon_top->bus)) { in sun8i_tcon_top_bind()
158 return PTR_ERR(tcon_top->bus); in sun8i_tcon_top_bind()
162 tcon_top->regs = regs; in sun8i_tcon_top_bind()
166 ret = reset_control_deassert(tcon_top->rst); in sun8i_tcon_top_bind()
172 ret = clk_prepare_enable(tcon_top->bus); in sun8i_tcon_top_bind()
196 &tcon_top->reg_lock, in sun8i_tcon_top_bind()
202 &tcon_top->reg_lock, in sun8i_tcon_top_bind()
208 &tcon_top->reg_lock, in sun8i_tcon_top_bind()
222 dev_set_drvdata(dev, tcon_top); in sun8i_tcon_top_bind()
230 clk_disable_unprepare(tcon_top->bus); in sun8i_tcon_top_bind()
232 reset_control_assert(tcon_top->rst); in sun8i_tcon_top_bind()
240 struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev); in sun8i_tcon_top_unbind() local
241 struct clk_hw_onecell_data *clk_data = tcon_top->clk_data; in sun8i_tcon_top_unbind()
249 clk_disable_unprepare(tcon_top->bus); in sun8i_tcon_top_unbind()
250 reset_control_assert(tcon_top->rst); in sun8i_tcon_top_unbind()