aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@simtec.co.uk>2009-03-13 09:53:46 -0400
committerBen Dooks <ben-linux@fluff.org>2009-04-07 05:18:33 -0400
commitc564e6ae6c5aa6e3995ff87ed4a32b4788ad5109 (patch)
treeb773106104d9897d945709d3bff8a56ff6586da8 /arch/arm/mach-s3c2410
parenta192f7153bb33151f83440cd9c0442233a064bf1 (diff)
i2c-s3c2410: Simplify bus frequency calculation
The platform data for the i2c-s3c2410 driver used to allow a min, max and desired frequency for the I2C bus. This patch reduces it to simply a desired frequency ceiling and corrects all the uses of the platform data appropriately. This means, for example, that on a system with a 66MHz fclk, a request for 100KHz will achieve 65KHz which is safe and acceptable, rather than 378KHz which it would have achieved without this change. Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk> [ben-linux@fluff.org: tidy subject and description] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 01bd76725b92..4389c160f7d0 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -409,8 +409,7 @@ static struct platform_device bast_sio = {
409static struct s3c2410_platform_i2c __initdata bast_i2c_info = { 409static struct s3c2410_platform_i2c __initdata bast_i2c_info = {
410 .flags = 0, 410 .flags = 0,
411 .slave_addr = 0x10, 411 .slave_addr = 0x10,
412 .bus_freq = 100*1000, 412 .frequency = 100*1000,
413 .max_freq = 130*1000,
414}; 413};
415 414
416/* Asix AX88796 10/100 ethernet controller */ 415/* Asix AX88796 10/100 ethernet controller */
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 05a5e877b49b..2b83f8707710 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -340,8 +340,7 @@ static struct platform_device *n35_devices[] __initdata = {
340static struct s3c2410_platform_i2c n30_i2ccfg = { 340static struct s3c2410_platform_i2c n30_i2ccfg = {
341 .flags = 0, 341 .flags = 0,
342 .slave_addr = 0x10, 342 .slave_addr = 0x10,
343 .bus_freq = 10*1000, 343 .frequency = 10*1000,
344 .max_freq = 10*1000,
345}; 344};
346 345
347/* Lots of hardcoded stuff, but it sets up the hardware in a useful 346/* Lots of hardcoded stuff, but it sets up the hardware in a useful