diff options
author | Ajay Kumar <ajaykumar.rs@samsung.com> | 2013-02-21 23:53:06 +0000 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2013-03-27 21:23:15 +0900 |
commit | 9947d13e51aae26903464a3bb7dae727268a3bb6 (patch) | |
tree | 5065a0305c497f81defbb0596b6176738f8ad338 /drivers/video/exynos_dp_lowlevel.c | |
parent | 1e4706a7156469b5f1c3cbee1a4362c0f96023e8 (diff) | |
download | u-boot-imx-9947d13e51aae26903464a3bb7dae727268a3bb6.zip u-boot-imx-9947d13e51aae26903464a3bb7dae727268a3bb6.tar.gz u-boot-imx-9947d13e51aae26903464a3bb7dae727268a3bb6.tar.bz2 |
video: exynos_dp: Add function to parse DP DT node
Add function to parse the required platform data fron DP DT node
and fill the edp_info structure.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers/video/exynos_dp_lowlevel.c')
-rw-r--r-- | drivers/video/exynos_dp_lowlevel.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/video/exynos_dp_lowlevel.c b/drivers/video/exynos_dp_lowlevel.c index 0be91a5..748d9b8 100644 --- a/drivers/video/exynos_dp_lowlevel.c +++ b/drivers/video/exynos_dp_lowlevel.c @@ -25,12 +25,29 @@ #include <asm/arch/cpu.h> #include <asm/arch/dp_info.h> #include <asm/arch/dp.h> +#include <fdtdec.h> +#include <libfdt.h> + +/* Declare global data pointer */ +DECLARE_GLOBAL_DATA_PTR; struct exynos_dp *dp_regs; void exynos_dp_set_base_addr(void) { +#ifdef CONFIG_OF_CONTROL + unsigned int node = fdtdec_next_compatible(gd->fdt_blob, + 0, COMPAT_SAMSUNG_EXYNOS5_DP); + if (node <= 0) + debug("exynos_dp: Can't get device node for dp\n"); + + dp_regs = (struct exynos_dp *)fdtdec_get_addr(gd->fdt_blob, + node, "reg"); + if (dp_regs == NULL) + debug("Can't get the DP base address\n"); +#else dp_regs = (struct exynos_dp *)samsung_get_base_dp(); +#endif } static void exynos_dp_enable_video_input(unsigned int enable) |