[U-Boot] [PATCH 20/25] exynos: Simplify calling of exynos_dp_phy_ctrl()

Simon Glass sjg at chromium.org
Fri Jan 15 01:00:09 CET 2016


This function controls enabling the EDP PHY. Rename it and drop the existing
weak functions, which are confusing.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/arm/mach-exynos/include/mach/power.h | 2 +-
 arch/arm/mach-exynos/power.c              | 2 +-
 board/samsung/common/exynos5-dt.c         | 5 -----
 drivers/video/exynos/exynos_dp.c          | 9 ++-------
 4 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-exynos/include/mach/power.h b/arch/arm/mach-exynos/include/mach/power.h
index 3f97b31..88f70d9 100644
--- a/arch/arm/mach-exynos/include/mach/power.h
+++ b/arch/arm/mach-exynos/include/mach/power.h
@@ -1717,7 +1717,7 @@ void set_usbdrd_phy_ctrl(unsigned int enable);
 #define POWER_USB_DRD_PHY_CTRL_EN		(1 << 0)
 #define POWER_USB_DRD_PHY_CTRL_DISABLE		(0 << 0)
 
-void set_dp_phy_ctrl(unsigned int enable);
+void exynos_dp_phy_ctrl(unsigned int enable);
 
 #define EXYNOS_DP_PHY_ENABLE		(1 << 0)
 
diff --git a/arch/arm/mach-exynos/power.c b/arch/arm/mach-exynos/power.c
index cd2d661..c923460 100644
--- a/arch/arm/mach-exynos/power.c
+++ b/arch/arm/mach-exynos/power.c
@@ -147,7 +147,7 @@ static void exynos5_dp_phy_control(unsigned int enable)
 	writel(cfg, &power->dptx_phy_control);
 }
 
-void set_dp_phy_ctrl(unsigned int enable)
+void exynos_dp_phy_ctrl(unsigned int enable)
 {
 	if (cpu_is_exynos5())
 		exynos5_dp_phy_control(enable);
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index 4d9e151..0dcea71 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -235,11 +235,6 @@ void exynos_cfg_lcd_gpio(void)
 	gpio_set_value(EXYNOS5_GPIO_B20, 1);
 }
 
-void exynos_set_dp_phy(unsigned int onoff)
-{
-	set_dp_phy_ctrl(onoff);
-}
-
 static int board_dp_set_backlight(int percent)
 {
 	struct udevice *dev;
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 0319d99..a812784 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -15,6 +15,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/dp_info.h>
 #include <asm/arch/dp.h>
+#include <asm/arch/power.h>
 #include <fdtdec.h>
 #include <libfdt.h>
 
@@ -22,12 +23,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-void __exynos_set_dp_phy(unsigned int onoff)
-{
-}
-void exynos_set_dp_phy(unsigned int onoff)
-	__attribute__((weak, alias("__exynos_set_dp_phy")));
-
 static void exynos_dp_disp_info(struct edp_disp_info *disp_info)
 {
 	disp_info->h_total = disp_info->h_res + disp_info->h_sync_width +
@@ -959,7 +954,7 @@ unsigned int exynos_init_dp(void)
 
 	exynos_dp_disp_info(&edp_info->disp_info);
 
-	exynos_set_dp_phy(1);
+	exynos_dp_phy_ctrl(1);
 
 	ret = exynos_dp_init_dp(dp_regs);
 	if (ret != EXYNOS_DP_SUCCESS) {
-- 
2.6.0.rc2.230.g3dd15c0



More information about the U-Boot mailing list