提交 30032710 编写于 作者: S Stefano Babic 提交者: Wolfgang Denk

I2C: mxc: fix compilation for MX31

Signed-off-by: NStefano Babic <sbabic@denx.de>
CC: Heiko Schocher <hs@denx.de>
Acked-by: NHeiko Schocher <hs@denx.de>
上级 67f463b0
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册