All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] I2C: mxc: fix compilation for MX31
Date: Tue, 30 Aug 2011 12:51:14 +0200	[thread overview]
Message-ID: <1314701474-27854-2-git-send-email-sbabic@denx.de> (raw)
In-Reply-To: <1314701474-27854-1-git-send-email-sbabic@denx.de>

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Heiko Schocher <hs@denx.de>
---
 drivers/i2c/mxc_i2c.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 89d1973..ebde3c5 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -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)
-- 
1.7.1

  reply	other threads:[~2011-08-30 10:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 10:51 [U-Boot] [PATCH 1/2] MX31: fix missing mxc_get_clk() call Stefano Babic
2011-08-30 10:51 ` Stefano Babic [this message]
2011-09-02  5:50   ` [U-Boot] [PATCH 2/2] I2C: mxc: fix compilation for MX31 Heiko Schocher
2011-09-02  6:32     ` Stefano Babic
2011-09-02  6:41       ` Heiko Schocher
2011-09-07 20:11   ` Wolfgang Denk
2011-09-07 20:11 ` [U-Boot] [PATCH 1/2] MX31: fix missing mxc_get_clk() call Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1314701474-27854-2-git-send-email-sbabic@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.