From 8b339fd6089d43e0831109fe5169be834e33b860 Mon Sep 17 00:00:00 2001
From: "wenping.zhang" <wenping.zhang@rock-chips.com>
Date: Tue, 15 Nov 2016 10:48:51 +0800
Subject: [PATCH] video: rockchip: dp: remove dp phy select operation in dp
 driver.

Previous code select dp phy by dp->port->id, but this id can't
indicate the phy id, and it will introduce a phy power on bug if
we only use typec1 as dp output, so we move these code to typec
phy driver.

Change-Id: If809efe9138b186b060e6c7467473f2d3192bc7e
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
---
 drivers/video/rockchip/dp/rockchip_dp_core.c | 5 -----
 drivers/video/rockchip/dp/rockchip_dp_core.h | 3 ---
 2 files changed, 8 deletions(-)

diff --git a/drivers/video/rockchip/dp/rockchip_dp_core.c b/drivers/video/rockchip/dp/rockchip_dp_core.c
index fbc95016faf5..983a070e162b 100644
--- a/drivers/video/rockchip/dp/rockchip_dp_core.c
+++ b/drivers/video/rockchip/dp/rockchip_dp_core.c
@@ -679,11 +679,6 @@ static int cdn_dp_start_work(struct cdn_dp_device *dp,
 	if (dp->fw_loaded)
 		cdn_dp_set_firmware_active(dp, true);
 
-	ret = cdn_dp_grf_write(dp, GRF_SOC_CON26,
-			       (port->id << UPHY_SEL_BIT) | UPHY_SEL_MASK);
-	if (ret)
-		goto err_phy;
-
 	ret = phy_power_on(port->phy);
 	if (ret) {
 		dev_err(dp->dev, "phy power on failed: %d\n", ret);
diff --git a/drivers/video/rockchip/dp/rockchip_dp_core.h b/drivers/video/rockchip/dp/rockchip_dp_core.h
index 025e18532146..7f7beb538d5a 100644
--- a/drivers/video/rockchip/dp/rockchip_dp_core.h
+++ b/drivers/video/rockchip/dp/rockchip_dp_core.h
@@ -5,9 +5,6 @@
 #define GRF_SOC_CON9		0x6224
 #define GRF_SOC_CON26		0x6268
 
-#define UPHY_SEL_BIT		3
-#define UPHY_SEL_MASK		BIT(19)
-
 #define DPTX_HPD_SEL		(3 << 12)
 #define DPTX_HPD_DEL		(2 << 12)
 #define DPTX_HPD_SEL_MASK	(3 << 28)
-- 
2.34.1