aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast/ast_dp501.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-09-04 03:50:17 -0400
committerDave Airlie <airlied@redhat.com>2014-09-14 21:37:45 -0400
commit261a3ad42605f5824072d1410d3c5f7b93f7cad8 (patch)
tree18e893b94ae9a49c85e513d2414426ed2e01766f /drivers/gpu/drm/ast/ast_dp501.c
parentd1b985572a3cf88e99a71fe7b8f294ad9f78f007 (diff)
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: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ast/ast_dp501.c')
-rw-r--r--drivers/gpu/drm/ast/ast_dp501.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ast/ast_dp501.c b/drivers/gpu/drm/ast/ast_dp501.c
index 5da4b62285fa..7e2ddde474e3 100644
--- a/drivers/gpu/drm/ast/ast_dp501.c
+++ b/drivers/gpu/drm/ast/ast_dp501.c
@@ -400,7 +400,18 @@ void ast_init_3rdtx(struct drm_device *dev)
400 if (ast->tx_chip_type == AST_TX_SIL164) 400 if (ast->tx_chip_type == AST_TX_SIL164)
401 ast_init_dvo(dev); 401 ast_init_dvo(dev);
402 else { 402 else {
403 /*
404 * Set DAC source to VGA mode in SCU2C via the P2A
405 * bridge. First configure the P2U to target the SCU
406 * in case it isn't at this stage.
407 */
408 ast_write32(ast, 0xf004, 0x1e6e0000);
409 ast_write32(ast, 0xf000, 0x1);
410 /* Then unlock the SCU with the magic password */
403 ast_write32(ast, 0x12000, 0x1688a8a8); 411 ast_write32(ast, 0x12000, 0x1688a8a8);
412 ast_write32(ast, 0x12000, 0x1688a8a8);
413 ast_write32(ast, 0x12000, 0x1688a8a8);
414 /* Finally, clear bits [17:16] of SCU2c */
404 data = ast_read32(ast, 0x1202c); 415 data = ast_read32(ast, 0x1202c);
405 data &= 0xfffcffff; 416 data &= 0xfffcffff;
406 ast_write32(ast, 0, data); 417 ast_write32(ast, 0, data);