Skip to contentSkip to conversation

omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

PATCH New Santosh Shilimkar 6 participants 24 messages Jan 5, 2011 – Jan 19, 2011

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

struct clockdomain member clktrctrl_mask is available for only for OMAP2 and OMAP3 architectures. Technially it is also used only for these archs but this breaks the build with custom OMAP4 configuration.

CC arch/arm/mach-omap2/clockdomain.o
arch/arm/mach-omap2/clockdomain.c: In function '_enable_hwsup':
arch/arm/mach-omap2/clockdomain.c:251: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:254: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function '_disable_hwsup':
arch/arm/mach-omap2/clockdomain.c:277: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:280: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_sleep':
arch/arm/mach-omap2/clockdomain.c:744: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_wakeup':
arch/arm/mach-omap2/clockdomain.c:789: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_enable':
arch/arm/mach-omap2/clockdomain.c:922: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:926: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_disable':
arch/arm/mach-omap2/clockdomain.c:994: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:998: error: 'struct clockdomain' has no member named 'clktrctrl_mask' make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Fix the build break by dropping the #ifdef as suggested by Paul Walmsley

---
 arch/arm/mach-omap2/clockdomain.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/clockdomain.h +0 -2
index de3faa2..9b459c2 100644
@@ -103,9 +103,7 @@ struct clockdomain {
 		const char *name;
 		struct powerdomain *ptr;
 	} pwrdm;
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
 	const u16 clktrctrl_mask;
-#endif
 	const u8 flags;
 	const u8 dep_bit;
 	const u8 prcm_partition;
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

omap2plus_defocnfig build breaks when customised with only ARCH_OMAP4 selected. This is because common files make references to the functions which are defined only for omap2xxx and omap3xxx.

LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `pm_dbg_regset_store':
arch/arm/mach-omap2/pm-debug.c:335: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function omap2_pm_dump':
arch/arm/mach-omap2/pm-debug.c:121: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:123: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:124: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:125: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap_prcm_arch_reset':
arch/arm/mach-omap2/prcm.c:106: undefined reference to omap2_prm_set_mod_reg_bits' arch/arm/mach-omap2/prcm.c:108: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap_prcm_get_reset_sources':
arch/arm/mach-omap2/prcm.c:53: undefined reference to omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function clkdm_clear_all_wkdeps':
arch/arm/mach-omap2/clockdomain.c:545: undefined reference to omap2_prm_clear_mod_reg_bits' arch/arm/mach-omap2/built-in.o: In function clkdm_del_wkdep':
arch/arm/mach-omap2/clockdomain.c:475: undefined reference to omap2_prm_clear_mod_reg_bits' arch/arm/mach-omap2/built-in.o: In function clkdm_read_wkdep':
arch/arm/mach-omap2/clockdomain.c:511: undefined reference to omap2_prm_read_mod_bits_shift' arch/arm/mach-omap2/built-in.o: In function clkdm_add_wkdep':
arch/arm/mach-omap2/clockdomain.c:440: undefined reference to `omap2_prm_set_mod_reg_bits'
make: *** [.tmp_vmlinux1] Error 1

This patch adds stubs for these functions so that build continues to work.

---
 arch/arm/mach-omap2/prm2xxx_3xxx.h |   63 +++++++++++++++++++++++++++++++++++-
 1 files changed, 62 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/prm2xxx_3xxx.h +62 -1
index 53d44f6..843f329 100644
@@ -228,7 +228,67 @@
 
 
 #ifndef __ASSEMBLER__
-
+/*
+ * Stub omap2xxx/omap3xxx functions so that common files
+ * continue to build when custom builds are used
+ */
+#if defined(CONFIG_ARCH_OMAP4) && !(defined(CONFIG_ARCH_OMAP2) ||	\
+					defined(CONFIG_ARCH_OMAP3))
+static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}
+static inline void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+}
+static inline u32 omap2_prm_rmw_mod_reg_bits(u32 mask, u32 bits,
+		s16 module, s16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}
+static inline u32 omap2_prm_set_mod_reg_bits(u32 bits, s16 module, s16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}
+static inline u32 omap2_prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}
+static inline u32 omap2_prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}
+static inline int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}
+static inline int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}
+static inline int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}
+#else
 /* Power/reset management domain register get/set */
 extern u32 omap2_prm_read_mod_reg(s16 module, u16 idx);
 extern void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx);
@@ -242,6 +302,7 @@ extern int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift);
 extern int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift);
 extern int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift);
 
+#endif	/* CONFIG_ARCH_OMAP4 */
 #endif
 
 /*
Signature · 1 line
1.6.0.4
#2 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 11 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Santosh Shilimkar
Sent: Wednesday, January 05, 2011 4:27 PM
To: linux-omap at vger.kernel.org
Cc: Hilman, Kevin; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Shilimkar, Santosh; Paul Walmsley
Subject: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

[snip]

Quoted 9 lines

#ifndef __ASSEMBLER__

arch/arm/mach-omap2/prm2xxx_3xxx.h +5 -1
-
+/*
+ * Stub omap2xxx/omap3xxx functions so that common files
+ * continue to build when custom builds are used
+ */
+#if defined(CONFIG_ARCH_OMAP4) && 

!(defined(CONFIG_ARCH_OMAP2) || \

arch/arm/mach-omap2/prm2xxx_3xxx.h line 242

Quoted 7 lines
arch/arm/mach-omap2/prm2xxx_3xxx.h +7 -0
+					defined(CONFIG_ARCH_OMAP3))
+static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}

Looking forward, the warning of incorrect SOC may be required for when kernel is build for one specific SOC.

Wouldn't it be easy/better to have common global function:

void wrong_soc(char* func, int soc_id)

{
	WARN_ONCE(1, "Function %s cannot be used for %d", func, soc_id);
}

OR we could have soc specific functions e.g.

void omap2xxx_only (char* func)

{
	WARN_ONCE(1, "Function %s is specific to OMAP2XXX");
}

..etc..

Later these functions can be called from the stubs.

This is prelim idea, will need to be worked upon.

~sanjeev

#3 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 53 lines

-----Original Message-----
From: Premi, Sanjeev [mailto:premi at ti.com]
Sent: Thursday, January 06, 2011 8:03 PM
To: Shilimkar, Santosh; linux-omap at vger.kernel.org
Cc: Hilman, Kevin; tony at atomide.com; linux-arm- kernel at lists.infradead.org; Shilimkar, Santosh; Paul Walmsley
Subject: RE: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 11 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Santosh Shilimkar
Sent: Wednesday, January 05, 2011 4:27 PM
To: linux-omap at vger.kernel.org
Cc: Hilman, Kevin; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Shilimkar, Santosh; Paul Walmsley
Subject: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

[snip]

Quoted 9 lines

#ifndef __ASSEMBLER__

arch/arm/mach-omap2/prm2xxx_3xxx.h +5 -1
-
+/*
+ * Stub omap2xxx/omap3xxx functions so that common files
+ * continue to build when custom builds are used
+ */
+#if defined(CONFIG_ARCH_OMAP4) &&

!(defined(CONFIG_ARCH_OMAP2) || \

arch/arm/mach-omap2/prm2xxx_3xxx.h line 242

Quoted 7 lines
arch/arm/mach-omap2/prm2xxx_3xxx.h +7 -0
+					defined(CONFIG_ARCH_OMAP3))
+static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}

Looking forward, the warning of incorrect SOC may be required for when kernel is build for one specific SOC.

Wouldn't it be easy/better to have common global function:

void wrong_soc(char* func, int soc_id)
{
WARN_ONCE(1, "Function %s cannot be used for %d", func,
soc_id);
}

OR we could have soc specific functions e.g.

void omap2xxx_only (char* func)

Quoted 9 lines
{
	WARN_ONCE(1, "Function %s is specific to OMAP2XXX");
}

..etc..

Later these functions can be called from the stubs.

This is prelim idea, will need to be worked upon.

Not sure. May appear like over engineering considering it's a stub.
Paul can comment.

Regards,
Santosh

#4 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 58 lines · Santosh Shilimkar
Quoted 58 lines

-----Original Message-----
From: Premi, Sanjeev [mailto:premi at ti.com]
Sent: Thursday, January 06, 2011 8:03 PM
To: Shilimkar, Santosh; linux-omap at vger.kernel.org
Cc: Hilman, Kevin; tony at atomide.com; linux-arm- kernel at lists.infradead.org; Shilimkar, Santosh; Paul Walmsley
Subject: RE: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 11 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Santosh Shilimkar
Sent: Wednesday, January 05, 2011 4:27 PM
To: linux-omap at vger.kernel.org
Cc: Hilman, Kevin; tony at atomide.com; linux-arm-kernel at lists.infradead.org; Shilimkar, Santosh; Paul Walmsley
Subject: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

[snip]

Quoted 9 lines

#ifndef __ASSEMBLER__

arch/arm/mach-omap2/prm2xxx_3xxx.h +5 -1
-
+/*
+ * Stub omap2xxx/omap3xxx functions so that common files
+ * continue to build when custom builds are used
+ */
+#if defined(CONFIG_ARCH_OMAP4) &&

!(defined(CONFIG_ARCH_OMAP2) || \

arch/arm/mach-omap2/prm2xxx_3xxx.h line 242

Quoted 7 lines
arch/arm/mach-omap2/prm2xxx_3xxx.h +7 -0
+					defined(CONFIG_ARCH_OMAP3))
+static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}

Looking forward, the warning of incorrect SOC may be required for when kernel is build for one specific SOC.

Wouldn't it be easy/better to have common global function:

void wrong_soc(char* func, int soc_id)
{
WARN_ONCE(1, "Function %s cannot be used for %d", func,
soc_id);
}

OR we could have soc specific functions e.g.

void omap2xxx_only (char* func)

{
	WARN_ONCE(1, "Function %s is specific to OMAP2XXX");
}

..etc..

Quoted 7 lines
Quoted 4 lines

Later these functions can be called from the stubs.

This is prelim idea, will need to be worked upon.

Not sure. May appear like over engineering considering it's a stub.
Paul can comment.

I guess Sanjeev's approach is meant eliminate duplicate strings that waste space.

Sanjeev, did you check whether multiple copies of the exact same string actually exist in the binary? I'm wondering if gcc is smart enough to only have one copy of the string (but have doubts.)

Kevin

maintainer
#5 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

In reply to Santosh Shilimkar

Hi Santosh

Quoted 3 lines · Santosh Shilimkar

omap2plus_defocnfig build breaks when customised with only ARCH_OMAP4 selected. This is because common files make references to the functions which are defined only for omap2xxx and omap3xxx.

...

Quoted 20 lines

This patch adds stubs for these functions so that build continues to work.

---
 arch/arm/mach-omap2/prm2xxx_3xxx.h |   63 +++++++++++++++++++++++++++++++++++-
 1 files changed, 62 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/prm2xxx_3xxx.h +2 -1
index 53d44f6..843f329 100644
@@ -228,7 +228,67 @@
 
 
 #ifndef __ASSEMBLER__
-
+/*
+ * Stub omap2xxx/omap3xxx functions so that common files

arch/arm/mach-omap2/prm2xxx_3xxx.h line 242

Quoted 10 lines
arch/arm/mach-omap2/prm2xxx_3xxx.h +10 -0
+ * continue to build when custom builds are used
+ */
+#if defined(CONFIG_ARCH_OMAP4) && !(defined(CONFIG_ARCH_OMAP2) ||	\
+					defined(CONFIG_ARCH_OMAP3))
+static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}

I think it would be best to use WARN() on these, rather than WARN_ONCE(). That's because these could be called from different parts of the code base, and the stack backtrace will help someone figure out all the code that needs to be fixed.

Once you do that, this patch is

- Paul

#6 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 48 lines

-----Original Message-----
From: Paul Walmsley [mailto:paul at pwsan.com]
Sent: Thursday, January 06, 2011 11:28 PM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Hi Santosh

Quoted 1 line · Santosh Shilimkar

omap2plus_defocnfig build breaks when customised with only

ARCH_OMAP4

Quoted 1 line

selected. This is because common files make references to the

functions

Quoted 1 line

which are defined only for omap2xxx and omap3xxx.

...

Quoted 2 lines

This patch adds stubs for these functions so that build continues

to work.

Quoted 5 lines
---
 arch/arm/mach-omap2/prm2xxx_3xxx.h |   63

+++++++++++++++++++++++++++++++++++-

arch/arm/mach-

Quoted 3 lines
 1 files changed, 62 insertions(+), 1 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-omap2/prm2xxx_3xxx.h +0 -0

omap2/prm2xxx_3xxx.h

arch/arm/mach-omap2/prm2xxx_3xxx.h line 235

Quoted 13 lines

index 53d44f6..843f329 100644

arch/arm/mach-omap2/prm2xxx_3xxx.h +5 -1
@@ -228,7 +228,67 @@
 
 
 #ifndef __ASSEMBLER__
-
+/*
+ * Stub omap2xxx/omap3xxx functions so that common files
+ * continue to build when custom builds are used
+ */
+#if defined(CONFIG_ARCH_OMAP4) && !(defined(CONFIG_ARCH_OMAP2) ||
	\
Quoted 16 lines

arch/arm/mach-omap2/prm2xxx_3xxx.h line 242

Quoted 7 lines
arch/arm/mach-omap2/prm2xxx_3xxx.h +7 -0
+					defined(CONFIG_ARCH_OMAP3))
+static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
+{
+	WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
+		"not suppose to be used on omap4\n");
+	return 0;
+}

I think it would be best to use WARN() on these, rather than WARN_ONCE().
That's because these could be called from different parts of the code
base, and the stack backtrace will help someone figure out all the code
that needs to be fixed.

Ok.

Quoted 4 lines

Once you do that, this patch is

Thanks

#7 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

In reply to Paul Walmsley
Quoted 3 lines

-----Original Message-----
From: Paul Walmsley [mailto:paul at pwsan.com]
Sent: Thursday, January 06, 2011 11:28 PM

Kevin,

Quoted 8 lines

To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Hi Santosh

[.....]

Quoted 9 lines

I think it would be best to use WARN() on these, rather than WARN_ONCE().
That's because these could be called from different parts of the code
base, and the stack backtrace will help someone figure out all the code
that needs to be fixed.

Quoted 5 lines

Once you do that, this patch is

With WARN() instead of WARN_ONCE() and Paul's ack, here is an updated patch.

#8 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Santosh Shilimkar <[email protected]> writes:

[...]

Quoted 5 lines
Quoted 5 lines

I think it would be best to use WARN() on these, rather than WARN_ONCE(). That's because these could be called from different parts of the code base, and the stack backtrace will help someone figure out all the code that needs to be fixed.

Quoted 7 lines
Quoted 4 lines

Once you do that, this patch is

With WARN() instead of WARN_ONCE() and Paul's ack, here is an updated patch.

Thanks, will queue for .38-rc cycle.

I'll again plead for working on your git-send-email setup. It looks like your using outlook. The inline patch is wrapped (as outlook almost always does.) The attached version applied fine, but the strong preference is for a single inline patch.

Thanks,

Kevin

#9 lore raw

PATCH v2 2/5 omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Quoted 26 lines

-----Original Message-----
From: Kevin Hilman [mailto:khilman at ti.com]
Sent: Saturday, January 08, 2011 2:44 AM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; tony at atomide.com; linux-arm- kernel at lists.infradead.org; Paul Walmsley
Subject: Re: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'

Santosh Shilimkar <[email protected]> writes:

[...]

Quoted 5 lines
Quoted 5 lines

I think it would be best to use WARN() on these, rather than WARN_ONCE(). That's because these could be called from different parts of the code base, and the stack backtrace will help someone figure out all the code that needs to be fixed.

Quoted 7 lines
Quoted 4 lines

Once you do that, this patch is

With WARN() instead of WARN_ONCE() and Paul's ack, here is an updated patch.

Quoted 8 lines

Thanks, will queue for .38-rc cycle.

I'll again plead for working on your git-send-email setup. It looks like your using outlook. The inline patch is wrapped (as outlook almost
always does.) The attached version applied fine, but the strong preference is for a single inline patch.

Its google mail now a days. I thought it will wrap and hence attached the version.

Fully agree with inline patch but as this one was minor update I skipped it.

Regards
Santosh

#10 lore raw

PATCH v2 3/5 omap2plus: voltage: Trivial warning fix 'no return statement'

In reply to Santosh Shilimkar

Fix below build warnings

CC arch/arm/mach-omap2/common.o
CC arch/arm/mach-omap2/gpio.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,

                 from arch/arm/mach-omap2/gpio.c:25:

arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
CC arch/arm/mach-omap2/dma.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,

                 from arch/arm/mach-omap2/dma.c:32:

arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
CC arch/arm/mach-omap2/wd_timer.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,

                 from arch/arm/mach-omap2/wd_timer.c:15:

arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
CC arch/arm/mach-omap2/prm44xx.o
CC arch/arm/mach-omap2/omap_hwmod.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,

                 from arch/arm/mach-omap2/omap_hwmod.c:145:

arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
from arch/arm/mach-omap2/omap_hwmod_common_data.c:20:
arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void

The error is reported when omap2plus_defconfig built with CONFIG_PM disabled

Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Nishanth Menon <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/plat-omap/include/plat/voltage.h +4 -1
index 0ff1233..9943c66 100644
@@ -134,7 +134,10 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm,
 int omap_voltage_late_init(void);
 #else
 static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
-		struct omap_volt_pmic_info *pmic_info) {}
+		struct omap_volt_pmic_info *pmic_info)
+{
+	return -EINVAL;
+}
 static inline  void omap_change_voltscale_method(struct voltagedomain *voltdm,
 		int voltscale_method) {}
 static inline int omap_voltage_late_init(void)
Signature · 1 line
1.6.0.4
#11 lore raw

PATCH v2 4/5 omap2plus: voltage: Trivial linking fix 'undefined reference'

In reply to Santosh Shilimkar

LD init/built-in.o
LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `omap2_set_init_voltage':
arch/arm/mach-omap2/pm.c:181: undefined reference to omap_voltage_domain_lookup' arch/arm/mach-omap2/built-in.o: In function omap4_twl_init':
arch/arm/mach-omap2/omap_twl.c:244: undefined reference to omap_voltage_domain_lookup' arch/arm/mach-omap2/omap_twl.c:247: undefined reference to omap_voltage_domain_lookup' arch/arm/mach-omap2/omap_twl.c:250: undefined reference to `omap_voltage_domain_lookup'
make: *** [.tmp_vmlinux1] Error 1

The error is reported when omap2plus_defconfig built with CONFIG_PM disabled

Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Nishanth Menon <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/plat/voltage.h +7 -3
index 9943c66..4b02227 100644
@@ -65,9 +65,6 @@ struct voltagedomain {
 	char *name;
 };
 
-/* API to get the voltagedomain pointer */
-struct voltagedomain *omap_voltage_domain_lookup(char *name);
-
 /**
  * struct omap_volt_data - Omap voltage specific data.
  * @voltage_nominal:	The possible voltage value in uV
@@ -131,6 +128,9 @@ int omap_voltage_register_pmic(struct voltagedomain *voltdm,
 		struct omap_volt_pmic_info *pmic_info);
 void omap_change_voltscale_method(struct voltagedomain *voltdm,
 		int voltscale_method);
+/* API to get the voltagedomain pointer */
+struct voltagedomain *omap_voltage_domain_lookup(char *name);
+
 int omap_voltage_late_init(void);
 #else
 static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
@@ -144,6 +144,10 @@ static inline int omap_voltage_late_init(void)
 {
 	return -EINVAL;
 }
+static inline struct voltagedomain *omap_voltage_domain_lookup(char *name)
+{
+	return ERR_PTR(-EINVAL);
+}
 #endif
 
 #endif
Signature · 1 line
1.6.0.4
#12 lore raw

PATCH v2 5/5 omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

In reply to Santosh Shilimkar

CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
from arch/arm/mach-omap2/omap_hwmod_common_data.c:20:
arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_late_init':
arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL' undeclared (first use in this function) arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each undeclared identifier is reported only once arch/arm/plat-omap/include/plat/voltage.h:145: error: for each function it appears in.) make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

The error is reported when omap2plus_defconfig built with CONFIG_PM disabled

Cc Thara Gopinath <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Nishanth Menon <[email protected]>
---
 arch/arm/plat-omap/include/plat/voltage.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/plat/voltage.h +2 -0
index 4b02227..5bd204e 100644
@@ -14,6 +14,8 @@
 #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
 
+#include <linux/err.h>
+
 #define VOLTSCALE_VPFORCEUPDATE		1
 #define VOLTSCALE_VCBYPASS		2
 
Signature · 1 line
1.6.0.4
#13 lore raw

PATCH v2 5/5 omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared

Quoted 9 lines · Santosh Shilimkar

CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
from arch/arm/mach-omap2/omap_hwmod_common_data.c:20:
arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_late_init':
arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL' undeclared (first use in this function) arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each undeclared identifier is reported only once arch/arm/plat-omap/include/plat/voltage.h:145: error: for each function it appears in.) make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

The correct include for this is linux/errno.h, not linux/err.h - you want the errno definitions, not the IS_ERR/PTR_ERR/ERR_PTR stuff.

#14 lore raw

PATCH v2 5/5 omap2plus: voltage: Trivial linking fix for'EINVAL' undeclared

Quoted 22 lines

-----Original Message-----
From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
Sent: Wednesday, January 05, 2011 4:50 PM
To: Santosh Shilimkar
Cc: linux-omap at vger.kernel.org; khilman at ti.com; Nishanth Menon; tony at atomide.com; Kevin Hilman; Thara Gopinath; linux-arm- kernel at lists.infradead.org
Subject: Re: [PATCH v2 5/5] omap2plus: voltage: Trivial linking fix for'EINVAL' undeclared

Quoted 2 lines · Santosh Shilimkar

CC arch/arm/mach-omap2/omap_hwmod_common_data.o
In file included from arch/arm/plat-

omap/include/plat/omap_hwmod.h:38,

Quoted 1 line

from arch/arm/mach-

omap2/omap_hwmod_common_data.c:20:

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h: In function

'omap_voltage_late_init':

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL'

undeclared (first use in this function)

Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each

undeclared identifier is reported only once

Quoted 8 lines
Quoted 1 line

arch/arm/plat-omap/include/plat/voltage.h:145: error: for each

function it appears in.)

Quoted 1 line

make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error

1

Quoted 1 line

make: *** [arch/arm/mach-omap2] Error 2

The correct include for this is linux/errno.h, not linux/err.h - you want the errno definitions, not the IS_ERR/PTR_ERR/ERR_PTR stuff.

In this series, newly added stub of 'omap_voltage_domain_lookup' in [PATCH v2 4/5] make use of 'ERR_PTR' which needs linux/err.h.

Regards
Santosh

#15 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

In reply to Santosh Shilimkar

Hi Santosh,

Quoted 3 lines · Santosh Shilimkar

struct clockdomain member clktrctrl_mask is available for only for OMAP2 and OMAP3 architectures. Technially it is also used only for these archs but this breaks the build with custom OMAP4 configuration.

I'll queue patches 3-5 for the 2.6.38-rc fixes cycle.

With Paul's ack, I can queue the others too, or Paul can decide to take them via his tree. Paul can decide.

Kevin

maintainer
#16 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

Quoted 10 lines · Kevin Hilman
Quoted 3 lines · Santosh Shilimkar

struct clockdomain member clktrctrl_mask is available for only for OMAP2 and OMAP3 architectures. Technially it is also used only for these archs but this breaks the build with custom OMAP4 configuration.

I'll queue patches 3-5 for the 2.6.38-rc fixes cycle.

With Paul's ack, I can queue the others too, or Paul can decide to take them via his tree. Paul can decide.

I've acked one and requested minor changes on the other, after which it can be acked by me. You're welcome to take them at that point. Just a request, maybe you can post a branch with just these patches in them; that way Rajendra and/or I can rebase his new clockdomain changes on it until -rc1 comes out.

- Paul

#17 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

Quoted 10 lines · Paul Walmsley
Quoted 8 lines · Kevin Hilman
Quoted 3 lines · Santosh Shilimkar

struct clockdomain member clktrctrl_mask is available for only for OMAP2 and OMAP3 architectures. Technially it is also used only for these archs but this breaks the build with custom OMAP4 configuration.

I'll queue patches 3-5 for the 2.6.38-rc fixes cycle.

Quoted 8 lines
Quoted 2 lines

With Paul's ack, I can queue the others too, or Paul can decide to take them via his tree. Paul can decide.

I've acked one and requested minor changes on the other, after which it can be acked by me. You're welcome to take them at that point. Just a request, maybe you can post a branch with just these patches in them; that way Rajendra and/or I can rebase his new clockdomain changes on it until -rc1 comes out.

Sure, will do.

I currently have a 'fixes-for-tony' branch in my tree which has all the fixes I've collected for the -rc cycle.

If you prefer something separate with only the prm and clockdomain patches from this series, I can do that as well.

Kevin

#18 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

Quoted 2 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org

[mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Kevin Hilman

Quoted 3 lines

Sent: Thursday, January 06, 2011 11:58 PM
To: Paul Walmsley
Cc: Santosh Shilimkar; linux-omap at vger.kernel.org; tony at atomide.com;

linux-arm-kernel at lists.infradead.org

Quoted 1 line

Subject: Re: [PATCH v2 1/5] omap2plus: clockdomain: Trivial fix for

build break because of clktrctrl_mask

Quoted 8 lines
Quoted 5 lines · Paul Walmsley
Quoted 3 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar

struct clockdomain member clktrctrl_mask is available for only for

OMAP2

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

and OMAP3 architectures. Technially it is also used only for these

archs

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

but this breaks the build with custom OMAP4 configuration.

I'll queue patches 3-5 for the 2.6.38-rc fixes cycle.

With Paul's ack, I can queue the others too, or Paul can decide to

take

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

them via his tree. Paul can decide.

I've acked one and requested minor changes on the other, after which

it

Quoted 1 line
Quoted 1 line

can be acked by me. You're welcome to take them at that point. Just

a

Quoted 1 line
Quoted 1 line

request, maybe you can post a branch with just these patches in them;

that

Quoted 1 line
Quoted 1 line

way Rajendra and/or I can rebase his new clockdomain changes on it

until

Quoted 3 lines
Quoted 1 line

-rc1 comes out.

Sure, will do.

Just another trivial fix.

#19 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

Rajendra Nayak <[email protected]> writes:

[...]

Quoted 21 lines

Just another trivial fix.

From bb46b74d2b0ab3d35e72b760da7e123a891e6813 Mon Sep 17 00:00:00 2001
From: Rajendra Nayak <[email protected]>
Date: Fri, 7 Jan 2011 14:07:25 +0530
Subject: [PATCH] OMAP: powerdomain: remove unused func declaration

Trivial fix to remove the unused function declaration from the powerdomain header.

---
 arch/arm/mach-omap2/powerdomain.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.h +0 -0
index c66431e..0b7a357 100644

arch/arm/mach-omap2/powerdomain.h struct pwrdm_ops { · line 169

Quoted 6 lines
arch/arm/mach-omap2/powerdomain.h +0 -1
@@ -165,7 +165,6 @@ struct pwrdm_ops {
 	int	(*pwrdm_wait_transition)(struct powerdomain *pwrdm);
 };
 
-void pwrdm_fw_init(void);
 void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops
 *custom_funcs);

Note this is line-wrapped.

Looks like you need to get get-send-email setup so you can avoid having the patch sending problems.

arch/arm/mach-omap2/powerdomain.h struct pwrdm_ops { · line 170

Quoted 2 lines
arch/arm/mach-omap2/powerdomain.h +0 -0
 struct powerdomain *pwrdm_lookup(const char *name);

In any case, with Paul's ack, I can queue this with the others.

Kevin

maintainer
#20 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

Hi Kevin

Quoted 34 lines · Kevin Hilman

Rajendra Nayak <[email protected]> writes:

[...]

Quoted 21 lines

Just another trivial fix.

From bb46b74d2b0ab3d35e72b760da7e123a891e6813 Mon Sep 17 00:00:00 2001
From: Rajendra Nayak <[email protected]>
Date: Fri, 7 Jan 2011 14:07:25 +0530
Subject: [PATCH] OMAP: powerdomain: remove unused func declaration

Trivial fix to remove the unused function declaration from the powerdomain header.

---
 arch/arm/mach-omap2/powerdomain.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.h +0 -0
index c66431e..0b7a357 100644

arch/arm/mach-omap2/powerdomain.h struct pwrdm_ops { · line 169

Quoted 6 lines
arch/arm/mach-omap2/powerdomain.h +0 -1
@@ -165,7 +165,6 @@ struct pwrdm_ops {
 	int	(*pwrdm_wait_transition)(struct powerdomain *pwrdm);
 };
 
-void pwrdm_fw_init(void);
 void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops
 *custom_funcs);

Note this is line-wrapped.

Quoted 7 lines

Looks like you need to get get-send-email setup so you can avoid having the patch sending problems.

arch/arm/mach-omap2/powerdomain.h struct pwrdm_ops { · line 170

Quoted 2 lines
arch/arm/mach-omap2/powerdomain.h +0 -0
 struct powerdomain *pwrdm_lookup(const char *name);

In any case, with Paul's ack, I can queue this with the others.

Normally I would wait for the .39 merge window with something like this, but you're welcome to queue it for the -rc fixes if you feel it's appropriate:

- Paul

#21 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

Quoted 40 lines · Paul Walmsley
Quoted 38 lines · Kevin Hilman

Rajendra Nayak <[email protected]> writes:

[...]

Quoted 21 lines

Just another trivial fix.

From bb46b74d2b0ab3d35e72b760da7e123a891e6813 Mon Sep 17 00:00:00 2001
From: Rajendra Nayak <[email protected]>
Date: Fri, 7 Jan 2011 14:07:25 +0530
Subject: [PATCH] OMAP: powerdomain: remove unused func declaration

Trivial fix to remove the unused function declaration from the powerdomain header.

---
 arch/arm/mach-omap2/powerdomain.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.h +0 -0
index c66431e..0b7a357 100644

arch/arm/mach-omap2/powerdomain.h struct pwrdm_ops { · line 169

Quoted 6 lines
arch/arm/mach-omap2/powerdomain.h +0 -1
@@ -165,7 +165,6 @@ struct pwrdm_ops {
 	int	(*pwrdm_wait_transition)(struct powerdomain *pwrdm);
 };
 
-void pwrdm_fw_init(void);
 void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops
 *custom_funcs);

Note this is line-wrapped.

Looks like you need to get get-send-email setup so you can avoid having the patch sending problems.

Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

struct powerdomain *pwrdm_lookup(const char *name);

In any case, with Paul's ack, I can queue this with the others.

Normally I would wait for the .39 merge window with something like this, but you're welcome to queue it for the -rc fixes if you feel it's appropriate:

Yeah, I agree. I'll let you queue this one for .39 as it's not really a fix.

Kevin

#22 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

In reply to Kevin Hilman

Hi Kevin,

Quoted 5 lines

-----Original Message-----
From: Kevin Hilman [mailto:khilman at ti.com]
Sent: Saturday, January 08, 2011 2:35 AM
To: Rajendra Nayak
Cc: Paul Walmsley; Santosh Shilimkar; linux-omap at vger.kernel.org;

tony at atomide.com; linux-arm-

Quoted 2 lines

kernel at lists.infradead.org
Subject: Re: [PATCH v2 1/5] omap2plus: clockdomain: Trivial fix for

build break because of clktrctrl_mask

Quoted 29 lines

Rajendra Nayak <[email protected]> writes:

[...]

Quoted 24 lines

Just another trivial fix.

From bb46b74d2b0ab3d35e72b760da7e123a891e6813 Mon Sep 17 00:00:00 2001
From: Rajendra Nayak <[email protected]>
Date: Fri, 7 Jan 2011 14:07:25 +0530
Subject: [PATCH] OMAP: powerdomain: remove unused func declaration

Trivial fix to remove the unused function declaration from the powerdomain header.

---
 arch/arm/mach-omap2/powerdomain.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.h +0 -0
index c66431e..0b7a357 100644
@@ -165,7 +165,6 @@ struct pwrdm_ops {
 	int	(*pwrdm_wait_transition)(struct powerdomain *pwrdm);
 };
 
Quoted 8 lines

arch/arm/mach-omap2/powerdomain.h struct pwrdm_ops { · line 169

Quoted 3 lines
arch/arm/mach-omap2/powerdomain.h +0 -1
-void pwrdm_fw_init(void);
 void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops
 *custom_funcs);

Note this is line-wrapped.

Looks like you need to get get-send-email setup so you can avoid having the patch sending problems.

Sorry, I seemed to have completely missed this one. Will repost.

Thanks,
Rajendra

Quoted 7 lines

arch/arm/mach-omap2/powerdomain.h struct pwrdm_ops { · line 170

Quoted 3 lines
arch/arm/mach-omap2/powerdomain.h +0 -0
 struct powerdomain *pwrdm_lookup(const char *name);

In any case, with Paul's ack, I can queue this with the others.

Kevin

maintainer
#23 lore raw

PATCH v2 1/5 omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask

In reply to Santosh Shilimkar
Quoted 3 lines · Santosh Shilimkar

struct clockdomain member clktrctrl_mask is available for only for OMAP2 and OMAP3 architectures. Technially it is also used only for these archs but this breaks the build with custom OMAP4 configuration.

...

Quoted 4 lines

Fix the build break by dropping the #ifdef as suggested by Paul Walmsley

- Paul