summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2015-04-28 14:20:44 +0800
committerYe Li <ye.li@nxp.com>2016-03-25 11:52:41 +0800
commit0c47d4138fd2fe8aa864160e23428b2ef95f16ae (patch)
tree6c55d94d99bf3f262935ae2b88e25409bb7cb077 /drivers/video
parent8dcbd43b971616fb67dc3b2af32e2d33f68ed0ce (diff)
downloadu-boot-imx-0c47d4138fd2fe8aa864160e23428b2ef95f16ae.zip
u-boot-imx-0c47d4138fd2fe8aa864160e23428b2ef95f16ae.tar.gz
u-boot-imx-0c47d4138fd2fe8aa864160e23428b2ef95f16ae.tar.bz2
MLK-10747-1 video: ipu: Build ldb_di clock relevant code only for MX6 and MX53
The LDB is found in MX6 variants and MX53, so this patch makes the ldb_di clock relevant code be built only for them. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 3e40c7466ae7d1d6ca74011bfe69ae059d412a3b)
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/ipu_common.c8
-rw-r--r--drivers/video/ipu_disp.c6
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index 500e4ce..40e798c 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -215,15 +215,19 @@ static struct clk ipu_clk = {
#define CONFIG_SYS_LDB_CLOCK 65000000
#endif
+#if defined(CONFIG_MX6) || defined(CONFIG_MX53)
static struct clk ldb_clk = {
.name = "ldb_clk",
.rate = CONFIG_SYS_LDB_CLOCK,
.usecount = 0,
};
+#endif
/* Globals */
struct clk *g_ipu_clk;
+#if defined(CONFIG_MX6) || defined(CONFIG_MX53)
struct clk *g_ldb_clk;
+#endif
unsigned char g_ipu_clk_enabled;
struct clk *g_di_clk[2];
struct clk *g_pixel_clk[2];
@@ -376,8 +380,10 @@ static int ipu_pixel_clk_set_parent(struct clk *clk, struct clk *parent)
if (parent == g_ipu_clk)
di_gen &= ~DI_GEN_DI_CLK_EXT;
+#if defined(CONFIG_MX6) || defined(CONFIG_MX53)
else if (!IS_ERR(g_di_clk[clk->id]) && parent == g_ldb_clk)
di_gen |= DI_GEN_DI_CLK_EXT;
+#endif
else
return -EINVAL;
@@ -471,8 +477,10 @@ int ipu_probe(void)
g_ipu_clk = &ipu_clk;
debug("ipu_clk = %u\n", clk_get_rate(g_ipu_clk));
+#if defined(CONFIG_MX6) || defined(CONFIG_MX53)
g_ldb_clk = &ldb_clk;
debug("ldb_clk = %u\n", clk_get_rate(g_ldb_clk));
+#endif
ipu_reset();
clk_set_parent(g_pixel_clk[0], g_ipu_clk);
diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c
index cbac9f7..3fdf747 100644
--- a/drivers/video/ipu_disp.c
+++ b/drivers/video/ipu_disp.c
@@ -6,7 +6,7 @@
*
* Linux IPU driver for MX51:
*
- * (C) Copyright 2005-2010 Freescale Semiconductor, Inc.
+ * (C) Copyright 2005-2016 Freescale Semiconductor, Inc.
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -48,7 +48,9 @@ static int dmfc_size_28, dmfc_size_29, dmfc_size_24, dmfc_size_27, dmfc_size_23;
int g_di1_tvout;
extern struct clk *g_ipu_clk;
+#if defined(CONFIG_MX6) || defined(CONFIG_MX53)
extern struct clk *g_ldb_clk;
+#endif
extern struct clk *g_di_clk[2];
extern struct clk *g_pixel_clk[2];
@@ -883,7 +885,9 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
udelay(10000);
}
}
+#if defined(CONFIG_MX6) || defined(CONFIG_MX53)
clk_set_parent(g_pixel_clk[disp], g_ldb_clk);
+#endif
} else {
if (clk_get_usecount(g_pixel_clk[disp]) != 0)
clk_set_parent(g_pixel_clk[disp], g_ipu_clk);