From 7c304d7e24fd4996a2b219312f739c4406b8e2e3 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 5 Sep 2012 12:29:23 -0600 Subject: memory: fix build when CONFIG_OF && !CONFIG_DDR Commit e6b42eb "memory: emif: add device tree support to emif driver" added drivers/memory/of_memory.c, which references tables defined in lib/jedec_ddr_data.c. of_memory.c is compiled when CONFIG_OF, whereas jedec_ddr_data.c is compiled when CONFIG_DDR. This breaks the build when CONFIG_OF is defined but not CONFIG_DDR: drivers/built-in.o: In function `of_get_ddr_timings': drivers/memory/of_memory.c:138: undefined reference to `lpddr2_jedec_timings' drivers/built-in.o: In function `of_get_min_tck': drivers/memory/of_memory.c:62: undefined reference to `lpddr2_jedec_min_tck' make: *** [vmlinux] Error 1 To solve this, only compile of_memory.c when CONFIG_OF && CONFIG_DDR, otherwise, stub out the functions. Signed-off-by: Stephen Warren Signed-off-by: Greg Kroah-Hartman --- drivers/memory/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/memory/Makefile') diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index cd8486b51f74..9cce5d70ed52 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile @@ -2,7 +2,9 @@ # Makefile for memory devices # +ifeq ($(CONFIG_DDR),y) obj-$(CONFIG_OF) += of_memory.o +endif obj-$(CONFIG_TI_EMIF) += emif.o obj-$(CONFIG_TEGRA20_MC) += tegra20-mc.o obj-$(CONFIG_TEGRA30_MC) += tegra30-mc.o -- cgit