aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-11-20 12:46:07 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-02-12 17:32:39 +0000
commit6fff3da998ac3cc9ed8a84bf4f19911bd63c8c32 (patch)
tree97c80144615bbc9ff8c4baee20feb1cf2af20fef /arch/arm
parentebdbbf2003ae2342147c87c2a6c6ed8984b9cede (diff)
downloadkernel_samsung_tuna-6fff3da998ac3cc9ed8a84bf4f19911bd63c8c32.zip
kernel_samsung_tuna-6fff3da998ac3cc9ed8a84bf4f19911bd63c8c32.tar.gz
kernel_samsung_tuna-6fff3da998ac3cc9ed8a84bf4f19911bd63c8c32.tar.bz2
ARM: PNX4008: get i2c clock rate from clk API
Acked-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pnx4008/clock.c9
-rw-r--r--arch/arm/mach-pnx4008/i2c.c9
2 files changed, 6 insertions, 12 deletions
diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c
index 692625c..9d1975f 100644
--- a/arch/arm/mach-pnx4008/clock.c
+++ b/arch/arm/mach-pnx4008/clock.c
@@ -638,9 +638,10 @@ static struct clk flash_ck = {
static struct clk i2c0_ck = {
.name = "i2c0_ck",
.parent = &per_ck,
- .flags = NEEDS_INITIALIZATION,
+ .flags = NEEDS_INITIALIZATION | FIXED_RATE,
.enable_shift = 0,
.enable_reg = I2CCLKCTRL_REG,
+ .rate = 13000000,
.enable = clk_reg_enable,
.disable = clk_reg_disable,
};
@@ -648,9 +649,10 @@ static struct clk i2c0_ck = {
static struct clk i2c1_ck = {
.name = "i2c1_ck",
.parent = &per_ck,
- .flags = NEEDS_INITIALIZATION,
+ .flags = NEEDS_INITIALIZATION | FIXED_RATE,
.enable_shift = 1,
.enable_reg = I2CCLKCTRL_REG,
+ .rate = 13000000,
.enable = clk_reg_enable,
.disable = clk_reg_disable,
};
@@ -658,9 +660,10 @@ static struct clk i2c1_ck = {
static struct clk i2c2_ck = {
.name = "i2c2_ck",
.parent = &per_ck,
- .flags = NEEDS_INITIALIZATION,
+ .flags = NEEDS_INITIALIZATION | FIXED_RATE,
.enable_shift = 2,
.enable_reg = USB_OTG_CLKCTRL_REG,
+ .rate = 13000000,
.enable = clk_reg_enable,
.disable = clk_reg_disable,
};
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c
index 14b4906..23ec335 100644
--- a/arch/arm/mach-pnx4008/i2c.c
+++ b/arch/arm/mach-pnx4008/i2c.c
@@ -18,12 +18,6 @@
#include <mach/irqs.h>
#include <mach/i2c.h>
-static u32 calculate_input_freq(struct platform_device *pdev)
-{
- return HCLK_MHZ;
-}
-
-
static struct i2c_pnx_algo_data pnx_algo_data0 = {
.base = PNX4008_I2C1_BASE,
.irq = I2C_1_INT,
@@ -54,17 +48,14 @@ static struct i2c_adapter pnx_adapter2 = {
};
static struct i2c_pnx_data i2c0_data = {
- .calculate_input_freq = calculate_input_freq,
.adapter = &pnx_adapter0,
};
static struct i2c_pnx_data i2c1_data = {
- .calculate_input_freq = calculate_input_freq,
.adapter = &pnx_adapter1,
};
static struct i2c_pnx_data i2c2_data = {
- .calculate_input_freq = calculate_input_freq,
.adapter = &pnx_adapter2,
};