Patchwork [U-Boot,RESEND] mx27: add i2c clock

login
register
mail settings
Submitter trem
Date June 14, 2013, 4:21 p.m.
Message ID <1371226882-12727-2-git-send-email-tremyfr@yahoo.fr>
Download mbox | patch
Permalink /patch/251453/
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Comments

trem - June 14, 2013, 4:21 p.m.
Signed-off-by: Eric Jarrige <eric.jarrige@armadeus.org>
Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
---
 arch/arm/cpu/arm926ejs/mx27/generic.c  |    2 ++
 arch/arm/include/asm/arch-mx27/clock.h |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
Stefano Babic - June 26, 2013, 3:03 p.m.
On 14/06/2013 18:21, Philippe Reynes wrote:
> Signed-off-by: Eric Jarrige <eric.jarrige@armadeus.org>
> Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
> ---


Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Patch

diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c b/arch/arm/cpu/arm926ejs/mx27/generic.c
index bffbadd..a9a13cb 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -159,6 +159,8 @@  unsigned int mxc_get_clock(enum mxc_clock clk)
 	switch (clk) {
 	case MXC_ARM_CLK:
 		return imx_get_armclk();
+	case MXC_I2C_CLK:
+		return imx_get_ahbclk()/2;
 	case MXC_UART_CLK:
 		return imx_get_perclk1();
 	case MXC_FEC_CLK:
diff --git a/arch/arm/include/asm/arch-mx27/clock.h b/arch/arm/include/asm/arch-mx27/clock.h
index fd062d3..2b03a41 100644
--- a/arch/arm/include/asm/arch-mx27/clock.h
+++ b/arch/arm/include/asm/arch-mx27/clock.h
@@ -26,6 +26,7 @@ 
 
 enum mxc_clock {
 	MXC_ARM_CLK,
+	MXC_I2C_CLK,
 	MXC_UART_CLK,
 	MXC_ESDHC_CLK,
 	MXC_FEC_CLK,