提交 261a3ad4 编写于 作者: B Benjamin Herrenschmidt 提交者: Dave Airlie

drm/ast: Properly initialize P2A base before using it in ast_init_3rdtx()

If the P2A has been used to target other SOC registers before that
call, we're going to hit the wrong place so make sure we set the
base address up properly before using it.

(P2A stands for PCIe to AHB bridge and is the bride that allows
accessing the AST's internal AHB bus using a relocatable 64k
window in the second half of the PCIe MMIO BAR)
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 d1b98557
...@@ -400,7 +400,18 @@ void ast_init_3rdtx(struct drm_device *dev) ...@@ -400,7 +400,18 @@ void ast_init_3rdtx(struct drm_device *dev)
if (ast->tx_chip_type == AST_TX_SIL164) if (ast->tx_chip_type == AST_TX_SIL164)
ast_init_dvo(dev); ast_init_dvo(dev);
else { else {
/*
* Set DAC source to VGA mode in SCU2C via the P2A
* bridge. First configure the P2U to target the SCU
* in case it isn't at this stage.
*/
ast_write32(ast, 0xf004, 0x1e6e0000);
ast_write32(ast, 0xf000, 0x1);
/* Then unlock the SCU with the magic password */
ast_write32(ast, 0x12000, 0x1688a8a8); ast_write32(ast, 0x12000, 0x1688a8a8);
ast_write32(ast, 0x12000, 0x1688a8a8);
ast_write32(ast, 0x12000, 0x1688a8a8);
/* Finally, clear bits [17:16] of SCU2c */
data = ast_read32(ast, 0x1202c); data = ast_read32(ast, 0x1202c);
data &= 0xfffcffff; data &= 0xfffcffff;
ast_write32(ast, 0, data); ast_write32(ast, 0, data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册