Searched refs:vtac (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/drivers/gpu/drm/sti/
H A Dsti_vtac.c87 static void sti_vtac_rx_set_config(struct sti_vtac *vtac) sti_vtac_rx_set_config() argument
92 if (clk_prepare_enable(vtac->clk)) sti_vtac_rx_set_config()
95 writel(VTAC_FIFO_CONFIG_VAL, vtac->regs + VTAC_RX_FIFO_CONFIG); sti_vtac_rx_set_config()
98 config |= vtac->mode->vid_in_width << 4; sti_vtac_rx_set_config()
99 config |= vtac->mode->phyts_width << 16; sti_vtac_rx_set_config()
100 config |= vtac->mode->phyts_per_pixel << 23; sti_vtac_rx_set_config()
101 writel(config, vtac->regs + VTAC_CONFIG); sti_vtac_rx_set_config()
104 static void sti_vtac_tx_set_config(struct sti_vtac *vtac) sti_vtac_tx_set_config() argument
110 if (clk_prepare_enable(vtac->clk)) sti_vtac_tx_set_config()
113 /* Configure vtac phy */ sti_vtac_tx_set_config()
115 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8522); sti_vtac_tx_set_config()
117 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
118 phy_config = readl(vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
120 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
121 phy_config = readl(vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
123 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
124 phy_config = readl(vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
126 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
127 phy_config = readl(vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
129 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); sti_vtac_tx_set_config()
131 /* Configure vtac tx */ sti_vtac_tx_set_config()
133 config |= vtac->mode->vid_in_width << 4; sti_vtac_tx_set_config()
134 config |= vtac->mode->phyts_width << 16; sti_vtac_tx_set_config()
135 config |= vtac->mode->phyts_per_pixel << 23; sti_vtac_tx_set_config()
136 writel(config, vtac->regs + VTAC_CONFIG); sti_vtac_tx_set_config()
141 .compatible = "st,vtac-main",
144 .compatible = "st,vtac-aux",
157 struct sti_vtac *vtac; sti_vtac_probe() local
160 vtac = devm_kzalloc(dev, sizeof(*vtac), GFP_KERNEL); sti_vtac_probe()
161 if (!vtac) sti_vtac_probe()
164 vtac->dev = dev; sti_vtac_probe()
170 vtac->mode = id->data; sti_vtac_probe()
177 vtac->regs = devm_ioremap_resource(dev, res); sti_vtac_probe()
178 if (IS_ERR(vtac->regs)) sti_vtac_probe()
179 return PTR_ERR(vtac->regs); sti_vtac_probe()
182 vtac->clk = devm_clk_get(dev, "vtac"); sti_vtac_probe()
183 if (IS_ERR(vtac->clk)) { sti_vtac_probe()
184 DRM_ERROR("Cannot get vtac clock\n"); sti_vtac_probe()
185 return PTR_ERR(vtac->clk); sti_vtac_probe()
190 vtac->phy_regs = devm_ioremap_nocache(dev, res->start, sti_vtac_probe()
192 sti_vtac_tx_set_config(vtac); sti_vtac_probe()
195 sti_vtac_rx_set_config(vtac); sti_vtac_probe()
198 platform_set_drvdata(pdev, vtac); sti_vtac_probe()
199 DRM_INFO("%s %s\n", __func__, dev_name(vtac->dev)); sti_vtac_probe()
211 .name = "sti-vtac",

Completed in 60 milliseconds