Re: OMAP2-only kernel compile broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
balbi
From 0b355cb203be6efe839f60edfc29c8ccf8048e4a Mon Sep 17 00:00:00 2001
From: Felipe Balbi <balbi@xxxxxx>
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@xxxxxxxxxx
Reported-by: Paul Walmsley <paul@xxxxxxxxx>
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
 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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux