Re: [PATCH] memory: fix build when CONFIG_OF && !CONFIG_DDR

From: Greg Kroah-Hartman
Date: Wed Sep 05 2012 - 14:57:56 EST


On Wed, Sep 05, 2012 at 12:29:23PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@xxxxxxxxxx>
>
> 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.

Ick, what a mess. Thanks for the patch, I'll apply it, but surely there
is a "better" solution here?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/