Skip to contentSkip to conversation

OMAP2/3: fix the i2c,gpio reset timeouts during boot.

PATCH Superseded Avinash.H.M 3 participants 9 messages Apr 1, 2011 – Apr 21, 2011

Subsystems (5)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover OMAP2/3: fix the i2c,gpio reset timeouts during boot.

Hi ,

The patches solve the reset timeouts seen in i2c and gpio modules while booting omap2 and omap3.

Baseline:
The patches are based on
* git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
* master branch.
* v2.6.39-rc1 commit (0ce790e)

Testing:
* build tested omap2plus_defconfig for warnings and errors. none introduced.
* boot tested on 2430.
* tested for 'core off' in suspend resume on 3430 sdp. core off counters increment after suspend resume. Core off works with below commands,

echo 1 > /debug/pm_debug/enable_off_mode
echo mem > /sys/power/state
cat /debug/pm_debug/count | grep ^core

Dependencies:
* need patch "OMAP2+: hwmod data: Set hwmod flags to only allow 16-bit accesses to i2c" from Andry Green for accessing i2c_sysc. Without this even with this patch, we will see i2c reset timeouts.

br ,
- Avinash

Avinash.H.M (2):
OMAP2/3: hwmod: fix the i2c-reset timeout during bootup OMAP2/3: hwmod: fix gpio-reset timeouts seen during bootup.

 arch/arm/mach-omap2/omap_hwmod.c             |   59 ++++++++++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_2420_data.c   |    5 ++
 arch/arm/mach-omap2/omap_hwmod_2430_data.c   |    6 +++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c   |    7 +++
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 +
 5 files changed, 79 insertions(+), 0 deletions(-)
#1 lore raw

PATCH 1/2 OMAP2/3: hwmod: fix the i2c-reset timeout during bootup

The i2c module has a special reset sequence. The sequence is
- Disable the I2C.
- Write to SOFTRESET bit.
- Enable the I2C.
- Poll on the RESETDONE bit.
This sequence must be followed for i2c reset in omap2, omap3. The sequence is implemented as a function and the i2c_class is updated with the correct 'reset' pointer.

Cc Rajendra Nayak <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Benoit Cousson <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.c             |   59 ++++++++++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_2420_data.c   |    1 +
 arch/arm/mach-omap2/omap_hwmod_2430_data.c   |    1 +
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c   |    1 +
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 +
 5 files changed, 64 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +59 -0
index e034294..f61c9c8 100644
@@ -156,6 +156,10 @@
 /* Name of the OMAP hwmod for the MPU */
 #define MPU_INITIATOR_NAME		"mpu"
 
+/* In register I2C_CON, Bit 15 is the I2C enable bit */
+#define I2C_EN				BIT(15)
+#define I2C_CON_OFFSET			0x24
+
 /* omap_hwmod_list contains all registered struct omap_hwmods */
 static LIST_HEAD(omap_hwmod_list);
 
@@ -2369,3 +2373,58 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh)
 
 	return 0;
 }
+
+/**
+ * omap_i2c_reset- reset the omap i2c module.
+ * @oh: struct omap_hwmod *
+ *
+ * The i2c moudle in omap2, omap3 had a special sequence to reset. The
+ * sequence is:
+ * - Disable the I2C.
+ * - Write to SOFTRESET bit.
+ * - Enable the I2C.
+ * - Poll on the RESETDONE bit.
+ * The sequence is implemented in below function. This is called for 2420,
+ * 2430 and omap3.
+ */
+int omap_i2c_reset(struct omap_hwmod *oh)
+{
+	u32 v = 0;
+	int ret = 0, c = 0;
+
+	/* Disable I2C */
+	v = omap_hwmod_read(oh, I2C_CON_OFFSET);
+	v = v & ~I2C_EN;
+	omap_hwmod_write(v, oh, I2C_CON_OFFSET);
+
+	/* Write to the SOFTRESET bit */
+	v = oh->_sysc_cache;
+	ret = _set_softreset(oh, &v);
+	if (ret)
+		goto err1;
+	_write_sysconfig(v, oh);
+
+	/* Enable I2C */
+	v = omap_hwmod_read(oh, I2C_CON_OFFSET);
+	v |= I2C_EN;
+	omap_hwmod_write(v, oh, I2C_CON_OFFSET);
+
+	/* Poll on RESETDONE bit */
+	omap_test_timeout((omap_hwmod_read(oh,
+				oh->class->sysc->syss_offs)
+				& SYSS_RESETDONE_MASK),
+				MAX_MODULE_SOFTRESET_WAIT, c);
+
+	if (c == MAX_MODULE_SOFTRESET_WAIT)
+		pr_warning("%s: %s: softreset failed (waited %d usec)\n",
+			__func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
+	else
+		pr_debug("%s: %s: softreset in %d usec\n", __func__,
+			oh->name, c);
+
+	return 0;
+
+err1:
+	pr_warning("%s: returned error from _set_softreset\n", __func__);
+	return ret;
+}
arch/arm/mach-omap2/omap_hwmod_2420_data.c +1 -0
index 8eb3ce1..82ff5f7 100644
@@ -1447,6 +1447,7 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
 static struct omap_hwmod_class i2c_class = {
 	.name		= "i2c",
 	.sysc		= &i2c_sysc,
+	.reset		= &omap_i2c_reset,
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr;
arch/arm/mach-omap2/omap_hwmod_2430_data.c +1 -0
index a860fb5..ce292f0 100644
@@ -1524,6 +1524,7 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
 static struct omap_hwmod_class i2c_class = {
 	.name		= "i2c",
 	.sysc		= &i2c_sysc,
+	.reset		= &omap_i2c_reset,
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -0
index b98e2df..c74f972 100644
@@ -1460,6 +1460,7 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = {
 static struct omap_hwmod_class i2c_class = {
 	.name = "i2c",
 	.sysc = &i2c_sysc,
+	.reset = &omap_i2c_reset,
 };
 
 /*
arch/arm/plat-omap/include/plat/omap_hwmod.h +2 -0
index 1adea9c..26b7ad3 100644
@@ -545,6 +545,8 @@ struct omap_hwmod {
 };
 
 int omap_hwmod_register(struct omap_hwmod **ohs);
+int omap_i2c_reset(struct omap_hwmod *oh);
+
 struct omap_hwmod *omap_hwmod_lookup(const char *name);
 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 			void *data);
Signature · 1 line
1.7.1
maintainer
#2 lore raw

Re: [PATCH 1/2] OMAP2/3: hwmod: fix the i2c-reset timeout during bootup

Hi

some comments

Quoted 27 lines · Avinash.H.M

The i2c module has a special reset sequence. The sequence is
- Disable the I2C.
- Write to SOFTRESET bit.
- Enable the I2C.
- Poll on the RESETDONE bit.
This sequence must be followed for i2c reset in omap2, omap3. The sequence is implemented as a function and the i2c_class is updated with the correct 'reset' pointer.

Cc Rajendra Nayak <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Benoit Cousson <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.c             |   59 ++++++++++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_2420_data.c   |    1 +
 arch/arm/mach-omap2/omap_hwmod_2430_data.c   |    1 +
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c   |    1 +
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 +
 5 files changed, 64 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +0 -0
index e034294..f61c9c8 100644

arch/arm/mach-omap2/omap_hwmod.c line 161

Quoted 6 lines
arch/arm/mach-omap2/omap_hwmod.c +3 -0
@@ -156,6 +156,10 @@
 /* Name of the OMAP hwmod for the MPU */
 #define MPU_INITIATOR_NAME		"mpu"
 
+/* In register I2C_CON, Bit 15 is the I2C enable bit */
+#define I2C_EN				BIT(15)
+#define I2C_CON_OFFSET			0x24

This stuff, along with omap_i2c_reset(), doesn't belong in omap_hwmod.c, which is common code that is not I2C-specific. Please put it in mach-omap2/i2c.c instead.

Quoted 15 lines
arch/arm/mach-omap2/omap_hwmod.c +8 -0
+
 /* omap_hwmod_list contains all registered struct omap_hwmods */
 static LIST_HEAD(omap_hwmod_list);
 
@@ -2369,3 +2373,58 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh)
 
 	return 0;
 }
+
+/**
+ * omap_i2c_reset- reset the omap i2c module.
+ * @oh: struct omap_hwmod *
+ *
+ * The i2c moudle in omap2, omap3 had a special sequence to reset. The
+ * sequence is:

arch/arm/mach-omap2/omap_hwmod.c int omap_hwmod_no_setup_reset(struct omap_hwmod *oh) · line 2392

Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod.c +10 -0
+ * - Disable the I2C.
+ * - Write to SOFTRESET bit.
+ * - Enable the I2C.
+ * - Poll on the RESETDONE bit.
+ * The sequence is implemented in below function. This is called for 2420,
+ * 2430 and omap3.
+ */
+int omap_i2c_reset(struct omap_hwmod *oh)
+{
+	u32 v = 0;

no need to initialize this to 0

arch/arm/mach-omap2/omap_hwmod.c int omap_hwmod_no_setup_reset(struct omap_hwmod *oh) · line 2393

Quoted 1 line
arch/arm/mach-omap2/omap_hwmod.c +1 -0
+	int ret = 0, c = 0;

no need to initialize ret to 0

Quoted 78 lines
arch/arm/mach-omap2/omap_hwmod.c +37 -0
+
+	/* Disable I2C */
+	v = omap_hwmod_read(oh, I2C_CON_OFFSET);
+	v = v & ~I2C_EN;
+	omap_hwmod_write(v, oh, I2C_CON_OFFSET);
+
+	/* Write to the SOFTRESET bit */
+	v = oh->_sysc_cache;
+	ret = _set_softreset(oh, &v);
+	if (ret)
+		goto err1;
+	_write_sysconfig(v, oh);
+
+	/* Enable I2C */
+	v = omap_hwmod_read(oh, I2C_CON_OFFSET);
+	v |= I2C_EN;
+	omap_hwmod_write(v, oh, I2C_CON_OFFSET);
+
+	/* Poll on RESETDONE bit */
+	omap_test_timeout((omap_hwmod_read(oh,
+				oh->class->sysc->syss_offs)
+				& SYSS_RESETDONE_MASK),
+				MAX_MODULE_SOFTRESET_WAIT, c);
+
+	if (c == MAX_MODULE_SOFTRESET_WAIT)
+		pr_warning("%s: %s: softreset failed (waited %d usec)\n",
+			__func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
+	else
+		pr_debug("%s: %s: softreset in %d usec\n", __func__,
+			oh->name, c);
+
+	return 0;
+
+err1:
+	pr_warning("%s: returned error from _set_softreset\n", __func__);
+	return ret;
+}
arch/arm/mach-omap2/omap_hwmod_2420_data.c +1 -0
index 8eb3ce1..82ff5f7 100644
@@ -1447,6 +1447,7 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
 static struct omap_hwmod_class i2c_class = {
 	.name		= "i2c",
 	.sysc		= &i2c_sysc,
+	.reset		= &omap_i2c_reset,
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr;
arch/arm/mach-omap2/omap_hwmod_2430_data.c +1 -0
index a860fb5..ce292f0 100644
@@ -1524,6 +1524,7 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
 static struct omap_hwmod_class i2c_class = {
 	.name		= "i2c",
 	.sysc		= &i2c_sysc,
+	.reset		= &omap_i2c_reset,
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -0
index b98e2df..c74f972 100644
@@ -1460,6 +1460,7 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = {
 static struct omap_hwmod_class i2c_class = {
 	.name = "i2c",
 	.sysc = &i2c_sysc,
+	.reset = &omap_i2c_reset,
 };
 
 /*
arch/arm/plat-omap/include/plat/omap_hwmod.h +0 -0
index 1adea9c..26b7ad3 100644

arch/arm/plat-omap/include/plat/omap_hwmod.h struct omap_hwmod { · line 548

Quoted 4 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -0
@@ -545,6 +545,8 @@ struct omap_hwmod {
 };
 
 int omap_hwmod_register(struct omap_hwmod **ohs);
+int omap_i2c_reset(struct omap_hwmod *oh);

This should go into plat-omap/include/plat/i2c.h

Quoted 7 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -0
+
 struct omap_hwmod *omap_hwmod_lookup(const char *name);
 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 			void *data);
Signature · 1 line
1.7.1

- Paul

#3 lore raw

Re: [PATCH 1/2] OMAP2/3: hwmod: fix the i2c-reset timeout during bootup

Hi Paul ,

Thanks for the review.

Quoted 7 lines

arch/arm/mach-omap2/omap_hwmod.c line 161

Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod.c +3 -0
+/* In register I2C_CON, Bit 15 is the I2C enable bit */
+#define I2C_EN				BIT(15)
+#define I2C_CON_OFFSET			0x24

This stuff, along with omap_i2c_reset(), doesn't belong in omap_hwmod.c, which is common code that is not I2C-specific. Please put it in mach-omap2/i2c.c instead.

I agree. I ll move these I2C specific things from omap_hwmod.c to mach-omap2/i2c.c.

[...]

Quoted 10 lines

arch/arm/mach-omap2/omap_hwmod.c int omap_hwmod_no_setup_reset(struct omap_hwmod *oh) · line 2392

Quoted 4 lines

+ */

arch/arm/mach-omap2/omap_hwmod.c +3 -0
+int omap_i2c_reset(struct omap_hwmod *oh)
+{
+	u32 v = 0;

no need to initialize this to 0

arch/arm/mach-omap2/omap_hwmod.c int omap_hwmod_no_setup_reset(struct omap_hwmod *oh) · line 2393

Quoted 1 line
arch/arm/mach-omap2/omap_hwmod.c +1 -0
+	int ret = 0, c = 0;

no need to initialize ret to 0

OK . I ll remove initialization of 'v'.

Since now i am moving the function to i2c.c, i can't call _set_softreset and _write_sysconfig(static functions in omap_hwmod.c). Instead, i ll set the SOFTRESET bit and write into SYSC register directly. So i do not need 'ret'. I ll remove it.

Just curios. I understand there is no use of initializing 'v' to 0 here. But by programming practice, i usually initialize local variables to '0'. Is there anything wrong in doing this ? Any negative impact ?

[...]

Quoted 4 lines
Quoted 2 lines

int omap_hwmod_register(struct omap_hwmod **ohs);
+int omap_i2c_reset(struct omap_hwmod *oh);

This should go into plat-omap/include/plat/i2c.h

Sure. I will move this change to plat/i2c.h.

I ll send out the v2 of this shortly after testing.

thanks ,

- avinash

Quoted 11 lines
Quoted 8 lines
arch/arm/plat-omap/include/plat/omap_hwmod.h +1 -0
+
 struct omap_hwmod *omap_hwmod_lookup(const char *name);
 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 			void *data);
Signature · 1 line
1.7.1

- Paul

#4 lore raw

Re: [PATCH 1/2] OMAP2/3: hwmod: fix the i2c-reset timeout during bootup

In reply to Avinash.H.M

Hi Avinash,

Quoted 5 lines · Avinash.H.M

The i2c module has a special reset sequence. The sequence is
- Disable the I2C.
- Write to SOFTRESET bit.
- Enable the I2C.
- Poll on the RESETDONE bit.

Shouldn't the final state be disabled after reset? IOW, Shouldn't the I2C be disabled again after the polling?

Also, when reposting, please be sure to Cc the linux-arm-kernel mailing list for patches that are targetted for upstream.

Thanks,

Kevin

#5 lore raw

Re: [PATCH 1/2] OMAP2/3: hwmod: fix the i2c-reset timeout during bootup

Hi Kevin,

Quoted 3 lines

Shouldn't the final state be disabled after reset? IOW, Shouldn't the I2C be disabled again after the polling?

Yes, the I2C should be disabled after polling. We need not explicitly program it to disabled state because, the reset value of the I2C_EN bit is '0'. So, it is kept disabled after reset.

Quoted 3 lines

Also, when reposting, please be sure to Cc the linux-arm-kernel mailing list for patches that are targetted for upstream.

Thanks for pointing it kevin. I wasn't aware of this. I will CC lak for my further patches from now onwards.

thanks,

- avinash

#6 lore raw

PATCH 2/2 OMAP2/3: hwmod: fix gpio-reset timeouts seen during bootup.

In reply to Avinash.H.M

GPIO module expects the debounce clocks to be enabled during reset. It doesn't reset properly and timeouts are seen, if this clock isn't enabled during reset. Add the HWMOD_CONTROL_OPT_CLKS_IN_RESET flags to the GPIO HWMODs, with which the debounce clocks are enabled during reset.

Cc Rajendra Nayak <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Benoit Cousson <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |    4 ++++
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |    5 +++++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    6 ++++++
 3 files changed, 15 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2420_data.c +4 -0
index 82ff5f7..e0bda0a 100644
@@ -1640,6 +1640,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
 
 static struct omap_hwmod omap2420_gpio1_hwmod = {
 	.name		= "gpio1",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap242x_gpio1_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap242x_gpio1_irqs),
 	.main_clk	= "gpios_fck",
@@ -1670,6 +1671,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
 
 static struct omap_hwmod omap2420_gpio2_hwmod = {
 	.name		= "gpio2",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap242x_gpio2_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap242x_gpio2_irqs),
 	.main_clk	= "gpios_fck",
@@ -1700,6 +1702,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
 
 static struct omap_hwmod omap2420_gpio3_hwmod = {
 	.name		= "gpio3",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap242x_gpio3_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap242x_gpio3_irqs),
 	.main_clk	= "gpios_fck",
@@ -1730,6 +1733,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
 
 static struct omap_hwmod omap2420_gpio4_hwmod = {
 	.name		= "gpio4",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap242x_gpio4_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap242x_gpio4_irqs),
 	.main_clk	= "gpios_fck",
arch/arm/mach-omap2/omap_hwmod_2430_data.c +5 -0
index ce292f0..99cd7bd 100644
@@ -1743,6 +1743,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio1_hwmod = {
 	.name		= "gpio1",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap243x_gpio1_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap243x_gpio1_irqs),
 	.main_clk	= "gpios_fck",
@@ -1773,6 +1774,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio2_hwmod = {
 	.name		= "gpio2",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap243x_gpio2_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap243x_gpio2_irqs),
 	.main_clk	= "gpios_fck",
@@ -1803,6 +1805,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio3_hwmod = {
 	.name		= "gpio3",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap243x_gpio3_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap243x_gpio3_irqs),
 	.main_clk	= "gpios_fck",
@@ -1833,6 +1836,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio4_hwmod = {
 	.name		= "gpio4",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap243x_gpio4_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap243x_gpio4_irqs),
 	.main_clk	= "gpios_fck",
@@ -1863,6 +1867,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio5_hwmod = {
 	.name		= "gpio5",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap243x_gpio5_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap243x_gpio5_irqs),
 	.main_clk	= "gpio5_fck",
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +6 -0
index c74f972..7552b2f 100644
@@ -2142,6 +2142,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio1_hwmod = {
 	.name		= "gpio1",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap3xxx_gpio1_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap3xxx_gpio1_irqs),
 	.main_clk	= "gpio1_ick",
@@ -2178,6 +2179,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio2_hwmod = {
 	.name		= "gpio2",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap3xxx_gpio2_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap3xxx_gpio2_irqs),
 	.main_clk	= "gpio2_ick",
@@ -2214,6 +2216,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio3_hwmod = {
 	.name		= "gpio3",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap3xxx_gpio3_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap3xxx_gpio3_irqs),
 	.main_clk	= "gpio3_ick",
@@ -2250,6 +2253,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio4_hwmod = {
 	.name		= "gpio4",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap3xxx_gpio4_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap3xxx_gpio4_irqs),
 	.main_clk	= "gpio4_ick",
@@ -2286,6 +2290,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio5_hwmod = {
 	.name		= "gpio5",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap3xxx_gpio5_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap3xxx_gpio5_irqs),
 	.main_clk	= "gpio5_ick",
@@ -2322,6 +2327,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio6_hwmod = {
 	.name		= "gpio6",
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 	.mpu_irqs	= omap3xxx_gpio6_irqs,
 	.mpu_irqs_cnt	= ARRAY_SIZE(omap3xxx_gpio6_irqs),
 	.main_clk	= "gpio6_ick",
Signature · 1 line
1.7.1
maintainer
#7 lore raw

Re: [PATCH 2/2] OMAP2/3: hwmod: fix gpio-reset timeouts seen during bootup.

Thanks, queued for 2.6.39-rc.

- Paul

#8 lore raw

Re: [PATCH 2/2] OMAP2/3: hwmod: fix gpio-reset timeouts seen during bootup.

Quoted 2 lines · Paul Walmsley

Thanks, queued for 2.6.39-rc.

Thanks Paul.

- Avinash

Quoted 3 lines

- Paul