diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-28 16:43:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-28 16:43:12 -0400 |
commit | a410963ba4c0c768302f0298e258b1ee940e8316 (patch) | |
tree | f262f101a5bf752ce14775da080aed5fbaf73f0e /arch | |
parent | f7da9cdf45cbbad5029d4858dcbc0134e06084ed (diff) | |
parent | 5db20c49e2d6581797c17057e068d89d6677aa24 (diff) |
Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux
Pull embedded i2c changes from Wolfram Sang:
"Changes for the "embedded" part of the I2C subsystem:
- lots of devicetree conversions of drivers (and preparations for
that)
- big cleanups for drivers for OMAP, Tegra, Nomadik, Blackfin
- Rafael's struct dev_pm_ops conversion patches for I2C
- usual driver cleanups and fixes
All patches have been in linux-next for an apropriate time and all
patches touching files outside of i2c-folders should have proper acks
from the maintainers."
* 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux: (60 commits)
Revert "i2c: tegra: convert normal suspend/resume to *_noirq"
I2C: MV64XYZ: Add Device Tree support
i2c: stu300: use devm managed resources
i2c: i2c-ocores: support for 16bit and 32bit IO
V4L/DVB: mfd: use reg_shift instead of regstep
i2c: i2c-ocores: Use reg-shift property
i2c: i2c-ocores: DT bindings and minor fixes.
i2c: mv64xxxx: remove EXPERIMENTAL tag
i2c-s3c2410: Use plain pm_runtime_put()
i2c: s3c2410: Fix pointer type passed to of_match_node()
i2c: mxs: Set I2C timing registers for mxs-i2c
i2c: i2c-bfin-twi: Move blackfin TWI register access Macro to head file.
i2c: i2c-bfin-twi: Move TWI peripheral pin request array to platform data.
i2c:i2c-bfin-twi: include twi head file
i2c:i2c-bfin-twi: TWI fails to restart next transfer in high system load.
i2c: i2c-bfin-twi: Tighten condition when failing I2C transfer if MEN bit is reset unexpectedly.
i2c: i2c-bfin-twi: Break dead waiting loop if i2c device misbehaves.
i2c: i2c-bfin-twi: Improve the patch for bug "Illegal i2c bus lock upon certain transfer scenarios".
i2c: i2c-bfin-twi: Illegal i2c bus lock upon certain transfer scenarios.
i2c-mv64xxxx: allow more than one driver instance
...
Conflicts:
drivers/i2c/busses/i2c-nomadik.c
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/dts/imx28.dtsi | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/devices-common.h | 24 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/i2c.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-nomadik/include/plat/i2c.h | 39 |
5 files changed, 10 insertions, 59 deletions
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 915db89e3644..787efac68da8 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi | |||
@@ -660,6 +660,7 @@ | |||
660 | compatible = "fsl,imx28-i2c"; | 660 | compatible = "fsl,imx28-i2c"; |
661 | reg = <0x80058000 2000>; | 661 | reg = <0x80058000 2000>; |
662 | interrupts = <111 68>; | 662 | interrupts = <111 68>; |
663 | clock-frequency = <100000>; | ||
663 | status = "disabled"; | 664 | status = "disabled"; |
664 | }; | 665 | }; |
665 | 666 | ||
@@ -669,6 +670,7 @@ | |||
669 | compatible = "fsl,imx28-i2c"; | 670 | compatible = "fsl,imx28-i2c"; |
670 | reg = <0x8005a000 2000>; | 671 | reg = <0x8005a000 2000>; |
671 | interrupts = <110 69>; | 672 | interrupts = <110 69>; |
673 | clock-frequency = <100000>; | ||
672 | status = "disabled"; | 674 | status = "disabled"; |
673 | }; | 675 | }; |
674 | 676 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index a310222951da..8f421c0ca45c 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/platform_data/i2c-nomadik.h> | ||
18 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
19 | #include <linux/amba/bus.h> | 20 | #include <linux/amba/bus.h> |
20 | #include <linux/amba/pl022.h> | 21 | #include <linux/amba/pl022.h> |
@@ -40,7 +41,6 @@ | |||
40 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
41 | #include <asm/hardware/gic.h> | 42 | #include <asm/hardware/gic.h> |
42 | 43 | ||
43 | #include <plat/i2c.h> | ||
44 | #include <plat/ste_dma40.h> | 44 | #include <plat/ste_dma40.h> |
45 | #include <plat/gpio-nomadik.h> | 45 | #include <plat/gpio-nomadik.h> |
46 | 46 | ||
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index 6e4706560266..ecdd8386cffb 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
13 | #include <linux/sys_soc.h> | 13 | #include <linux/sys_soc.h> |
14 | #include <linux/amba/bus.h> | 14 | #include <linux/amba/bus.h> |
15 | #include <plat/i2c.h> | 15 | #include <linux/platform_data/i2c-nomadik.h> |
16 | #include <mach/crypto-ux500.h> | 16 | #include <mach/crypto-ux500.h> |
17 | 17 | ||
18 | struct spi_master_cntlr; | 18 | struct spi_master_cntlr; |
@@ -56,27 +56,15 @@ dbx500_add_uart(struct device *parent, const char *name, resource_size_t base, | |||
56 | 56 | ||
57 | struct nmk_i2c_controller; | 57 | struct nmk_i2c_controller; |
58 | 58 | ||
59 | static inline struct platform_device * | 59 | static inline struct amba_device * |
60 | dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq, | 60 | dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq, |
61 | struct nmk_i2c_controller *data) | 61 | struct nmk_i2c_controller *data) |
62 | { | 62 | { |
63 | struct resource res[] = { | 63 | /* Conjure a name similar to what the platform device used to have */ |
64 | DEFINE_RES_MEM(base, SZ_4K), | 64 | char name[16]; |
65 | DEFINE_RES_IRQ(irq), | ||
66 | }; | ||
67 | 65 | ||
68 | struct platform_device_info pdevinfo = { | 66 | snprintf(name, sizeof(name), "nmk-i2c.%d", id); |
69 | .parent = parent, | 67 | return amba_apb_device_add(parent, name, base, SZ_4K, irq, 0, data, 0); |
70 | .name = "nmk-i2c", | ||
71 | .id = id, | ||
72 | .res = res, | ||
73 | .num_res = ARRAY_SIZE(res), | ||
74 | .data = data, | ||
75 | .size_data = sizeof(*data), | ||
76 | .dma_mask = DMA_BIT_MASK(32), | ||
77 | }; | ||
78 | |||
79 | return platform_device_register_full(&pdevinfo); | ||
80 | } | 68 | } |
81 | 69 | ||
82 | static inline struct amba_device * | 70 | static inline struct amba_device * |
diff --git a/arch/arm/plat-mxc/include/mach/i2c.h b/arch/arm/plat-mxc/include/mach/i2c.h index 375cdd0cf876..8289d915e615 100644 --- a/arch/arm/plat-mxc/include/mach/i2c.h +++ b/arch/arm/plat-mxc/include/mach/i2c.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * | 15 | * |
16 | **/ | 16 | **/ |
17 | struct imxi2c_platform_data { | 17 | struct imxi2c_platform_data { |
18 | int bitrate; | 18 | u32 bitrate; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #endif /* __ASM_ARCH_I2C_H_ */ | 21 | #endif /* __ASM_ARCH_I2C_H_ */ |
diff --git a/arch/arm/plat-nomadik/include/plat/i2c.h b/arch/arm/plat-nomadik/include/plat/i2c.h deleted file mode 100644 index 8ba70ffc31ec..000000000000 --- a/arch/arm/plat-nomadik/include/plat/i2c.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 ST-Ericsson | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2, as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef __PLAT_I2C_H | ||
9 | #define __PLAT_I2C_H | ||
10 | |||
11 | enum i2c_freq_mode { | ||
12 | I2C_FREQ_MODE_STANDARD, /* up to 100 Kb/s */ | ||
13 | I2C_FREQ_MODE_FAST, /* up to 400 Kb/s */ | ||
14 | I2C_FREQ_MODE_HIGH_SPEED, /* up to 3.4 Mb/s */ | ||
15 | I2C_FREQ_MODE_FAST_PLUS, /* up to 1 Mb/s */ | ||
16 | }; | ||
17 | |||
18 | /** | ||
19 | * struct nmk_i2c_controller - client specific controller configuration | ||
20 | * @clk_freq: clock frequency for the operation mode | ||
21 | * @slsu: Slave data setup time in ns. | ||
22 | * The needed setup time for three modes of operation | ||
23 | * are 250ns, 100ns and 10ns respectively thus leading | ||
24 | * to the values of 14, 6, 2 for a 48 MHz i2c clk | ||
25 | * @tft: Tx FIFO Threshold in bytes | ||
26 | * @rft: Rx FIFO Threshold in bytes | ||
27 | * @timeout Slave response timeout(ms) | ||
28 | * @sm: speed mode | ||
29 | */ | ||
30 | struct nmk_i2c_controller { | ||
31 | unsigned long clk_freq; | ||
32 | unsigned short slsu; | ||
33 | unsigned char tft; | ||
34 | unsigned char rft; | ||
35 | int timeout; | ||
36 | enum i2c_freq_mode sm; | ||
37 | }; | ||
38 | |||
39 | #endif /* __PLAT_I2C_H */ | ||