From ac515ed540e676c426a098aae105f0a400e30c40 Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Wed, 8 Apr 2009 17:12:43 +0300 Subject: [PATCH] PM: OMAP: Fix build with CONFIG_OMAP_PM_NONE set Removes undefined symbol link errors when CONFIG_OMAP_PM is set. The required symbols are defined in common.c and omap-pm.h Dummy variables mpu_oops, dsp_oops and l3_oops have to be defined because they are used in a number of places It fixes the following link errors arch/arm/mach-omap2/built-in.o: In function `omap3_round_to_table_rate': arch/arm/mach-omap2/clock34xx.c:956: undefined reference to `mpu_opps' arch/arm/mach-omap2/clock34xx.c:956: undefined reference to `dsp_opps' arch/arm/mach-omap2/clock34xx.c:956: undefined reference to `l3_opps' arch/arm/mach-omap2/built-in.o: In function `omap2_init_common_hw': arch/arm/mach-omap2/io.c:241: undefined reference to `omap_pm_if_early_init' arch/arm/mach-omap2/io.c:246: undefined reference to `omap_pm_if_init' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Roger Quadros --- arch/arm/plat-omap/common.c | 6 ++++++ arch/arm/plat-omap/include/plat/omap-pm.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index cc050b3313b..d5650985e20 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c @@ -52,6 +52,12 @@ int omap_board_config_size; /* used by omap-smp.c and board-4430sdp.c */ void __iomem *gic_cpu_base_addr; +#ifdef CONFIG_OMAP_PM_NONE +struct omap_opp *mpu_opps; +struct omap_opp *dsp_opps; +struct omap_opp *l3_opps; +#endif + static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out) { struct omap_board_config_kernel *kinfo = NULL; diff --git a/arch/arm/plat-omap/include/plat/omap-pm.h b/arch/arm/plat-omap/include/plat/omap-pm.h index 5151eda34cf..583e540123d 100644 --- a/arch/arm/plat-omap/include/plat/omap-pm.h +++ b/arch/arm/plat-omap/include/plat/omap-pm.h @@ -58,9 +58,13 @@ extern struct omap_opp *l3_opps; * framework starts. The "_if_" is to avoid name collisions with the * PM idle-loop code. */ +#ifdef CONFIG_OMAP_PM_NONE +#define omap_pm_if_early_init(a, b, c) 0 +#else int __init omap_pm_if_early_init(struct omap_opp *mpu_opp_table, struct omap_opp *dsp_opp_table, struct omap_opp *l3_opp_table); +#endif /** * omap_pm_if_init - OMAP PM init code called after clock fw init @@ -68,7 +72,11 @@ int __init omap_pm_if_early_init(struct omap_opp *mpu_opp_table, * The main initialization code. OPP tables are passed in here. The * "_if_" is to avoid name collisions with the PM idle-loop code. */ +#ifdef CONFIG_OMAP_PM_NONE +#define omap_pm_if_init() 0 +#else int __init omap_pm_if_init(void); +#endif /** * omap_pm_if_exit - OMAP PM exit code -- 2.11.4.GIT