aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Breeds <tony@bakeyournoodle.com>2008-04-28 21:42:32 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-29 01:57:34 -0400
commit21e38dfee53a2159d14a24a3d2277ae757599efa (patch)
tree95011183bb7e21aba9cd679e276384243d48be97 /arch
parent85218827cc4ca900867807f19345418164ffc108 (diff)
[POWERPC] Fix building of pmac32 when CONFIG_NVRAM=m
Kamalesh Babulal (kamalesh@linux.vnet.ibm.com) reports that CONFIG_NVRAM=m is valid in terms of Kconfig but fails to build with: Building modules, stage 2. MODPOST 1401 modules ERROR: "pmac_newworld" [arch/powerpc/platforms/powermac/nvram.ko] undefined! ERROR: "__alloc_bootmem" [arch/powerpc/platforms/powermac/nvram.ko] undefined! make[1]: *** [__modpost] Error The arch/powerpc/platforms/powermac/nvram.c code really needs to be builtin, but as its compilation is dependent on a generic Kconfig symbol we force nvram.c to be builtin if CONFIG_NVRAM is 'y' or 'm'. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/powermac/Makefile5
-rw-r--r--arch/powerpc/platforms/powermac/setup.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile
index 78093d7f97a..4d72c8f7215 100644
--- a/arch/powerpc/platforms/powermac/Makefile
+++ b/arch/powerpc/platforms/powermac/Makefile
@@ -6,7 +6,10 @@ obj-y += pic.o setup.o time.o feature.o pci.o \
6obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o 6obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o
7obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o 7obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o
8obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o 8obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o
9obj-$(CONFIG_NVRAM) += nvram.o 9# CONFIG_NVRAM is an arch. independant tristate symbol, for pmac32 we really
10# need this to be a bool. Cheat here and pretend CONFIG_NVRAM=m is really
11# CONFIG_NVRAM=y
12obj-$(CONFIG_NVRAM:m=y) += nvram.o
10# ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff 13# ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff
11obj-$(CONFIG_PPC64) += nvram.o 14obj-$(CONFIG_PPC64) += nvram.o
12obj-$(CONFIG_PPC32) += bootx_init.o 15obj-$(CONFIG_PPC32) += bootx_init.o
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index bf44c5441a3..00bd0166d07 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -337,7 +337,8 @@ static void __init pmac_setup_arch(void)
337 find_via_pmu(); 337 find_via_pmu();
338 smu_init(); 338 smu_init();
339 339
340#if defined(CONFIG_NVRAM) || defined(CONFIG_PPC64) 340#if defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) || \
341 defined(CONFIG_PPC64)
341 pmac_nvram_init(); 342 pmac_nvram_init();
342#endif 343#endif
343 344