Replaced the functionality of callbacks by using a standard set of functions.
Instead of implementing and hooking up a callback, put the same code in one of
the standard set of functions by overriding it.

Signed-off-by: Ajay Kumar <ajaykumar...@samsung.com>
---
 arch/arm/include/asm/arch-exynos/dp_info.h | 1 -
 board/samsung/smdk5250/smdk5250.c          | 6 +++++-
 drivers/video/exynos_dp.c                  | 9 +++++++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/arch-exynos/dp_info.h 
b/arch/arm/include/asm/arch-exynos/dp_info.h
index 102b709..ff16361 100644
--- a/arch/arm/include/asm/arch-exynos/dp_info.h
+++ b/arch/arm/include/asm/arch-exynos/dp_info.h
@@ -199,7 +199,6 @@ enum {
 
 struct exynos_dp_platform_data {
        struct edp_device_info *edp_dev_info;
-       void (*phy_enable)(unsigned int);
 };
 
 #ifdef CONFIG_EXYNOS_DP
diff --git a/board/samsung/smdk5250/smdk5250.c 
b/board/samsung/smdk5250/smdk5250.c
index 43673a5..9e1e5db 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -440,6 +440,11 @@ vidinfo_t panel_info = {
        .dp_enabled     = 1,
 };
 
+void exynos_set_dp_phy(unsigned int onoff)
+{
+       set_dp_phy_ctrl(onoff);
+}
+
 static struct edp_device_info edp_info = {
        .disp_info = {
                .h_res = 2560,
@@ -470,7 +475,6 @@ static struct edp_device_info edp_info = {
 };
 
 static struct exynos_dp_platform_data dp_platform_data = {
-       .phy_enable     = set_dp_phy_ctrl,
        .edp_dev_info   = &edp_info,
 };
 
diff --git a/drivers/video/exynos_dp.c b/drivers/video/exynos_dp.c
index d72fa56..b2accc7 100644
--- a/drivers/video/exynos_dp.c
+++ b/drivers/video/exynos_dp.c
@@ -32,6 +32,12 @@
 
 static struct exynos_dp_platform_data *dp_pd;
 
+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 +
@@ -872,8 +878,7 @@ unsigned int exynos_init_dp(void)
 
        exynos_dp_disp_info(&edp_info->disp_info);
 
-       if (dp_pd->phy_enable)
-               dp_pd->phy_enable(1);
+       exynos_set_dp_phy(1);
 
        ret = exynos_dp_init_dp();
        if (ret != EXYNOS_DP_SUCCESS) {
-- 
1.8.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to