Skip to contentSkip to conversation

ARM: OMAP2+: PRM: fix compile for OMAP4-only build

PATCH New Kevin Hilman 3 participants 6 messages Apr 5, 2012 – Apr 9, 2012

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

PATCH 1/1 ARM: OMAP2+: PRM: fix compile for OMAP4-only build

For OMAP4 only builds, the omap2_prm_* functions have dummy wrappers to detect incorrect usage. However, several unrelated omap3 PRM functions have made it inside the #else clause of the #ifdef wrapping the omap2_prm stubs, causing them to disappear on OMAP4-only builds.

This was unnoticed until the IO chain support was added and introduced a new function in this section which is referenced by omap_hwmod.c:

/work/kernel/omap/dev/arch/arm/mach-omap2/omap_hwmod.c: In function '_reconfigure_io_chain':
/work/kernel/omap/dev/arch/arm/mach-omap2/omap_hwmod.c:1665:3: error: implicit declaration of function 'omap3xxx_prm_reconfigure_io_chain' [-Werror=implicit-fungiction-declaration]

Fix by using the #ifdef to only wrap the omap2_prm functions that need stubs on OMAP4-only builds.

---
Paul, this patch applies on top your io_chain_devel_3.5 branch.

 arch/arm/mach-omap2/prm2xxx_3xxx.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/prm2xxx_3xxx.h +2 -2
index 1ba3d65..a8c946f 100644
@@ -303,6 +303,8 @@ 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 rst_shift, u8 st_shift);
 
+#endif	/* CONFIG_ARCH_OMAP4 */
+
 /* OMAP3-specific VP functions */
 u32 omap3_prm_vp_check_txdone(u8 vp_id);
 void omap3_prm_vp_clear_txdone(u8 vp_id);
@@ -323,8 +325,6 @@ extern void omap3xxx_prm_ocp_barrier(void);
 extern void omap3xxx_prm_save_and_clear_irqen(u32 *saved_mask);
 extern void omap3xxx_prm_restore_irqen(u32 *saved_mask);
 
-#endif	/* CONFIG_ARCH_OMAP4 */
-
 #endif
 
 /*
Signature · 1 line
1.7.9.2
maintainer
#1 lore raw

PATCH 1/1 ARM: OMAP2+: PRM: fix compile for OMAP4-only build

Quoted 11 lines · Kevin Hilman

For OMAP4 only builds, the omap2_prm_* functions have dummy wrappers to detect incorrect usage. However, several unrelated omap3 PRM functions have made it inside the #else clause of the #ifdef wrapping the omap2_prm stubs, causing them to disappear on OMAP4-only builds.

This was unnoticed until the IO chain support was added and introduced a new function in this section which is referenced by omap_hwmod.c:

/work/kernel/omap/dev/arch/arm/mach-omap2/omap_hwmod.c: In function '_reconfigure_io_chain':
/work/kernel/omap/dev/arch/arm/mach-omap2/omap_hwmod.c:1665:3: error: implicit declaration of function 'omap3xxx_prm_reconfigure_io_chain' [-Werror=implicit-fungiction-declaration]

Quoted 7 lines

Fix by using the #ifdef to only wrap the omap2_prm functions that need stubs on OMAP4-only builds.

---
Paul, this patch applies on top your io_chain_devel_3.5 branch.

Thanks, Tony reported this too. Any objections to me rolling this into the offending patch?

Quoted 1 line

- Paul

maintainer
#2 lore raw

PATCH 1/1 ARM: OMAP2+: PRM: fix compile for OMAP4-only build

Quoted 16 lines · Paul Walmsley
Quoted 14 lines · Kevin Hilman

For OMAP4 only builds, the omap2_prm_* functions have dummy wrappers to detect incorrect usage. However, several unrelated omap3 PRM functions have made it inside the #else clause of the #ifdef wrapping the omap2_prm stubs, causing them to disappear on OMAP4-only builds.

This was unnoticed until the IO chain support was added and introduced a new function in this section which is referenced by omap_hwmod.c:

/work/kernel/omap/dev/arch/arm/mach-omap2/omap_hwmod.c: In function '_reconfigure_io_chain':
/work/kernel/omap/dev/arch/arm/mach-omap2/omap_hwmod.c:1665:3: error: implicit declaration of function 'omap3xxx_prm_reconfigure_io_chain' [-Werror=implicit-fungiction-declaration]

Fix by using the #ifdef to only wrap the omap2_prm functions that need stubs on OMAP4-only builds.

Quoted 7 lines
Quoted 4 lines

---
Paul, this patch applies on top your io_chain_devel_3.5 branch.

Thanks, Tony reported this too. Any objections to me rolling this into the offending patch?

I heard of this first from Kevin before I started hitting it with my compiles..

Anyways, can you also check that we don't have a similar issue with omap44xx_prm_reconfigure_io_chain for omap3 only builds?

Regards,

Tony

maintainer
#3 lore raw

PATCH 1/1 ARM: OMAP2+: PRM: fix compile for OMAP4-only build

Quoted 2 lines · Tony Lindgren

I heard of this first from Kevin before I started hitting it with my compiles..

Okay.

Quoted 2 lines

Anyways, can you also check that we don't have a similar issue with omap44xx_prm_reconfigure_io_chain for omap3 only builds?

Will do. Clearly I need to be running the full build-test suite on all of my branches, as I was doing before the arm-soc transition.

Future pull requests from me will be test-built with a large variety of kernel .configs, and will contain a 'size' report for each generated binary in the pull request.

- Paul

#4 lore raw

PATCH 1/1 ARM: OMAP2+: PRM: fix compile for OMAP4-only build

In reply to Paul Walmsley
Quoted 16 lines · Paul Walmsley
Quoted 14 lines · Kevin Hilman

For OMAP4 only builds, the omap2_prm_* functions have dummy wrappers to detect incorrect usage. However, several unrelated omap3 PRM functions have made it inside the #else clause of the #ifdef wrapping the omap2_prm stubs, causing them to disappear on OMAP4-only builds.

This was unnoticed until the IO chain support was added and introduced a new function in this section which is referenced by omap_hwmod.c:

/work/kernel/omap/dev/arch/arm/mach-omap2/omap_hwmod.c: In function '_reconfigure_io_chain':
/work/kernel/omap/dev/arch/arm/mach-omap2/omap_hwmod.c:1665:3: error: implicit declaration of function 'omap3xxx_prm_reconfigure_io_chain' [-Werror=implicit-fungiction-declaration]

Fix by using the #ifdef to only wrap the omap2_prm functions that need stubs on OMAP4-only builds.

Quoted 7 lines
Quoted 4 lines

---
Paul, this patch applies on top your io_chain_devel_3.5 branch.

Thanks, Tony reported this too. Any objections to me rolling this into the offending patch?

No objections.

Kevin

maintainer
#5 lore raw

PATCH 1/1 ARM: OMAP2+: PRM: fix compile for OMAP4-only build

Quoted 1 line · Kevin Hilman

No objections.

Thanks, I took a closer look at this issue over the weekend, and realized that I had misunderstood it. So, will take this patch as-is, as part of the io_chain_devel_3.5 series; thanks for the great changelog.

Looking forward to dropping these old OMAP2/3 PRM stubs for OMAP4 soon, they've been around for too long :-(

- Paul