Lines Matching full:tmds

69 	struct sun4i_tmds *tmds = hw_to_tmds(hw);  in sun4i_tmds_determine_rate()  local
88 for (j = tmds->div_offset ?: 1; in sun4i_tmds_determine_rate()
89 j < (16 + tmds->div_offset); j++) { in sun4i_tmds_determine_rate()
128 struct sun4i_tmds *tmds = hw_to_tmds(hw); in sun4i_tmds_recalc_rate() local
131 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PAD_CTRL1_REG); in sun4i_tmds_recalc_rate()
135 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PLL_CTRL_REG); in sun4i_tmds_recalc_rate()
136 reg = ((reg >> 4) & 0xf) + tmds->div_offset; in sun4i_tmds_recalc_rate()
146 struct sun4i_tmds *tmds = hw_to_tmds(hw); in sun4i_tmds_set_rate() local
151 sun4i_tmds_calc_divider(rate, parent_rate, tmds->div_offset, in sun4i_tmds_set_rate()
154 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PAD_CTRL1_REG); in sun4i_tmds_set_rate()
158 writel(reg, tmds->hdmi->base + SUN4I_HDMI_PAD_CTRL1_REG); in sun4i_tmds_set_rate()
160 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PLL_CTRL_REG); in sun4i_tmds_set_rate()
162 writel(reg | SUN4I_HDMI_PLL_CTRL_DIV(div - tmds->div_offset), in sun4i_tmds_set_rate()
163 tmds->hdmi->base + SUN4I_HDMI_PLL_CTRL_REG); in sun4i_tmds_set_rate()
170 struct sun4i_tmds *tmds = hw_to_tmds(hw); in sun4i_tmds_get_parent() local
173 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PLL_DBG0_REG); in sun4i_tmds_get_parent()
180 struct sun4i_tmds *tmds = hw_to_tmds(hw); in sun4i_tmds_set_parent() local
186 reg = readl(tmds->hdmi->base + SUN4I_HDMI_PLL_DBG0_REG); in sun4i_tmds_set_parent()
189 tmds->hdmi->base + SUN4I_HDMI_PLL_DBG0_REG); in sun4i_tmds_set_parent()
206 struct sun4i_tmds *tmds; in sun4i_tmds_create() local
217 tmds = devm_kzalloc(hdmi->dev, sizeof(*tmds), GFP_KERNEL); in sun4i_tmds_create()
218 if (!tmds) in sun4i_tmds_create()
221 init.name = "hdmi-tmds"; in sun4i_tmds_create()
227 tmds->hdmi = hdmi; in sun4i_tmds_create()
228 tmds->hw.init = &init; in sun4i_tmds_create()
229 tmds->div_offset = hdmi->variant->tmds_clk_div_offset; in sun4i_tmds_create()
231 hdmi->tmds_clk = devm_clk_register(hdmi->dev, &tmds->hw); in sun4i_tmds_create()