Lines Matching refs:tcon_top

24 	struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev);  in sun8i_tcon_top_set_hdmi_src()  local
38 spin_lock_irqsave(&tcon_top->reg_lock, flags); in sun8i_tcon_top_set_hdmi_src()
40 val = readl(tcon_top->regs + TCON_TOP_GATE_SRC_REG); in sun8i_tcon_top_set_hdmi_src()
43 writel(val, tcon_top->regs + TCON_TOP_GATE_SRC_REG); in sun8i_tcon_top_set_hdmi_src()
45 spin_unlock_irqrestore(&tcon_top->reg_lock, flags); in sun8i_tcon_top_set_hdmi_src()
53 struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev); in sun8i_tcon_top_de_config() local
72 spin_lock_irqsave(&tcon_top->reg_lock, flags); in sun8i_tcon_top_de_config()
74 reg = readl(tcon_top->regs + TCON_TOP_PORT_SEL_REG); in sun8i_tcon_top_de_config()
82 writel(reg, tcon_top->regs + TCON_TOP_PORT_SEL_REG); in sun8i_tcon_top_de_config()
84 spin_unlock_irqrestore(&tcon_top->reg_lock, flags); in sun8i_tcon_top_de_config()
123 struct sun8i_tcon_top *tcon_top; in sun8i_tcon_top_bind() local
128 tcon_top = devm_kzalloc(dev, sizeof(*tcon_top), GFP_KERNEL); in sun8i_tcon_top_bind()
129 if (!tcon_top) in sun8i_tcon_top_bind()
137 tcon_top->clk_data = clk_data; in sun8i_tcon_top_bind()
139 spin_lock_init(&tcon_top->reg_lock); in sun8i_tcon_top_bind()
141 tcon_top->rst = devm_reset_control_get(dev, NULL); in sun8i_tcon_top_bind()
142 if (IS_ERR(tcon_top->rst)) { in sun8i_tcon_top_bind()
144 return PTR_ERR(tcon_top->rst); in sun8i_tcon_top_bind()
147 tcon_top->bus = devm_clk_get(dev, "bus"); in sun8i_tcon_top_bind()
148 if (IS_ERR(tcon_top->bus)) { in sun8i_tcon_top_bind()
150 return PTR_ERR(tcon_top->bus); in sun8i_tcon_top_bind()
155 tcon_top->regs = regs; in sun8i_tcon_top_bind()
159 ret = reset_control_deassert(tcon_top->rst); in sun8i_tcon_top_bind()
165 ret = clk_prepare_enable(tcon_top->bus); in sun8i_tcon_top_bind()
181 &tcon_top->reg_lock, in sun8i_tcon_top_bind()
186 &tcon_top->reg_lock, in sun8i_tcon_top_bind()
191 &tcon_top->reg_lock, in sun8i_tcon_top_bind()
207 dev_set_drvdata(dev, tcon_top); in sun8i_tcon_top_bind()
215 clk_disable_unprepare(tcon_top->bus); in sun8i_tcon_top_bind()
217 reset_control_assert(tcon_top->rst); in sun8i_tcon_top_bind()
225 struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev); in sun8i_tcon_top_unbind() local
226 struct clk_hw_onecell_data *clk_data = tcon_top->clk_data; in sun8i_tcon_top_unbind()
233 clk_disable_unprepare(tcon_top->bus); in sun8i_tcon_top_unbind()
234 reset_control_assert(tcon_top->rst); in sun8i_tcon_top_unbind()