Lines Matching refs:tmds

72 	struct sun4i_tmds *tmds = hw_to_tmds(hw);  in sun4i_tmds_determine_rate()  local
91 for (j = tmds->div_offset ?: 1; in sun4i_tmds_determine_rate()
92 j < (16 + tmds->div_offset); j++) { in sun4i_tmds_determine_rate()
131 struct sun4i_tmds *tmds = hw_to_tmds(hw); in sun4i_tmds_recalc_rate() local
134 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PAD_CTRL1_REG); in sun4i_tmds_recalc_rate()
138 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PLL_CTRL_REG); in sun4i_tmds_recalc_rate()
139 reg = ((reg >> 4) & 0xf) + tmds->div_offset; in sun4i_tmds_recalc_rate()
149 struct sun4i_tmds *tmds = hw_to_tmds(hw); in sun4i_tmds_set_rate() local
154 sun4i_tmds_calc_divider(rate, parent_rate, tmds->div_offset, in sun4i_tmds_set_rate()
157 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PAD_CTRL1_REG); in sun4i_tmds_set_rate()
161 writel(reg, tmds->hdmi->base + SUN4I_HDMI_PAD_CTRL1_REG); in sun4i_tmds_set_rate()
163 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PLL_CTRL_REG); in sun4i_tmds_set_rate()
165 writel(reg | SUN4I_HDMI_PLL_CTRL_DIV(div - tmds->div_offset), in sun4i_tmds_set_rate()
166 tmds->hdmi->base + SUN4I_HDMI_PLL_CTRL_REG); in sun4i_tmds_set_rate()
173 struct sun4i_tmds *tmds = hw_to_tmds(hw); in sun4i_tmds_get_parent() local
176 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PLL_DBG0_REG); in sun4i_tmds_get_parent()
183 struct sun4i_tmds *tmds = hw_to_tmds(hw); in sun4i_tmds_set_parent() local
189 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PLL_DBG0_REG); in sun4i_tmds_set_parent()
192 tmds->hdmi->base + SUN4I_HDMI_PLL_DBG0_REG); in sun4i_tmds_set_parent()
209 struct sun4i_tmds *tmds; in sun4i_tmds_create() local
220 tmds = devm_kzalloc(hdmi->dev, sizeof(*tmds), GFP_KERNEL); in sun4i_tmds_create()
221 if (!tmds) in sun4i_tmds_create()
230 tmds->hdmi = hdmi; in sun4i_tmds_create()
231 tmds->hw.init = &init; in sun4i_tmds_create()
232 tmds->div_offset = hdmi->variant->tmds_clk_div_offset; in sun4i_tmds_create()
234 hdmi->tmds_clk = devm_clk_register(hdmi->dev, &tmds->hw); in sun4i_tmds_create()