diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2015-04-28 14:20:44 +0800 |
---|---|---|
committer | Peng Fan <Peng.Fan@freescale.com> | 2015-05-07 10:37:24 +0800 |
commit | 3e40c7466ae7d1d6ca74011bfe69ae059d412a3b (patch) | |
tree | 3a7652a293f0127be030de1c7fcc7ac3b0856d19 /drivers/video/ipu_common.c | |
parent | 90bb670a129723c77bc3dbfe60fc81d0a8d3b625 (diff) | |
download | u-boot-imx-3e40c7466ae7d1d6ca74011bfe69ae059d412a3b.zip u-boot-imx-3e40c7466ae7d1d6ca74011bfe69ae059d412a3b.tar.gz u-boot-imx-3e40c7466ae7d1d6ca74011bfe69ae059d412a3b.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 c0dc175a9780505ec8939bda5dda9c2ec549a7f0)
Diffstat (limited to 'drivers/video/ipu_common.c')
-rw-r--r-- | drivers/video/ipu_common.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c index d22b963..a3dc695 100644 --- a/drivers/video/ipu_common.c +++ b/drivers/video/ipu_common.c @@ -6,7 +6,7 @@ * * Linux IPU driver for MX51: * - * (C) Copyright 2005-2014 Freescale Semiconductor, Inc. + * (C) Copyright 2005-2015 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -211,15 +211,19 @@ static struct clk ipu_clk = { .usecount = 0, }; +#if defined(CONFIG_MX6) || defined(CONFIG_MX53) static struct clk ldb_clk = { .name = "ldb_clk", .rate = 65000000, .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]; @@ -372,8 +376,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; @@ -467,8 +473,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); |