From patchwork Sun Jul 10 09:52:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 960982 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6A9qRDv022579 for ; Sun, 10 Jul 2011 09:52:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755587Ab1GJJwZ (ORCPT ); Sun, 10 Jul 2011 05:52:25 -0400 Received: from na3sys009aog120.obsmtp.com ([74.125.149.140]:49846 "EHLO na3sys009aog120.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755528Ab1GJJwZ (ORCPT ); Sun, 10 Jul 2011 05:52:25 -0400 Received: from mail-bw0-f49.google.com ([209.85.214.49]) (using TLSv1) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKThl2VzfY/pv2MXVpQo599OrVZ4QjBayV@postini.com; Sun, 10 Jul 2011 02:52:24 PDT Received: by bwf12 with SMTP id 12so4213840bwf.22 for ; Sun, 10 Jul 2011 02:52:22 -0700 (PDT) Received: by 10.205.83.14 with SMTP id ae14mr757493bkc.156.1310291542093; Sun, 10 Jul 2011 02:52:22 -0700 (PDT) Received: from localhost (cs181221225.pp.htv.fi [82.181.221.225]) by mx.google.com with ESMTPS id r24sm713935bkr.59.2011.07.10.02.52.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 10 Jul 2011 02:52:20 -0700 (PDT) Date: Sun, 10 Jul 2011 12:52:18 +0300 From: Felipe Balbi To: Paul Walmsley Cc: balbi@ti.com, hemahk@ti.com, tony@atomide.com, linux-omap@vger.kernel.org Subject: Re: OMAP2-only kernel compile broken Message-ID: <20110710095216.GN31978@legolas.emea.dhcp.ti.com> Reply-To: balbi@ti.com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 10 Jul 2011 09:52:27 +0000 (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. From 0b355cb203be6efe839f60edfc29c8ccf8048e4a Mon Sep 17 00:00:00 2001 From: Felipe Balbi 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 Signed-off-by: Felipe Balbi --- 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