linux-mips
[Top] [All Lists]

[PATCH] Do not build spram.o unconditionally

To: linux-mips@linux-mips.org
Subject: [PATCH] Do not build spram.o unconditionally
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Mon, 14 Apr 2008 22:47:59 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
Patch against linux-queue tree.

 arch/mips/kernel/Makefile    |    3 ++-
 arch/mips/kernel/cpu-probe.c |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 80c5aba..27dbbaa 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y         := head.o init_task.o vmlinux.lds
 obj-y          += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
                   ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
                   time.o topology.o traps.o unaligned.o \
-                  spram.o irq-gic.o
+                  irq-gic.o
 
 obj-$(CONFIG_CEVT_BCM1480)     += cevt-bcm1480.o
 obj-$(CONFIG_CEVT_R4K)         += cevt-r4k.o
@@ -53,6 +53,7 @@ obj-$(CONFIG_MIPS_MT_FPAFF)   += mips-mt-fpaff.o
 obj-$(CONFIG_MIPS_MT_SMTC)     += smtc.o smtc-asm.o smtc-proc.o
 obj-$(CONFIG_MIPS_MT_SMP)      += smp-mt.o
 obj-$(CONFIG_MIPS_CMP)         += smp-cmp.o
+obj-$(CONFIG_CPU_MIPSR2)       += spram.o
 
 obj-$(CONFIG_MIPS_APSP_KSPD)   += kspd.o
 obj-$(CONFIG_MIPS_VPE_LOADER)  += vpe.o
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index dd26322..335a6ae 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -676,7 +676,11 @@ static void __cpuinit decode_configs(struct cpuinfo_mips 
*c)
                return;
 }
 
+#ifdef CONFIG_CPU_MIPSR2
 extern void spram_config(void);
+#else
+static inline void spram_config(void) {}
+#endif
 
 static inline void cpu_probe_mips(struct cpuinfo_mips *c)
 {

<Prev in Thread] Current Thread [Next in Thread>