MIPS: replace $(CPU) with Kconfig symbols
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sun, 18 Jan 2015 20:59:35 +0000 (21:59 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 21 Jan 2015 13:06:04 +0000 (14:06 +0100)
Conditionally set head-y and lib-y with boolean Kconfig symbols
for selected CPU. This deprecates the usage of the $(CPU) variable.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
arch/mips/Kconfig
arch/mips/Makefile

index 363f5ac8186644b1b1c7bfb6e5fba5589efb56b1..d87cbb4637dc319167b7b3cb49156b1226f1d0af 100644 (file)
@@ -167,6 +167,14 @@ config SUPPORTS_CPU_MIPS64_R1
 config SUPPORTS_CPU_MIPS64_R2
        bool
 
+config CPU_MIPS32
+       bool
+       default y if CPU_MIPS32_R1 || CPU_MIPS32_R2
+
+config CPU_MIPS64
+       bool
+       default y if CPU_MIPS64_R1 || CPU_MIPS64_R2
+
 config 32BIT
        bool
 
index 1907b57229c1486d95e1b3338fb804df5917f7ca..0a9e7e614b2061ee674a91add20888f4e9ee1e5b 100644 (file)
@@ -2,7 +2,9 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-head-y := arch/mips/cpu/$(CPU)/start.o
+head-$(CONFIG_CPU_MIPS32) := arch/mips/cpu/mips32/start.o
+head-$(CONFIG_CPU_MIPS64) := arch/mips/cpu/mips64/start.o
 
-libs-y += arch/mips/cpu/$(CPU)/
+libs-$(CONFIG_CPU_MIPS32) += arch/mips/cpu/mips32/
+libs-$(CONFIG_CPU_MIPS64) += arch/mips/cpu/mips64/
 libs-y += arch/mips/lib/