From eec567a67e00d1ed8d941e9098b7d421f4091abf Mon Sep 17 00:00:00 2001 From: TsiChung Liew Date: Tue, 19 Aug 2008 03:01:19 +0600 Subject: ColdFire: I2C fix for multiple platforms Signed-off-by: TsiChung Liew --- cpu/mcf523x/cpu_init.c | 4 ++-- cpu/mcf523x/speed.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'cpu/mcf523x') diff --git a/cpu/mcf523x/cpu_init.c b/cpu/mcf523x/cpu_init.c index 55c9cd356d..8ab5b8ed8b 100644 --- a/cpu/mcf523x/cpu_init.c +++ b/cpu/mcf523x/cpu_init.c @@ -110,8 +110,8 @@ void cpu_init_f(void) #endif #ifdef CONFIG_FSL_I2C - gpio->par_feci2c &= ~(GPIO_PAR_FECI2C_SCL_MASK | GPIO_PAR_FECI2C_SDA_MASK); - gpio->par_feci2c |= (GPIO_PAR_FECI2C_SCL_I2CSCL | GPIO_PAR_FECI2C_SDA_I2CSDA); + CFG_I2C_PINMUX_REG &= CFG_I2C_PINMUX_CLR; + CFG_I2C_PINMUX_REG |= CFG_I2C_PINMUX_SET; #endif icache_enable(); diff --git a/cpu/mcf523x/speed.c b/cpu/mcf523x/speed.c index 247d3188bb..1bda2d482e 100644 --- a/cpu/mcf523x/speed.c +++ b/cpu/mcf523x/speed.c @@ -45,5 +45,9 @@ int get_clocks(void) gd->bus_clk = CFG_CLK; gd->cpu_clk = (gd->bus_clk * 2); +#ifdef CONFIG_FSL_I2C + gd->i2c1_clk = gd->bus_clk; +#endif + return (0); } -- cgit v1.2.3