Lines Matching +full:mclk +full:- +full:div

14  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
46 ast->support_wide_screen = false; in ast_detect_widescreen()
51 ast->support_wide_screen = true; in ast_detect_widescreen()
53 ast->support_wide_screen = true; in ast_detect_widescreen()
55 ast->support_wide_screen = false; in ast_detect_widescreen()
56 if (ast->chip == AST1300) in ast_detect_widescreen()
57 ast->support_wide_screen = true; in ast_detect_widescreen()
58 if (ast->chip == AST1400) in ast_detect_widescreen()
59 ast->support_wide_screen = true; in ast_detect_widescreen()
60 if (ast->chip == AST2510) in ast_detect_widescreen()
61 ast->support_wide_screen = true; in ast_detect_widescreen()
63 ast->support_wide_screen = true; in ast_detect_widescreen()
71 struct drm_device *dev = &ast->base; in ast_detect_tx_chip()
75 ast->tx_chip_types |= AST_TX_NONE_BIT; in ast_detect_tx_chip()
82 * is at power-on reset, otherwise we'll incorrectly "detect" a in ast_detect_tx_chip()
88 ast->tx_chip_types = AST_TX_SIL164_BIT; in ast_detect_tx_chip()
100 ast->tx_chip_types = AST_TX_SIL164_BIT; in ast_detect_tx_chip()
103 ast->dp501_fw_addr = drmm_kzalloc(dev, 32*1024, GFP_KERNEL); in ast_detect_tx_chip()
104 if (ast->dp501_fw_addr) { in ast_detect_tx_chip()
106 if (ast_backup_fw(dev, ast->dp501_fw_addr, 32*1024)) { in ast_detect_tx_chip()
107 drmm_kfree(dev, ast->dp501_fw_addr); in ast_detect_tx_chip()
108 ast->dp501_fw_addr = NULL; in ast_detect_tx_chip()
113 ast->tx_chip_types = AST_TX_DP501_BIT; in ast_detect_tx_chip()
121 ast->tx_chip_types = AST_TX_ASTDP_BIT; in ast_detect_tx_chip()
126 if (ast->tx_chip_types & AST_TX_NONE_BIT) in ast_detect_tx_chip()
128 if (ast->tx_chip_types & AST_TX_SIL164_BIT) in ast_detect_tx_chip()
130 if (ast->tx_chip_types & AST_TX_DP501_BIT) in ast_detect_tx_chip()
132 if (ast->tx_chip_types & AST_TX_ASTDP_BIT) in ast_detect_tx_chip()
138 struct device_node *np = dev->dev->of_node; in ast_get_dram_info()
141 uint32_t denum, num, div, ref_pll, dsel; in ast_get_dram_info() local
143 switch (ast->config_mode) { in ast_get_dram_info()
149 if (of_property_read_u32(np, "aspeed,mcr-configuration", in ast_get_dram_info()
152 if (of_property_read_u32(np, "aspeed,mcr-scu-mpll", in ast_get_dram_info()
155 if (of_property_read_u32(np, "aspeed,mcr-scu-strap", in ast_get_dram_info()
168 ast->dram_bus_width = 16; in ast_get_dram_info()
169 ast->dram_type = AST_DRAM_1Gx16; in ast_get_dram_info()
171 ast->mclk = 800; in ast_get_dram_info()
173 ast->mclk = 396; in ast_get_dram_info()
178 ast->dram_bus_width = 16; in ast_get_dram_info()
180 ast->dram_bus_width = 32; in ast_get_dram_info()
185 ast->dram_type = AST_DRAM_1Gx16; in ast_get_dram_info()
189 ast->dram_type = AST_DRAM_2Gx16; in ast_get_dram_info()
192 ast->dram_type = AST_DRAM_4Gx16; in ast_get_dram_info()
195 ast->dram_type = AST_DRAM_8Gx16; in ast_get_dram_info()
201 ast->dram_type = AST_DRAM_512Mx16; in ast_get_dram_info()
205 ast->dram_type = AST_DRAM_1Gx16; in ast_get_dram_info()
208 ast->dram_type = AST_DRAM_2Gx16; in ast_get_dram_info()
211 ast->dram_type = AST_DRAM_4Gx16; in ast_get_dram_info()
218 ast->dram_type = AST_DRAM_512Mx16; in ast_get_dram_info()
222 ast->dram_type = AST_DRAM_1Gx16; in ast_get_dram_info()
224 ast->dram_type = AST_DRAM_512Mx32; in ast_get_dram_info()
227 ast->dram_type = AST_DRAM_1Gx32; in ast_get_dram_info()
242 div = 0x4; in ast_get_dram_info()
246 div = 0x2; in ast_get_dram_info()
249 div = 0x1; in ast_get_dram_info()
252 ast->mclk = ref_pll * (num + 2) / ((denum + 2) * (div * 1000)); in ast_get_dram_info()
268 ast = devm_drm_dev_alloc(&pdev->dev, drv, struct ast_device, base); in ast_device_create()
271 dev = &ast->base; in ast_device_create()
273 ast->chip = chip; in ast_device_create()
274 ast->config_mode = config_mode; in ast_device_create()
275 ast->regs = regs; in ast_device_create()
276 ast->ioregs = ioregs; in ast_device_create()
285 drm_info(dev, "dram MCLK=%u Mhz type=%d bus_width=%d\n", in ast_device_create()
286 ast->mclk, ast->dram_type, ast->dram_bus_width); in ast_device_create()
296 ast->dp501_fw_buf = NULL; in ast_device_create()
297 if (ast->vram_size < pci_resource_len(pdev, 0)) { in ast_device_create()
298 ast->dp501_fw_buf = pci_iomap_range(pdev, 0, ast->vram_size, 0); in ast_device_create()
299 if (!ast->dp501_fw_buf) in ast_device_create()