ipu_common: Let clk_ipu_enable/disable only run on MX51 and MX53
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 31 May 2012 07:23:58 +0000 (07:23 +0000)
committerAnatolij Gustschin <agust@denx.de>
Tue, 10 Jul 2012 09:35:39 +0000 (11:35 +0200)
The registers accessed inside clk_ipu_enable/disable are not present on MX6,
so make sure they only run on MX51 and MX53.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
drivers/video/ipu_common.c

index 4caad4f12c9df6ef90d8e5abe23c187a6424e9c9..7ef8742d2bb7a7639df5cfa0a57ebbc52443c5a5 100644 (file)
@@ -163,6 +163,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
 
 static int clk_ipu_enable(struct clk *clk)
 {
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53)
        u32 reg;
 
        reg = __raw_readl(clk->enable_reg);
@@ -178,12 +179,13 @@ static int clk_ipu_enable(struct clk *clk)
        reg = __raw_readl(&mxc_ccm->clpcr);
        reg &= ~MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS;
        __raw_writel(reg, &mxc_ccm->clpcr);
-
+#endif
        return 0;
 }
 
 static void clk_ipu_disable(struct clk *clk)
 {
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53)
        u32 reg;
 
        reg = __raw_readl(clk->enable_reg);
@@ -202,6 +204,7 @@ static void clk_ipu_disable(struct clk *clk)
        reg = __raw_readl(&mxc_ccm->clpcr);
        reg |= MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS;
        __raw_writel(reg, &mxc_ccm->clpcr);
+#endif
 }