Skip to content

Commit

Permalink
OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-…
Browse files Browse the repository at this point in the history
…for-linus

On non-OMAP2 and non-OMAP3 kernel configs, turn omap2_sdrc_init() into
a no-op.  Otherwise, compilation breaks on an OMAP4-only config with
the current omap-for-linus branch:

arch/arm/mach-omap2/built-in.o: In function `omap2_init_common_devices':
../mach-omap2/io.c:421: undefined reference to `omap2_sdrc_init'

Thanks to Sergei Shtylyov <sshtylyov@mvista.com> for suggesting the use
of a empty static inline function rather than a macro.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
[tony@atomide.com: updated not to use __init for inline omap2_sdrc_init]
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Paul Walmsley authored and Tony Lindgren committed Mar 1, 2011
1 parent 7cab871 commit d6b5d01
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/arm/plat-omap/include/plat/sdrc.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,14 @@ struct omap_sdrc_params {
u32 mr;
};

void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
void omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
struct omap_sdrc_params *sdrc_cs1);
#else
static inline void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
struct omap_sdrc_params *sdrc_cs1) {};
#endif

int omap2_sdrc_get_params(unsigned long r,
struct omap_sdrc_params **sdrc_cs0,
struct omap_sdrc_params **sdrc_cs1);
Expand Down

0 comments on commit d6b5d01

Please sign in to comment.