]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-3.0/pm-wip/voltdm/0073-I2C-OMAP2-add-correct-functionality-flags-to-all-oma.patch
linux 3.0: updates
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-3.0 / pm-wip / voltdm / 0073-I2C-OMAP2-add-correct-functionality-flags-to-all-oma.patch
1 From 3d1de2860ea9b5f0cd052c0b4b3a5bc0b3a71c40 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@warmcat.com>
3 Date: Sun, 10 Jul 2011 05:27:16 -0600
4 Subject: [PATCH 073/149] I2C: OMAP2+: add correct functionality flags to all omap2plus i2c dev_attr
6 This adds the new functionality flags for omap i2c unit to all OMAP2
7 hwmod definitions
9 Cc: patches@linaro.org
10 Cc: Ben Dooks <ben-linux@fluff.org>
11 Reported-by: Peter Maydell <peter.maydell@linaro.org>
12 Signed-off-by: Andy Green <andy.green@linaro.org>
13 Signed-off-by: Tony Lindgren <tony@atomide.com>
14 Signed-off-by: Kevin Hilman <khilman@ti.com>
15 Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 ---
17  arch/arm/mach-omap2/omap_hwmod_2420_data.c |    7 ++++++-
18  arch/arm/mach-omap2/omap_hwmod_2430_data.c |    3 +++
19  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    9 +++++++++
20  arch/arm/mach-omap2/omap_hwmod_44xx_data.c |    9 +++++++++
21  4 files changed, 27 insertions(+), 1 deletions(-)
23 diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
24 index 95f547c..7af2514 100644
25 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
26 +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
27 @@ -1032,7 +1032,12 @@ static struct omap_hwmod_class i2c_class = {
28         .rev            = OMAP_I2C_IP_VERSION_1,
29  };
30  
31 -static struct omap_i2c_dev_attr i2c_dev_attr;
32 +static struct omap_i2c_dev_attr i2c_dev_attr = {
33 +       .flags          = OMAP_I2C_FLAG_NO_FIFO |
34 +                         OMAP_I2C_FLAG_SIMPLE_CLOCK |
35 +                         OMAP_I2C_FLAG_16BIT_DATA_REG |
36 +                         OMAP_I2C_FLAG_BUS_SHIFT_2,
37 +};
38  
39  /* I2C1 */
40  
41 diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
42 index d7ed51b..405688a 100644
43 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
44 +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
45 @@ -1083,6 +1083,9 @@ static struct omap_hwmod_class i2c_class = {
46  
47  static struct omap_i2c_dev_attr i2c_dev_attr = {
48         .fifo_depth     = 8, /* bytes */
49 +       .flags          = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
50 +                         OMAP_I2C_FLAG_BUS_SHIFT_2 |
51 +                         OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
52  };
53  
54  /* I2C1 */
55 diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
56 index 58ec1e2..c704ac8 100644
57 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
58 +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
59 @@ -1608,6 +1608,9 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
60  
61  static struct omap_i2c_dev_attr i2c1_dev_attr = {
62         .fifo_depth     = 8, /* bytes */
63 +       .flags          = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
64 +                         OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
65 +                         OMAP_I2C_FLAG_BUS_SHIFT_2,
66  };
67  
68  static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
69 @@ -1640,6 +1643,9 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = {
70  
71  static struct omap_i2c_dev_attr i2c2_dev_attr = {
72         .fifo_depth     = 8, /* bytes */
73 +       .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
74 +                OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
75 +                OMAP_I2C_FLAG_BUS_SHIFT_2,
76  };
77  
78  static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
79 @@ -1672,6 +1678,9 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = {
80  
81  static struct omap_i2c_dev_attr i2c3_dev_attr = {
82         .fifo_depth     = 64, /* bytes */
83 +       .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
84 +                OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
85 +                OMAP_I2C_FLAG_BUS_SHIFT_2,
86  };
87  
88  static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
89 diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
90 index 1bed3b8..55331df 100644
91 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
92 +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
93 @@ -27,6 +27,7 @@
94  #include <plat/mcspi.h>
95  #include <plat/mcbsp.h>
96  #include <plat/mmc.h>
97 +#include <plat/i2c.h>
98  
99  #include "omap_hwmod_common_data.h"
100  
101 @@ -2163,6 +2164,10 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
102         .rev    = OMAP_I2C_IP_VERSION_2,
103  };
104  
105 +static struct omap_i2c_dev_attr i2c_dev_attr = {
106 +       .flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
107 +};
109  /* i2c1 */
110  static struct omap_hwmod omap44xx_i2c1_hwmod;
111  static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
112 @@ -2213,6 +2218,7 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = {
113         },
114         .slaves         = omap44xx_i2c1_slaves,
115         .slaves_cnt     = ARRAY_SIZE(omap44xx_i2c1_slaves),
116 +       .dev_attr       = &i2c_dev_attr,
117         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
118  };
119  
120 @@ -2266,6 +2272,7 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = {
121         },
122         .slaves         = omap44xx_i2c2_slaves,
123         .slaves_cnt     = ARRAY_SIZE(omap44xx_i2c2_slaves),
124 +       .dev_attr       = &i2c_dev_attr,
125         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
126  };
127  
128 @@ -2319,6 +2326,7 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = {
129         },
130         .slaves         = omap44xx_i2c3_slaves,
131         .slaves_cnt     = ARRAY_SIZE(omap44xx_i2c3_slaves),
132 +       .dev_attr       = &i2c_dev_attr,
133         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
134  };
135  
136 @@ -2372,6 +2380,7 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = {
137         },
138         .slaves         = omap44xx_i2c4_slaves,
139         .slaves_cnt     = ARRAY_SIZE(omap44xx_i2c4_slaves),
140 +       .dev_attr       = &i2c_dev_attr,
141         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
142  };
143  
144 -- 
145 1.6.6.1