From: Eric Jarrige <eric.jarrige@armadeus.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx1: add mx1/l support for mxc_i2c
Date: Mon, 22 Aug 2011 22:56:43 +0200 [thread overview]
Message-ID: <20110822205643.18696.97664.stgit@shuttle2.etheralp.ch> (raw)
Signed-off-by: Eric Jarrige <eric.jarrige@armadeus.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
---
drivers/i2c/mxc_i2c.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 89d1973..597e9ee 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -27,7 +27,9 @@
#if defined(CONFIG_HARD_I2C)
+#ifndef CONFIG_IMX
#include <asm/arch/clock.h>
+#endif
#include <asm/arch/imx-regs.h>
#define IADR 0x00
@@ -63,6 +65,8 @@
#define I2C_BASE I2C2_BASE_ADDR
#elif defined(CONFIG_SYS_I2C_MX35_PORT1)
#define I2C_BASE I2C_BASE_ADDR
+#elif defined(CONFIG_SYS_I2C_MX1_PORT1)
+#define I2C_BASE IMX_I2C_BASE
#else
#error "define CONFIG_SYS_I2C_MX<Processor>_PORTx to use the mx I2C driver"
#endif
@@ -94,6 +98,8 @@ void i2c_init(int speed, int unused)
/* start the required I2C clock */
writel(readl(&sc_regs->cgr0) | (3 << I2C_CLK_OFFSET),
&sc_regs->cgr0);
+#elif defined(CONFIG_IMX)
+ freq = get_HCLK();
#else
freq = mxc_get_clock(MXC_IPG_PERCLK);
#endif
next reply other threads:[~2011-08-22 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 20:56 Eric Jarrige [this message]
2011-09-19 6:53 ` [U-Boot] [PATCH] mx1: add mx1/l support for mxc_i2c Heiko Schocher
2011-09-19 6:57 ` Marek Vasut
2011-09-19 7:26 ` Stefano Babic
2011-09-19 20:34 ` Eric Jarrige
2011-09-19 20:59 ` stefano babic
2011-09-20 20:54 ` Eric Jarrige
2011-09-21 6:11 ` Stefano Babic
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=20110822205643.18696.97664.stgit@shuttle2.etheralp.ch \
--to=eric.jarrige@armadeus.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox