diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2012-07-18 11:03:15 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2012-07-18 11:03:15 +0200 |
commit | 328d61af72a8f59f5dc53db8cddf8c8e572ad958 (patch) | |
tree | 8dfc99b1b95162788d2f568210d5617875bfe249 | |
parent | 89878af0faf0c772cec7181783ead0086d8cd310 (diff) |
tegra: fix usb_phy build breakage if gadget as module
Add missing symbol exports to address gcc 4.7.1 from oe-core throwing following errors if usb gadget stuff compiled as modules:
ERROR: "tegra_usb_phy_memory_prefetch_on" [drivers/usb/gadget/fsl_usb2_udc.ko] undefined!
ERROR: "tegra_usb_phy_memory_prefetch_off" [drivers/usb/gadget/fsl_usb2_udc.ko] undefined!
ERROR: "tegra_usb_phy_charger_detect" [drivers/usb/gadget/fsl_usb2_udc.ko] undefined!
ERROR: "tegra_usb_phy_power_off" [drivers/usb/gadget/fsl_usb2_udc.ko] undefined!
ERROR: "tegra_usb_phy_close" [drivers/usb/gadget/fsl_usb2_udc.ko] undefined!
ERROR: "tegra_usb_phy_power_on" [drivers/usb/gadget/fsl_usb2_udc.ko] undefined!
ERROR: "tegra_usb_phy_open" [drivers/usb/gadget/fsl_usb2_udc.ko] undefined!
While at it following build time warning addressed as well:
arch/arm/mach-tegra/usb_phy.c: In function 'utmi_phy_postresume':
arch/arm/mach-tegra/usb_phy.c:1678:16: warning: unused variable 'inst' [-Wunused-variable]
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index a842e38c0d33..c204aa3b49c2 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -1674,8 +1674,8 @@ static int utmi_phy_postresume(struct tegra_usb_phy *phy, bool is_dpd) void __iomem *base = phy->regs; #else void __iomem *pmc_base = IO_ADDRESS(TEGRA_PMC_BASE); -#endif unsigned int inst = phy->instance; +#endif #ifndef CONFIG_ARCH_TEGRA_2x_SOC val = readl(pmc_base + PMC_SLEEP_CFG); @@ -2695,6 +2695,7 @@ err0: kfree(phy); return ERR_PTR(err); } +EXPORT_SYMBOL_GPL(tegra_usb_phy_open); int tegra_usb_phy_power_on(struct tegra_usb_phy *phy, bool is_dpd) { @@ -2725,6 +2726,7 @@ int tegra_usb_phy_power_on(struct tegra_usb_phy *phy, bool is_dpd) phy->power_on = true; return ret; } +EXPORT_SYMBOL_GPL(tegra_usb_phy_power_on); void tegra_usb_phy_power_off(struct tegra_usb_phy *phy, bool is_dpd) { @@ -2754,6 +2756,7 @@ void tegra_usb_phy_power_off(struct tegra_usb_phy *phy, bool is_dpd) } phy->power_on = false; } +EXPORT_SYMBOL_GPL(tegra_usb_phy_power_off); void tegra_usb_phy_preresume(struct tegra_usb_phy *phy, bool remote_wakeup) { @@ -2881,6 +2884,7 @@ void tegra_usb_phy_close(struct tegra_usb_phy *phy) free_irq(usb_phy_data[0].vbus_irq, phy); kfree(phy); } +EXPORT_SYMBOL_GPL(tegra_usb_phy_close); int tegra_usb_phy_bus_connect(struct tegra_usb_phy *phy) { @@ -3148,6 +3152,7 @@ bool tegra_usb_phy_charger_detect(struct tegra_usb_phy *phy) return status; } +EXPORT_SYMBOL_GPL(tegra_usb_phy_charger_detect); #ifndef CONFIG_ARCH_TEGRA_2x_SOC void tegra_usb_phy_power_down_pmc(void) @@ -3230,6 +3235,7 @@ void tegra_usb_phy_memory_prefetch_on(struct tegra_usb_phy *phy) writel(val, ahb_gizmo + AHB_MEM_PREFETCH_CFG2); } } +EXPORT_SYMBOL_GPL(tegra_usb_phy_memory_prefetch_on); void tegra_usb_phy_memory_prefetch_off(struct tegra_usb_phy *phy) { @@ -3245,6 +3251,7 @@ void tegra_usb_phy_memory_prefetch_off(struct tegra_usb_phy *phy) writel(val, ahb_gizmo + AHB_MEM_PREFETCH_CFG2); } } +EXPORT_SYMBOL_GPL(tegra_usb_phy_memory_prefetch_off); /* disable walk and wake events after resume from LP0 */ bool tegra_usb_phy_is_remotewake_detected(struct tegra_usb_phy *phy) |