aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 19:51:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 19:51:10 -0500
commit752451f01c4567b506bf4343082682dbb8fb30dd (patch)
treeec2ec2989c93e567952ddc1ec879013aa2704f0a /arch
parent673ab8783b596cda5b616b317b1a1b47480c66fd (diff)
parent972deb4f49b5b6703d9c6117ba0aeda2180d4447 (diff)
Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux
Pull i2c-embedded changes from Wolfram Sang: - CBUS driver (an I2C variant) - continued rework of the omap driver - s3c2410 gets lots of fixes and gains pinctrl support - at91 gains DMA support - the GPIO muxer gains devicetree probing - typical fixes and additions all over * 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux: (45 commits) i2c: omap: Remove the OMAP_I2C_FLAG_RESET_REGS_POSTIDLE flag i2c: at91: add dma support i2c: at91: change struct members indentation i2c: at91: fix compilation warning i2c: mxs: Do not disable the I2C SMBus quick mode i2c: mxs: Handle i2c DMA failure properly i2c: s3c2410: Remove recently introduced performance overheads i2c: ocores: Move grlib set/get functions into #ifdef CONFIG_OF block i2c: s3c2410: Add fix for i2c suspend/resume i2c: s3c2410: Fix code to free gpios i2c: i2c-cbus-gpio: introduce driver i2c: ocores: Add support for the GRLIB port of the controller and use function pointers for getreg and setreg functions i2c: ocores: Add irq support for sparc i2c: omap: Move the remove constraint ARM: dts: cfa10049: Add the i2c muxer buses to the CFA-10049 i2c: s3c2410: do not special case HDMIPHY stuck bus detection i2c: s3c2410: use exponential back off while polling for bus idle i2c: s3c2410: do not generate STOP for QUIRK_HDMIPHY i2c: s3c2410: grab adapter lock while changing i2c clock i2c: s3c2410: Add support for pinctrl ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/imx28-cfa10049.dts24
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c42
-rw-r--r--arch/arm/mach-omap2/i2c.c19
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c3
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c3
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c12
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c3
7 files changed, 91 insertions, 15 deletions
diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts
index b222614ac9e0..bdc80a4453dd 100644
--- a/arch/arm/boot/dts/imx28-cfa10049.dts
+++ b/arch/arm/boot/dts/imx28-cfa10049.dts
@@ -92,6 +92,30 @@
92 status = "okay"; 92 status = "okay";
93 }; 93 };
94 94
95 i2cmux {
96 compatible = "i2c-mux-gpio";
97 #address-cells = <1>;
98 #size-cells = <0>;
99 mux-gpios = <&gpio1 22 0 &gpio1 23 0>;
100 i2c-parent = <&i2c1>;
101
102 i2c@0 {
103 reg = <0>;
104 };
105
106 i2c@1 {
107 reg = <1>;
108 };
109
110 i2c@2 {
111 reg = <2>;
112 };
113
114 i2c@3 {
115 reg = <3>;
116 };
117 };
118
95 usbphy1: usbphy@8007e000 { 119 usbphy1: usbphy@8007e000 {
96 status = "okay"; 120 status = "okay";
97 }; 121 };
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index a4e167c55c1d..0abb30fe399c 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -16,10 +16,12 @@
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irq.h>
19#include <linux/stddef.h> 20#include <linux/stddef.h>
20#include <linux/i2c.h> 21#include <linux/i2c.h>
21#include <linux/spi/spi.h> 22#include <linux/spi/spi.h>
22#include <linux/usb/musb.h> 23#include <linux/usb/musb.h>
24#include <linux/platform_data/i2c-cbus-gpio.h>
23#include <linux/platform_data/spi-omap2-mcspi.h> 25#include <linux/platform_data/spi-omap2-mcspi.h>
24#include <linux/platform_data/mtd-onenand-omap2.h> 26#include <linux/platform_data/mtd-onenand-omap2.h>
25#include <linux/mfd/menelaus.h> 27#include <linux/mfd/menelaus.h>
@@ -40,6 +42,45 @@
40#define TUSB6010_GPIO_ENABLE 0 42#define TUSB6010_GPIO_ENABLE 0
41#define TUSB6010_DMACHAN 0x3f 43#define TUSB6010_DMACHAN 0x3f
42 44
45#if defined(CONFIG_I2C_CBUS_GPIO) || defined(CONFIG_I2C_CBUS_GPIO_MODULE)
46static struct i2c_cbus_platform_data n8x0_cbus_data = {
47 .clk_gpio = 66,
48 .dat_gpio = 65,
49 .sel_gpio = 64,
50};
51
52static struct platform_device n8x0_cbus_device = {
53 .name = "i2c-cbus-gpio",
54 .id = 3,
55 .dev = {
56 .platform_data = &n8x0_cbus_data,
57 },
58};
59
60static struct i2c_board_info n8x0_i2c_board_info_3[] __initdata = {
61 {
62 I2C_BOARD_INFO("retu-mfd", 0x01),
63 },
64};
65
66static void __init n8x0_cbus_init(void)
67{
68 const int retu_irq_gpio = 108;
69
70 if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ"))
71 return;
72 irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING);
73 n8x0_i2c_board_info_3[0].irq = gpio_to_irq(retu_irq_gpio);
74 i2c_register_board_info(3, n8x0_i2c_board_info_3,
75 ARRAY_SIZE(n8x0_i2c_board_info_3));
76 platform_device_register(&n8x0_cbus_device);
77}
78#else /* CONFIG_I2C_CBUS_GPIO */
79static void __init n8x0_cbus_init(void)
80{
81}
82#endif /* CONFIG_I2C_CBUS_GPIO */
83
43#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE) 84#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
44/* 85/*
45 * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and 86 * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and
@@ -678,6 +719,7 @@ static void __init n8x0_init_machine(void)
678 gpmc_onenand_init(board_onenand_data); 719 gpmc_onenand_init(board_onenand_data);
679 n8x0_mmc_init(); 720 n8x0_mmc_init();
680 n8x0_usb_init(); 721 n8x0_usb_init();
722 n8x0_cbus_init();
681} 723}
682 724
683MACHINE_START(NOKIA_N800, "Nokia N800") 725MACHINE_START(NOKIA_N800, "Nokia N800")
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index fbb9b152cd5e..df6d6acbc9ed 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -120,6 +120,16 @@ static int __init omap_i2c_nr_ports(void)
120 return ports; 120 return ports;
121} 121}
122 122
123/*
124 * XXX This function is a temporary compatibility wrapper - only
125 * needed until the I2C driver can be converted to call
126 * omap_pm_set_max_dev_wakeup_lat() and handle a return code.
127 */
128static void omap_pm_set_max_mpu_wakeup_lat_compat(struct device *dev, long t)
129{
130 omap_pm_set_max_mpu_wakeup_lat(dev, t);
131}
132
123static const char name[] = "omap_i2c"; 133static const char name[] = "omap_i2c";
124 134
125int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata, 135int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
@@ -157,6 +167,15 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
157 dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr; 167 dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr;
158 pdata->flags = dev_attr->flags; 168 pdata->flags = dev_attr->flags;
159 169
170 /*
171 * When waiting for completion of a i2c transfer, we need to
172 * set a wake up latency constraint for the MPU. This is to
173 * ensure quick enough wakeup from idle, when transfer
174 * completes.
175 * Only omap3 has support for constraints
176 */
177 if (cpu_is_omap34xx())
178 pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat;
160 pdev = omap_device_build(name, bus_id, oh, pdata, 179 pdev = omap_device_build(name, bus_id, oh, pdata,
161 sizeof(struct omap_i2c_bus_platform_data), 180 sizeof(struct omap_i2c_bus_platform_data),
162 NULL, 0, 0); 181 NULL, 0, 0);
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 6c8fa70ddadd..d2d3840557c3 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -77,8 +77,7 @@ static struct omap_hwmod_class i2c_class = {
77 77
78static struct omap_i2c_dev_attr i2c_dev_attr = { 78static struct omap_i2c_dev_attr i2c_dev_attr = {
79 .fifo_depth = 8, /* bytes */ 79 .fifo_depth = 8, /* bytes */
80 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 80 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
81 OMAP_I2C_FLAG_BUS_SHIFT_2 |
82 OMAP_I2C_FLAG_FORCE_19200_INT_CLK, 81 OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
83}; 82};
84 83
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 32820d89f5b4..081c71edddf4 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -1118,8 +1118,7 @@ static struct omap_hwmod_class i2c_class = {
1118}; 1118};
1119 1119
1120static struct omap_i2c_dev_attr i2c_dev_attr = { 1120static struct omap_i2c_dev_attr i2c_dev_attr = {
1121 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE | 1121 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
1122 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
1123}; 1122};
1124 1123
1125/* i2c1 */ 1124/* i2c1 */
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index ec4499e5a4c9..8bb2628df34e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -794,9 +794,7 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
794/* I2C1 */ 794/* I2C1 */
795static struct omap_i2c_dev_attr i2c1_dev_attr = { 795static struct omap_i2c_dev_attr i2c1_dev_attr = {
796 .fifo_depth = 8, /* bytes */ 796 .fifo_depth = 8, /* bytes */
797 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 797 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
798 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
799 OMAP_I2C_FLAG_BUS_SHIFT_2,
800}; 798};
801 799
802static struct omap_hwmod omap3xxx_i2c1_hwmod = { 800static struct omap_hwmod omap3xxx_i2c1_hwmod = {
@@ -821,9 +819,7 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = {
821/* I2C2 */ 819/* I2C2 */
822static struct omap_i2c_dev_attr i2c2_dev_attr = { 820static struct omap_i2c_dev_attr i2c2_dev_attr = {
823 .fifo_depth = 8, /* bytes */ 821 .fifo_depth = 8, /* bytes */
824 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 822 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
825 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
826 OMAP_I2C_FLAG_BUS_SHIFT_2,
827}; 823};
828 824
829static struct omap_hwmod omap3xxx_i2c2_hwmod = { 825static struct omap_hwmod omap3xxx_i2c2_hwmod = {
@@ -848,9 +844,7 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = {
848/* I2C3 */ 844/* I2C3 */
849static struct omap_i2c_dev_attr i2c3_dev_attr = { 845static struct omap_i2c_dev_attr i2c3_dev_attr = {
850 .fifo_depth = 64, /* bytes */ 846 .fifo_depth = 64, /* bytes */
851 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 847 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
852 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
853 OMAP_I2C_FLAG_BUS_SHIFT_2,
854}; 848};
855 849
856static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { 850static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index eb61cfd9452b..272b0178dba6 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -1529,8 +1529,7 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
1529}; 1529};
1530 1530
1531static struct omap_i2c_dev_attr i2c_dev_attr = { 1531static struct omap_i2c_dev_attr i2c_dev_attr = {
1532 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE | 1532 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
1533 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
1534}; 1533};
1535 1534
1536/* i2c1 */ 1535/* i2c1 */