diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-n30.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-jive.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/i2c.h | 25 | ||||
-rw-r--r-- | arch/arm/plat-s3c/dev-i2c0.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-s3c/dev-i2c1.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/iic.h | 33 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/socrates.dts | 8 |
8 files changed, 57 insertions, 32 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 = { | |||
409 | static struct s3c2410_platform_i2c __initdata bast_i2c_info = { | 409 | static 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 = { | |||
340 | static struct s3c2410_platform_i2c n30_i2ccfg = { | 340 | static 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 |
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 72c266aee141..332bd3263eaf 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -453,8 +453,7 @@ static struct spi_board_info __initdata jive_spi_devs[] = { | |||
453 | /* I2C bus and device configuration. */ | 453 | /* I2C bus and device configuration. */ |
454 | 454 | ||
455 | static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = { | 455 | static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = { |
456 | .max_freq = 80 * 1000, | 456 | .frequency = 80 * 1000, |
457 | .bus_freq = 50 * 1000, | ||
458 | .flags = S3C_IICFLG_FILTER, | 457 | .flags = S3C_IICFLG_FILTER, |
459 | .sda_delay = 2, | 458 | .sda_delay = 2, |
460 | }; | 459 | }; |
diff --git a/arch/arm/plat-mxc/include/mach/i2c.h b/arch/arm/plat-mxc/include/mach/i2c.h new file mode 100644 index 000000000000..4a5dc5c6d8e8 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/i2c.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * i2c.h - i.MX I2C driver header file | ||
3 | * | ||
4 | * Copyright (c) 2008, Darius Augulis <augulis.darius@gmail.com> | ||
5 | * | ||
6 | * This file is released under the GPLv2 | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_I2C_H_ | ||
10 | #define __ASM_ARCH_I2C_H_ | ||
11 | |||
12 | /** | ||
13 | * struct imxi2c_platform_data - structure of platform data for MXC I2C driver | ||
14 | * @init: Initialise gpio's and other board specific things | ||
15 | * @exit: Free everything initialised by @init | ||
16 | * @bitrate: Bus speed measured in Hz | ||
17 | * | ||
18 | **/ | ||
19 | struct imxi2c_platform_data { | ||
20 | int (*init)(struct device *dev); | ||
21 | void (*exit)(struct device *dev); | ||
22 | int bitrate; | ||
23 | }; | ||
24 | |||
25 | #endif /* __ASM_ARCH_I2C_H_ */ | ||
diff --git a/arch/arm/plat-s3c/dev-i2c0.c b/arch/arm/plat-s3c/dev-i2c0.c index fe327074037e..428372868fbb 100644 --- a/arch/arm/plat-s3c/dev-i2c0.c +++ b/arch/arm/plat-s3c/dev-i2c0.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-i2c0.c | 1 | /* linux/arch/arm/plat-s3c/dev-i2c0.c |
2 | * | 2 | * |
3 | * Copyright 2008 Simtec Electronics | 3 | * Copyright 2008,2009 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 5 | * http://armlinux.simtec.co.uk/ |
6 | * | 6 | * |
@@ -50,9 +50,8 @@ struct platform_device s3c_device_i2c0 = { | |||
50 | static struct s3c2410_platform_i2c default_i2c_data0 __initdata = { | 50 | static struct s3c2410_platform_i2c default_i2c_data0 __initdata = { |
51 | .flags = 0, | 51 | .flags = 0, |
52 | .slave_addr = 0x10, | 52 | .slave_addr = 0x10, |
53 | .bus_freq = 100*1000, | 53 | .frequency = 100*1000, |
54 | .max_freq = 400*1000, | 54 | .sda_delay = 100, |
55 | .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON, | ||
56 | }; | 55 | }; |
57 | 56 | ||
58 | void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) | 57 | void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) |
diff --git a/arch/arm/plat-s3c/dev-i2c1.c b/arch/arm/plat-s3c/dev-i2c1.c index 2387fbf57af6..8349c462788c 100644 --- a/arch/arm/plat-s3c/dev-i2c1.c +++ b/arch/arm/plat-s3c/dev-i2c1.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-i2c1.c | 1 | /* linux/arch/arm/plat-s3c/dev-i2c1.c |
2 | * | 2 | * |
3 | * Copyright 2008 Simtec Electronics | 3 | * Copyright 2008,2009 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 5 | * http://armlinux.simtec.co.uk/ |
6 | * | 6 | * |
@@ -47,9 +47,8 @@ static struct s3c2410_platform_i2c default_i2c_data1 __initdata = { | |||
47 | .flags = 0, | 47 | .flags = 0, |
48 | .bus_num = 1, | 48 | .bus_num = 1, |
49 | .slave_addr = 0x10, | 49 | .slave_addr = 0x10, |
50 | .bus_freq = 100*1000, | 50 | .frequency = 100*1000, |
51 | .max_freq = 400*1000, | 51 | .sda_delay = 100, |
52 | .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON, | ||
53 | }; | 52 | }; |
54 | 53 | ||
55 | void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) | 54 | void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) |
diff --git a/arch/arm/plat-s3c/include/plat/iic.h b/arch/arm/plat-s3c/include/plat/iic.h index dc1dfcb9bc6c..67450f115748 100644 --- a/arch/arm/plat-s3c/include/plat/iic.h +++ b/arch/arm/plat-s3c/include/plat/iic.h | |||
@@ -1,9 +1,9 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/iic.h | 1 | /* arch/arm/plat-s3c/include/plat/iic.h |
2 | * | 2 | * |
3 | * Copyright (c) 2004 Simtec Electronics | 3 | * Copyright 2004,2009 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
5 | * | 5 | * |
6 | * S3C2410 - I2C Controller platfrom_device info | 6 | * S3C - I2C Controller platform_device info |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -15,19 +15,24 @@ | |||
15 | 15 | ||
16 | #define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */ | 16 | #define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */ |
17 | 17 | ||
18 | /* Notes: | 18 | /** |
19 | * 1) All frequencies are expressed in Hz | 19 | * struct s3c2410_platform_i2c - Platform data for s3c I2C. |
20 | * 2) A value of zero is `do not care` | 20 | * @bus_num: The bus number to use (if possible). |
21 | */ | 21 | * @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER). |
22 | 22 | * @slave_addr: The I2C address for the slave device (if enabled). | |
23 | * @frequency: The desired frequency in Hz of the bus. This is | ||
24 | * guaranteed to not be exceeded. If the caller does | ||
25 | * not care, use zero and the driver will select a | ||
26 | * useful default. | ||
27 | * @sda_delay: The delay (in ns) applied to SDA edges. | ||
28 | * @cfg_gpio: A callback to configure the pins for I2C operation. | ||
29 | */ | ||
23 | struct s3c2410_platform_i2c { | 30 | struct s3c2410_platform_i2c { |
24 | int bus_num; /* bus number to use */ | 31 | int bus_num; |
25 | unsigned int flags; | 32 | unsigned int flags; |
26 | unsigned int slave_addr; /* slave address for controller */ | 33 | unsigned int slave_addr; |
27 | unsigned long bus_freq; /* standard bus frequency */ | 34 | unsigned long frequency; |
28 | unsigned long max_freq; /* max frequency for the bus */ | 35 | unsigned int sda_delay; |
29 | unsigned long min_freq; /* min frequency for the bus */ | ||
30 | unsigned int sda_delay; /* pclks (s3c2440 only) */ | ||
31 | 36 | ||
32 | void (*cfg_gpio)(struct platform_device *dev); | 37 | void (*cfg_gpio)(struct platform_device *dev); |
33 | }; | 38 | }; |
diff --git a/arch/powerpc/boot/dts/socrates.dts b/arch/powerpc/boot/dts/socrates.dts index 04c398862e03..7a6ae75a1e57 100644 --- a/arch/powerpc/boot/dts/socrates.dts +++ b/arch/powerpc/boot/dts/socrates.dts | |||
@@ -79,11 +79,11 @@ | |||
79 | #address-cells = <1>; | 79 | #address-cells = <1>; |
80 | #size-cells = <0>; | 80 | #size-cells = <0>; |
81 | cell-index = <0>; | 81 | cell-index = <0>; |
82 | compatible = "fsl-i2c"; | 82 | compatible = "fsl,mpc8544-i2c", "fsl-i2c"; |
83 | reg = <0x3000 0x100>; | 83 | reg = <0x3000 0x100>; |
84 | interrupts = <43 2>; | 84 | interrupts = <43 2>; |
85 | interrupt-parent = <&mpic>; | 85 | interrupt-parent = <&mpic>; |
86 | dfsrr; | 86 | fsl,preserve-clocking; |
87 | 87 | ||
88 | dtt@28 { | 88 | dtt@28 { |
89 | compatible = "winbond,w83782d"; | 89 | compatible = "winbond,w83782d"; |
@@ -111,11 +111,11 @@ | |||
111 | #address-cells = <1>; | 111 | #address-cells = <1>; |
112 | #size-cells = <0>; | 112 | #size-cells = <0>; |
113 | cell-index = <1>; | 113 | cell-index = <1>; |
114 | compatible = "fsl-i2c"; | 114 | compatible = "fsl,mpc8544-i2c", "fsl-i2c"; |
115 | reg = <0x3100 0x100>; | 115 | reg = <0x3100 0x100>; |
116 | interrupts = <43 2>; | 116 | interrupts = <43 2>; |
117 | interrupt-parent = <&mpic>; | 117 | interrupt-parent = <&mpic>; |
118 | dfsrr; | 118 | fsl,preserve-clocking; |
119 | }; | 119 | }; |
120 | 120 | ||
121 | enet0: ethernet@24000 { | 121 | enet0: ethernet@24000 { |