Lines Matching refs:vtac
87 static void sti_vtac_rx_set_config(struct sti_vtac *vtac) in sti_vtac_rx_set_config() argument
92 if (clk_prepare_enable(vtac->clk)) in sti_vtac_rx_set_config()
95 writel(VTAC_FIFO_CONFIG_VAL, vtac->regs + VTAC_RX_FIFO_CONFIG); in sti_vtac_rx_set_config()
98 config |= vtac->mode->vid_in_width << 4; in sti_vtac_rx_set_config()
99 config |= vtac->mode->phyts_width << 16; in sti_vtac_rx_set_config()
100 config |= vtac->mode->phyts_per_pixel << 23; in sti_vtac_rx_set_config()
101 writel(config, vtac->regs + VTAC_CONFIG); in sti_vtac_rx_set_config()
104 static void sti_vtac_tx_set_config(struct sti_vtac *vtac) in sti_vtac_tx_set_config() argument
110 if (clk_prepare_enable(vtac->clk)) in sti_vtac_tx_set_config()
115 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8522); in sti_vtac_tx_set_config()
117 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
118 phy_config = readl(vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
120 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
121 phy_config = readl(vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
123 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
124 phy_config = readl(vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
126 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
127 phy_config = readl(vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
129 writel(phy_config, vtac->phy_regs + VTAC_SYS_CFG8521); in sti_vtac_tx_set_config()
133 config |= vtac->mode->vid_in_width << 4; in sti_vtac_tx_set_config()
134 config |= vtac->mode->phyts_width << 16; in sti_vtac_tx_set_config()
135 config |= vtac->mode->phyts_per_pixel << 23; in sti_vtac_tx_set_config()
136 writel(config, vtac->regs + VTAC_CONFIG); in sti_vtac_tx_set_config()
157 struct sti_vtac *vtac; in sti_vtac_probe() local
160 vtac = devm_kzalloc(dev, sizeof(*vtac), GFP_KERNEL); in sti_vtac_probe()
161 if (!vtac) in sti_vtac_probe()
164 vtac->dev = dev; in sti_vtac_probe()
170 vtac->mode = id->data; in sti_vtac_probe()
177 vtac->regs = devm_ioremap_resource(dev, res); in sti_vtac_probe()
178 if (IS_ERR(vtac->regs)) in sti_vtac_probe()
179 return PTR_ERR(vtac->regs); in sti_vtac_probe()
182 vtac->clk = devm_clk_get(dev, "vtac"); in sti_vtac_probe()
183 if (IS_ERR(vtac->clk)) { in sti_vtac_probe()
185 return PTR_ERR(vtac->clk); in sti_vtac_probe()
190 vtac->phy_regs = devm_ioremap_nocache(dev, res->start, in sti_vtac_probe()
192 sti_vtac_tx_set_config(vtac); in sti_vtac_probe()
195 sti_vtac_rx_set_config(vtac); in sti_vtac_probe()
198 platform_set_drvdata(pdev, vtac); in sti_vtac_probe()
199 DRM_INFO("%s %s\n", __func__, dev_name(vtac->dev)); in sti_vtac_probe()