public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx1: add mx1/l support for mxc_i2c
@ 2011-08-22 20:56 Eric Jarrige
  2011-09-19  6:53 ` Heiko Schocher
  2011-09-19  6:57 ` Marek Vasut
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Jarrige @ 2011-08-22 20:56 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-21  6:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 20:56 [U-Boot] [PATCH] mx1: add mx1/l support for mxc_i2c Eric Jarrige
2011-09-19  6:53 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox