I2C: mxc: fix compilation for MX31
authorStefano Babic <sbabic@denx.de>
Tue, 30 Aug 2011 00:51:14 +0000 (00:51 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 7 Sep 2011 20:11:47 +0000 (22:11 +0200)
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
drivers/i2c/mxc_i2c.c

index 89d1973bf5e7ab3e55c58f4d18a5c12760062587..ebde3c5ab253ca9fdb52f7ed0fa6652d3c2c5524 100644 (file)
@@ -89,14 +89,11 @@ void i2c_init(int speed, int unused)
 #if defined(CONFIG_MX31)
        struct clock_control_regs *sc_regs =
                (struct clock_control_regs *)CCM_BASE;
-
-       freq = mx31_get_ipg_clk();
        /* start the required I2C clock */
        writel(readl(&sc_regs->cgr0) | (3 << I2C_CLK_OFFSET),
                &sc_regs->cgr0);
-#else
-       freq = mxc_get_clock(MXC_IPG_PERCLK);
 #endif
+       freq = mxc_get_clock(MXC_IPG_PERCLK);
 
        for (i = 0; i < 0x1f; i++)
                if (freq / div[i] <= speed)