diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 18:07:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 18:07:19 -0400 |
commit | b4beb4bf9934d151bf4581a54ae028927374cb2a (patch) | |
tree | 28475f62b18784e1d10b05e901799d02c054587f /arch | |
parent | f3c3f0670501fee130f22193369249deea8cc630 (diff) | |
parent | 3945fe9314af718946f71185901c28dd349469c7 (diff) |
Merge branch 'for-linus/i2c-3.2' of git://git.fluff.org/bjdooks/linux
* 'for-linus/i2c-3.2' of git://git.fluff.org/bjdooks/linux: (47 commits)
i2c-s3c2410: Add device tree support
i2c-s3c2410: Keep a copy of platform data and use it
i2c-nomadik: cosmetic coding style corrections
i2c-au1550: dev_pm_ops conversion
i2c-au1550: increase timeout waiting for master done
i2c-au1550: remove unused ack_timeout
i2c-au1550: remove usage of volatile keyword
i2c-tegra: __iomem annotation fix
i2c-eg20t: Add initialize processing in case i2c-error occurs
i2c-eg20t: Fix flag setting issue
i2c-eg20t: add stop sequence in case wait-event timeout occurs
i2c-eg20t: Separate error processing
i2c-eg20t: Fix 10bit access issue
i2c-eg20t: Modify returned value s32 to long
i2c-eg20t: Fix bus-idle waiting issue
i2c-designware: Fix PCI core warning on suspend/resume
i2c-designware: Add runtime power management support
i2c-designware: Add support for Designware core behind PCI devices.
i2c-designware: Push all register reads/writes into the core code.
i2c-designware: Support multiple cores using same ISR
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/i2c.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/i2c.c | 27 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1xxx_psc.h | 13 |
3 files changed, 27 insertions, 17 deletions
diff --git a/arch/arm/plat-mxc/include/mach/i2c.h b/arch/arm/plat-mxc/include/mach/i2c.h index 4a5dc5c6d8e8..375cdd0cf876 100644 --- a/arch/arm/plat-mxc/include/mach/i2c.h +++ b/arch/arm/plat-mxc/include/mach/i2c.h | |||
@@ -11,14 +11,10 @@ | |||
11 | 11 | ||
12 | /** | 12 | /** |
13 | * struct imxi2c_platform_data - structure of platform data for MXC I2C driver | 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 | 14 | * @bitrate: Bus speed measured in Hz |
17 | * | 15 | * |
18 | **/ | 16 | **/ |
19 | struct imxi2c_platform_data { | 17 | struct imxi2c_platform_data { |
20 | int (*init)(struct device *dev); | ||
21 | void (*exit)(struct device *dev); | ||
22 | int bitrate; | 18 | int bitrate; |
23 | }; | 19 | }; |
24 | 20 | ||
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 3341ca4703e9..2388b8eebaaa 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c | |||
@@ -108,6 +108,22 @@ static inline int omap1_i2c_add_bus(int bus_id) | |||
108 | res[1].start = INT_I2C; | 108 | res[1].start = INT_I2C; |
109 | pdata = &i2c_pdata[bus_id - 1]; | 109 | pdata = &i2c_pdata[bus_id - 1]; |
110 | 110 | ||
111 | /* all OMAP1 have IP version 1 register set */ | ||
112 | pdata->rev = OMAP_I2C_IP_VERSION_1; | ||
113 | |||
114 | /* all OMAP1 I2C are implemented like this */ | ||
115 | pdata->flags = OMAP_I2C_FLAG_NO_FIFO | | ||
116 | OMAP_I2C_FLAG_SIMPLE_CLOCK | | ||
117 | OMAP_I2C_FLAG_16BIT_DATA_REG | | ||
118 | OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK; | ||
119 | |||
120 | /* how the cpu bus is wired up differs for 7xx only */ | ||
121 | |||
122 | if (cpu_is_omap7xx()) | ||
123 | pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_1; | ||
124 | else | ||
125 | pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2; | ||
126 | |||
111 | return platform_device_register(pdev); | 127 | return platform_device_register(pdev); |
112 | } | 128 | } |
113 | 129 | ||
@@ -138,6 +154,7 @@ static inline int omap2_i2c_add_bus(int bus_id) | |||
138 | struct omap_device *od; | 154 | struct omap_device *od; |
139 | char oh_name[MAX_OMAP_I2C_HWMOD_NAME_LEN]; | 155 | char oh_name[MAX_OMAP_I2C_HWMOD_NAME_LEN]; |
140 | struct omap_i2c_bus_platform_data *pdata; | 156 | struct omap_i2c_bus_platform_data *pdata; |
157 | struct omap_i2c_dev_attr *dev_attr; | ||
141 | 158 | ||
142 | omap2_i2c_mux_pins(bus_id); | 159 | omap2_i2c_mux_pins(bus_id); |
143 | 160 | ||
@@ -152,6 +169,16 @@ static inline int omap2_i2c_add_bus(int bus_id) | |||
152 | 169 | ||
153 | pdata = &i2c_pdata[bus_id - 1]; | 170 | pdata = &i2c_pdata[bus_id - 1]; |
154 | /* | 171 | /* |
172 | * pass the hwmod class's CPU-specific knowledge of I2C IP revision in | ||
173 | * use, and functionality implementation flags, up to the OMAP I2C | ||
174 | * driver via platform data | ||
175 | */ | ||
176 | pdata->rev = oh->class->rev; | ||
177 | |||
178 | dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr; | ||
179 | pdata->flags = dev_attr->flags; | ||
180 | |||
181 | /* | ||
155 | * When waiting for completion of a i2c transfer, we need to | 182 | * When waiting for completion of a i2c transfer, we need to |
156 | * set a wake up latency constraint for the MPU. This is to | 183 | * set a wake up latency constraint for the MPU. This is to |
157 | * ensure quick enough wakeup from idle, when transfer | 184 | * ensure quick enough wakeup from idle, when transfer |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h b/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h index 892b7f168eb4..5a5cb7386427 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h | |||
@@ -394,19 +394,6 @@ typedef struct psc_spi { | |||
394 | #define PSC_SPITXRX_LC (1 << 29) | 394 | #define PSC_SPITXRX_LC (1 << 29) |
395 | #define PSC_SPITXRX_SR (1 << 28) | 395 | #define PSC_SPITXRX_SR (1 << 28) |
396 | 396 | ||
397 | /* PSC in SMBus (I2C) Mode. */ | ||
398 | typedef struct psc_smb { | ||
399 | u32 psc_sel; | ||
400 | u32 psc_ctrl; | ||
401 | u32 psc_smbcfg; | ||
402 | u32 psc_smbmsk; | ||
403 | u32 psc_smbpcr; | ||
404 | u32 psc_smbstat; | ||
405 | u32 psc_smbevnt; | ||
406 | u32 psc_smbtxrx; | ||
407 | u32 psc_smbtmr; | ||
408 | } psc_smb_t; | ||
409 | |||
410 | /* SMBus Config Register. */ | 397 | /* SMBus Config Register. */ |
411 | #define PSC_SMBCFG_RT_MASK (3 << 30) | 398 | #define PSC_SMBCFG_RT_MASK (3 << 30) |
412 | #define PSC_SMBCFG_RT_FIFO1 (0 << 30) | 399 | #define PSC_SMBCFG_RT_FIFO1 (0 << 30) |