diff mbox

OMAP2-only kernel compile broken

Message ID 20110710095216.GN31978@legolas.emea.dhcp.ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Felipe Balbi July 10, 2011, 9:52 a.m. UTC
Hi,

On Sat, Jul 09, 2011 at 07:57:20PM -0600, Paul Walmsley wrote:
> Hello Hema, Felipe,
> 
> Commits 208466dc10083e734a8af71d10f923ee4bff950c ("usb: otg:
> OMAP4430: Powerdown the internal PHY when USB is disabled") and
> fb91cde49c327ff957c55d91805bc6abda59b311 ("usb: musb: OMAP4430:
> Power down the PHY during board init") break compilation on OMAP2:
> 
>   LD      .tmp_vmlinux1
> arch/arm/mach-omap2/built-in.o:(.data+0x7ce0): undefined reference to `omap4430_phy_init'
> arch/arm/mach-omap2/built-in.o:(.data+0x7ce4): undefined reference to `omap4430_phy_exit'
> arch/arm/mach-omap2/built-in.o:(.data+0x7ce8): undefined reference to `omap4430_phy_power'
> arch/arm/mach-omap2/built-in.o:(.data+0x7cec): undefined reference to `omap4430_phy_set_clk'
> arch/arm/mach-omap2/built-in.o:(.data+0x7cf0): undefined reference to `omap4430_phy_suspend'
> make: *** [.tmp_vmlinux1] Error 1
> 
> 
> Could you please figure out a clean way to fix this for the 3.1 rc series?

Patch attached, if you want to queue it for the merge window.

Comments

Santosh Shilimkar July 10, 2011, 10:35 a.m. UTC | #1
Felipe,

On 7/10/2011 2:52 AM, Felipe Balbi wrote:
> From: Felipe Balbi<balbi@ti.com>
> Date: Sun, 10 Jul 2011 12:22:20 +0300
> Subject: [PATCH] usb: musb: fix build breakage
> Organization: Texas Instruments\n
>
> This patch fixes the compilation brekage which
> commits 208466dc ("usb: otg:OMAP4430: Powerdown
> the internal PHY when USB is disabled") and
> fb91cde4 ("usb: musb: OMAP4430: Power down
> the PHY during board init") introduced when
> building a OMAP2-only kernel.
>
>    LD      .tmp_vmlinux1
> arch/arm/mach-omap2/built-in.o:(.data+0x7ce0): undefined reference to
> +`omap4430_phy_init'
> arch/arm/mach-omap2/built-in.o:(.data+0x7ce4): undefined reference to
> +`omap4430_phy_exit'
> arch/arm/mach-omap2/built-in.o:(.data+0x7ce8): undefined reference to
> +`omap4430_phy_power'
> arch/arm/mach-omap2/built-in.o:(.data+0x7cec): undefined reference to
> +`omap4430_phy_set_clk'
> arch/arm/mach-omap2/built-in.o:(.data+0x7cf0): undefined reference to
> +`omap4430_phy_suspend'
> make: *** [.tmp_vmlinux1] Error 1
>
> Cc:stable@kernel.org
> Reported-by: Paul Walmsley<paul@pwsan.com>
> Signed-off-by: Felipe Balbi<balbi@ti.com>
> ---
>   arch/arm/plat-omap/include/plat/usb.h |   14 ++++++++++++++
>   1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
> index 17d3c93..99dd64e 100644
> --- a/arch/arm/plat-omap/include/plat/usb.h
> +++ b/arch/arm/plat-omap/include/plat/usb.h
> @@ -103,11 +103,25 @@ extern void usbhs_init(const struct usbhs_omap_board_data *pdata);
>   extern int omap_usbhs_enable(struct device *dev);
>   extern void omap_usbhs_disable(struct device *dev);
>
> +#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_ARCH_OMAP3)
>   extern int omap4430_phy_power(struct device *dev, int ID, int on);
>   extern int omap4430_phy_set_clk(struct device *dev, int on);
>   extern int omap4430_phy_init(struct device *dev);
>   extern int omap4430_phy_exit(struct device *dev);
>   extern int omap4430_phy_suspend(struct device *dev, int suspend);
The comment is not related to this patch, but are above functions
limited to _omap4430_ only or omap446x may also need them. If the
phy is same on all OMAP4 devices, then another patch with renaming
all these functions to omap4_* should be done. Or even better is
make use of phy IP name itslef.

Regrads,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Walmsley July 10, 2011, 11:43 a.m. UTC | #2
On Sun, 10 Jul 2011, Felipe Balbi wrote:

> On Sat, Jul 09, 2011 at 07:57:20PM -0600, Paul Walmsley wrote:
> > Hello Hema, Felipe,
> > 
> > Commits 208466dc10083e734a8af71d10f923ee4bff950c ("usb: otg:
> > OMAP4430: Powerdown the internal PHY when USB is disabled") and
> > fb91cde49c327ff957c55d91805bc6abda59b311 ("usb: musb: OMAP4430:
> > Power down the PHY during board init") break compilation on OMAP2:
> > 
> >   LD      .tmp_vmlinux1
> > arch/arm/mach-omap2/built-in.o:(.data+0x7ce0): undefined reference to `omap4430_phy_init'
> > arch/arm/mach-omap2/built-in.o:(.data+0x7ce4): undefined reference to `omap4430_phy_exit'
> > arch/arm/mach-omap2/built-in.o:(.data+0x7ce8): undefined reference to `omap4430_phy_power'
> > arch/arm/mach-omap2/built-in.o:(.data+0x7cec): undefined reference to `omap4430_phy_set_clk'
> > arch/arm/mach-omap2/built-in.o:(.data+0x7cf0): undefined reference to `omap4430_phy_suspend'
> > make: *** [.tmp_vmlinux1] Error 1
> > 
> > 
> > Could you please figure out a clean way to fix this for the 3.1 rc series?
> 
> Patch attached, if you want to queue it for the merge window.

This patch doesn't build when based on the arm-soc omap/cleanup branch.

arch/arm/mach-omap2/twl-common.c:55:19: error: 'omap4430_phy_set_clk' 
undeclared here (not in a function)

- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Felipe Balbi July 11, 2011, 6:21 a.m. UTC | #3
Hi,

On Sun, Jul 10, 2011 at 05:43:23AM -0600, Paul Walmsley wrote:
> On Sun, 10 Jul 2011, Felipe Balbi wrote:
> 
> > On Sat, Jul 09, 2011 at 07:57:20PM -0600, Paul Walmsley wrote:
> > > Hello Hema, Felipe,
> > > 
> > > Commits 208466dc10083e734a8af71d10f923ee4bff950c ("usb: otg:
> > > OMAP4430: Powerdown the internal PHY when USB is disabled") and
> > > fb91cde49c327ff957c55d91805bc6abda59b311 ("usb: musb: OMAP4430:
> > > Power down the PHY during board init") break compilation on OMAP2:
> > > 
> > >   LD      .tmp_vmlinux1
> > > arch/arm/mach-omap2/built-in.o:(.data+0x7ce0): undefined reference to `omap4430_phy_init'
> > > arch/arm/mach-omap2/built-in.o:(.data+0x7ce4): undefined reference to `omap4430_phy_exit'
> > > arch/arm/mach-omap2/built-in.o:(.data+0x7ce8): undefined reference to `omap4430_phy_power'
> > > arch/arm/mach-omap2/built-in.o:(.data+0x7cec): undefined reference to `omap4430_phy_set_clk'
> > > arch/arm/mach-omap2/built-in.o:(.data+0x7cf0): undefined reference to `omap4430_phy_suspend'
> > > make: *** [.tmp_vmlinux1] Error 1
> > > 
> > > 
> > > Could you please figure out a clean way to fix this for the 3.1 rc series?
> > 
> > Patch attached, if you want to queue it for the merge window.
> 
> This patch doesn't build when based on the arm-soc omap/cleanup branch.
> 
> arch/arm/mach-omap2/twl-common.c:55:19: error: 'omap4430_phy_set_clk' 
> undeclared here (not in a function)

What on earth is arm-soc omap/cleanup branch ? I generally base my
patches off of Linus' tags. This one in particular was based off of
3.0-rc6 (or -rc5, can't quite remember). Where is this particular branch
I should base off ?
Paul Walmsley July 11, 2011, 6:31 a.m. UTC | #4
On Mon, 11 Jul 2011, Felipe Balbi wrote:

> What on earth is arm-soc omap/cleanup branch ? I generally base my
> patches off of Linus' tags. This one in particular was based off of
> 3.0-rc6 (or -rc5, can't quite remember). Where is this particular branch
> I should base off ?

git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc.git 

This is Tony's new upstream tree.

Branch is 'omap/cleanup' in this case.


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Walmsley July 11, 2011, 6:42 a.m. UTC | #5
On Mon, 11 Jul 2011, Paul Walmsley wrote:

> git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc.git 
> 
> This is Tony's new upstream tree.

I guess this was unclear.  This is the tree that is maintained by Arnd, 
Nico, etc., and that Tony and some of the other ARM maintainers are 
submitting branches to.


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Felipe Balbi July 11, 2011, 6:43 a.m. UTC | #6
On Mon, Jul 11, 2011 at 12:31:30AM -0600, Paul Walmsley wrote:
> On Mon, 11 Jul 2011, Felipe Balbi wrote:
> 
> > What on earth is arm-soc omap/cleanup branch ? I generally base my
> > patches off of Linus' tags. This one in particular was based off of
> > 3.0-rc6 (or -rc5, can't quite remember). Where is this particular branch
> > I should base off ?
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc.git 
> 
> This is Tony's new upstream tree.
> 
> Branch is 'omap/cleanup' in this case.

Ok, thanks for letting me know.

Tony, should we *always* base patches for you off of that tree ??
Tony Lindgren July 11, 2011, 8:26 a.m. UTC | #7
* Felipe Balbi <balbi@ti.com> [110710 23:38]:
> On Mon, Jul 11, 2011 at 12:31:30AM -0600, Paul Walmsley wrote:
> > On Mon, 11 Jul 2011, Felipe Balbi wrote:
> > 
> > > What on earth is arm-soc omap/cleanup branch ? I generally base my
> > > patches off of Linus' tags. This one in particular was based off of
> > > 3.0-rc6 (or -rc5, can't quite remember). Where is this particular branch
> > > I should base off ?
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc.git 
> > 
> > This is Tony's new upstream tree.
> > 
> > Branch is 'omap/cleanup' in this case.

Please don't use those branches for basing patches unless specifically
agreed on.

> Ok, thanks for letting me know.
> 
> Tony, should we *always* base patches for you off of that tree ??

No please don't. Arnd will merge things into those branches to build
his topic specif branches for merging. Always use mainline Linux tags
where possible, or static branches in linux-omap tree that have been
specifically pointed out.

We want to keep dependencies to other trees minimal as they may pull
in other patches too. It also makes it harder to keep track of the
the omap specific code, and makes it harder to do topic specific pull
requests easily.

For example, most patches done against current devel-board should
merge fine with everything else.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Felipe Balbi July 11, 2011, 9:24 a.m. UTC | #8
Hi,

On Mon, Jul 11, 2011 at 01:26:50AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [110710 23:38]:
> > On Mon, Jul 11, 2011 at 12:31:30AM -0600, Paul Walmsley wrote:
> > > On Mon, 11 Jul 2011, Felipe Balbi wrote:
> > > 
> > > > What on earth is arm-soc omap/cleanup branch ? I generally base my
> > > > patches off of Linus' tags. This one in particular was based off of
> > > > 3.0-rc6 (or -rc5, can't quite remember). Where is this particular branch
> > > > I should base off ?
> > > 
> > > git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc.git 
> > > 
> > > This is Tony's new upstream tree.
> > > 
> > > Branch is 'omap/cleanup' in this case.
> 
> Please don't use those branches for basing patches unless specifically
> agreed on.
> 
> > Ok, thanks for letting me know.
> > 
> > Tony, should we *always* base patches for you off of that tree ??
> 
> No please don't. Arnd will merge things into those branches to build
> his topic specif branches for merging. Always use mainline Linux tags
> where possible, or static branches in linux-omap tree that have been
> specifically pointed out.
> 
> We want to keep dependencies to other trees minimal as they may pull
> in other patches too. It also makes it harder to keep track of the
> the omap specific code, and makes it harder to do topic specific pull
> requests easily.
> 
> For example, most patches done against current devel-board should
> merge fine with everything else.

good to know, I checked that the v2 I sent for Paul applies fine on
3.0-rc6, so there shouldn't be any issues ;-)
Paul Walmsley Aug. 15, 2011, 3:44 p.m. UTC | #9
Hi Felipe, Hema,

just wanted to send a quick note - sorry to misidentify your patches as 
the proximate cause of the compile breakage described in this thread.  As 
RMK mentioned, I should have nagged Péter instead :-)


- Paul
Felipe Balbi Aug. 15, 2011, 4:02 p.m. UTC | #10
Hi,

On Mon, Aug 15, 2011 at 09:44:25AM -0600, Paul Walmsley wrote:
> just wanted to send a quick note - sorry to misidentify your patches as 
> the proximate cause of the compile breakage described in this thread.  As 
> RMK mentioned, I should have nagged Péter instead :-)

np
diff mbox

Patch

From 0b355cb203be6efe839f60edfc29c8ccf8048e4a Mon Sep 17 00:00:00 2001
From: Felipe Balbi <balbi@ti.com>
Date: Sun, 10 Jul 2011 12:22:20 +0300
Subject: [PATCH] usb: musb: fix build breakage
Organization: Texas Instruments\n

This patch fixes the compilation brekage which
commits 208466dc ("usb: otg:OMAP4430: Powerdown
the internal PHY when USB is disabled") and
fb91cde4 ("usb: musb: OMAP4430: Power down
the PHY during board init") introduced when
building a OMAP2-only kernel.

  LD      .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o:(.data+0x7ce0): undefined reference to
+`omap4430_phy_init'
arch/arm/mach-omap2/built-in.o:(.data+0x7ce4): undefined reference to
+`omap4430_phy_exit'
arch/arm/mach-omap2/built-in.o:(.data+0x7ce8): undefined reference to
+`omap4430_phy_power'
arch/arm/mach-omap2/built-in.o:(.data+0x7cec): undefined reference to
+`omap4430_phy_set_clk'
arch/arm/mach-omap2/built-in.o:(.data+0x7cf0): undefined reference to
+`omap4430_phy_suspend'
make: *** [.tmp_vmlinux1] Error 1

Cc: stable@kernel.org
Reported-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/plat-omap/include/plat/usb.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 17d3c93..99dd64e 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -103,11 +103,25 @@  extern void usbhs_init(const struct usbhs_omap_board_data *pdata);
 extern int omap_usbhs_enable(struct device *dev);
 extern void omap_usbhs_disable(struct device *dev);
 
+#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_ARCH_OMAP3)
 extern int omap4430_phy_power(struct device *dev, int ID, int on);
 extern int omap4430_phy_set_clk(struct device *dev, int on);
 extern int omap4430_phy_init(struct device *dev);
 extern int omap4430_phy_exit(struct device *dev);
 extern int omap4430_phy_suspend(struct device *dev, int suspend);
+#else
+static inline int omap4430_phy_power(struct device *d, int i, int o)
+{  return 0;  }
+static inline int omap4430_phy_set_clock(struct device *d, int o)
+{  return 0;  }
+static inline int omap4430_phy_init(struct device *d)
+{  return 0;  }
+static inline int omap4430_phy_exit(struct device *d)
+{  return 0;  }
+static inline int omap4430_phy_suspend(struct device *d, int s)
+{  return 0;  }
+#endif
+
 #endif
 
 extern void am35x_musb_reset(void);
-- 
1.7.6