summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2015-04-28 14:20:44 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 14:04:27 +0800
commita59c901317e70da111b426db1be77f289eccbcbc (patch)
treed0a957f3b878f7228cd79dd60e1167da95e3985a /drivers
parente9bee52df53c3d3db4a8b16a161e9ec192b910cb (diff)
downloadu-boot-imx-a59c901317e70da111b426db1be77f289eccbcbc.zip
u-boot-imx-a59c901317e70da111b426db1be77f289eccbcbc.tar.gz
u-boot-imx-a59c901317e70da111b426db1be77f289eccbcbc.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) (cherry picked from commit 0c47d4138fd2fe8aa864160e23428b2ef95f16ae)
Diffstat (limited to 'drivers')
-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 4707754..2898e97 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];
@@ -382,8 +386,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;
@@ -477,8 +483,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 47d7417..fdd8024 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);