summaryrefslogtreecommitdiff
path: root/drivers/video/ipu_common.c
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2012-05-31 07:24:02 +0000
committerAnatolij Gustschin <agust@denx.de>2012-07-10 11:35:39 +0200
commitcf65d478ab4e0bb0247c374e6b0b40ef77eddbe8 (patch)
treeb92165b15e55f1d0c1d831a97cef97666881e8de /drivers/video/ipu_common.c
parent9fbdb1aac5583197270c5d1a7634b7f93b34a654 (diff)
downloadu-boot-imx-cf65d478ab4e0bb0247c374e6b0b40ef77eddbe8.zip
u-boot-imx-cf65d478ab4e0bb0247c374e6b0b40ef77eddbe8.tar.gz
u-boot-imx-cf65d478ab4e0bb0247c374e6b0b40ef77eddbe8.tar.bz2
ipu_common: Add ldb_clk for use in parenting the pixel clock
Add ldb_clk for use in parenting the pixel clock. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Diffstat (limited to 'drivers/video/ipu_common.c')
-rw-r--r--drivers/video/ipu_common.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index e43a6ec..2020da9 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -219,8 +219,15 @@ static struct clk ipu_clk = {
.usecount = 0,
};
+static struct clk ldb_clk = {
+ .name = "ldb_clk",
+ .rate = 65000000,
+ .usecount = 0,
+};
+
/* Globals */
struct clk *g_ipu_clk;
+struct clk *g_ldb_clk;
unsigned char g_ipu_clk_enabled;
struct clk *g_di_clk[2];
struct clk *g_pixel_clk[2];
@@ -343,7 +350,7 @@ 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;
- else if (!IS_ERR(g_di_clk[clk->id]) && parent == g_di_clk[clk->id])
+ else if (!IS_ERR(g_di_clk[clk->id]) && parent == g_ldb_clk)
di_gen |= DI_GEN_DI_CLK_EXT;
else
return -EINVAL;
@@ -429,7 +436,8 @@ int ipu_probe(void)
g_ipu_clk = &ipu_clk;
debug("ipu_clk = %u\n", clk_get_rate(g_ipu_clk));
-
+ g_ldb_clk = &ldb_clk;
+ debug("ldb_clk = %u\n", clk_get_rate(g_ldb_clk));
ipu_reset();
clk_set_parent(g_pixel_clk[0], g_ipu_clk);