From 3df619ec2cae3305c20b808c4d49cfed66c1cf9b Mon Sep 17 00:00:00 2001 From: Lei Wen <[leiwen@marvell.com]> Date: Wed, 13 Apr 2011 23:48:31 +0530 Subject: mv_i2c: use structure to replace the direclty define Add i2c_clk_enable in the cpu specific code, since previous platform it, while new platform don't need. In the pantheon and armada100 platform, this function is defined as NULL one. Acked-by: Heiko Schocher Acked-by: Prafulla Wadaskar Signed-off-by: Lei Wen --- arch/arm/cpu/pxa/cpu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/cpu/pxa') diff --git a/arch/arm/cpu/pxa/cpu.c b/arch/arm/cpu/pxa/cpu.c index 7d49cbb4fd..9970a4b45b 100644 --- a/arch/arm/cpu/pxa/cpu.c +++ b/arch/arm/cpu/pxa/cpu.c @@ -318,3 +318,13 @@ int arch_cpu_init(void) pxa_clock_setup(); return 0; } + +void i2c_clk_enable(void) +{ + /* set the global I2C clock on */ +#ifdef CONFIG_CPU_MONAHANS + writel(readl(CKENB) | (CKENB_4_I2C), CKENB); +#else + writel(readl(CKEN) | CKEN14_I2C, CKEN); +#endif +} -- cgit v1.2.3