Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[pandora-kernel.git] / arch / mips / Makefile
index 2b19605..32c1c8f 100644 (file)
@@ -67,6 +67,8 @@ cflags-y              += $(call cc-option,-msym32)
 endif
 endif
 
+all-$(CONFIG_BOOT_ELF32)       := $(vmlinux-32)
+all-$(CONFIG_BOOT_ELF64)       := $(vmlinux-64)
 
 #
 # GCC uses -G 0 -mabicalls -fpic as default.  We don't want PIC in the kernel
@@ -118,6 +120,7 @@ cflags-$(CONFIG_CPU_R4300)  += -march=r4300 -Wa,--trap
 cflags-$(CONFIG_CPU_VR41XX)    += -march=r4100 -Wa,--trap
 cflags-$(CONFIG_CPU_R4X00)     += -march=r4600 -Wa,--trap
 cflags-$(CONFIG_CPU_TX49XX)    += -march=r4600 -Wa,--trap
+cflags-$(CONFIG_CPU_LOONGSON2) += -march=r4600 -Wa,--trap
 cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
                        -Wa,-mips32 -Wa,--trap
 cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
@@ -282,14 +285,6 @@ libs-$(CONFIG_MACH_DECSTATION)     += arch/mips/dec/prom/
 load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000
 CLEAN_FILES                    += drivers/tc/lk201-map.c
 
-#
-# Galileo EV64120 Board
-#
-core-$(CONFIG_MIPS_EV64120)    += arch/mips/gt64120/ev64120/
-core-$(CONFIG_MIPS_EV64120)    += arch/mips/gt64120/common/
-cflags-$(CONFIG_MIPS_EV64120)  += -Iinclude/asm-mips/mach-ev64120
-load-$(CONFIG_MIPS_EV64120)    += 0xffffffff80100000
-
 #
 # Wind River PPMC Board (4KC + GT64120)
 #
@@ -297,6 +292,13 @@ core-$(CONFIG_WR_PPMC)             += arch/mips/gt64120/wrppmc/
 cflags-$(CONFIG_WR_PPMC)               += -Iinclude/asm-mips/mach-wrppmc
 load-$(CONFIG_WR_PPMC)         += 0xffffffff80100000
 
+#
+# lemote fulong mini-PC board
+#
+core-$(CONFIG_LEMOTE_FULONG) +=arch/mips/lemote/lm2e/
+load-$(CONFIG_LEMOTE_FULONG) +=0xffffffff80100000
+cflags-$(CONFIG_LEMOTE_FULONG) += -Iinclude/asm-mips/mach-lemote
+
 #
 # For all MIPS, Inc. eval boards
 #
@@ -309,6 +311,7 @@ core-$(CONFIG_MIPS_ATLAS)   += arch/mips/mips-boards/atlas/
 cflags-$(CONFIG_MIPS_ATLAS)    += -Iinclude/asm-mips/mach-atlas
 cflags-$(CONFIG_MIPS_ATLAS)    += -Iinclude/asm-mips/mach-mips
 load-$(CONFIG_MIPS_ATLAS)      += 0xffffffff80100000
+all-$(CONFIG_MIPS_ATLAS)       := vmlinux.srec
 
 #
 # MIPS Malta board
@@ -316,6 +319,7 @@ load-$(CONFIG_MIPS_ATLAS)   += 0xffffffff80100000
 core-$(CONFIG_MIPS_MALTA)      += arch/mips/mips-boards/malta/
 cflags-$(CONFIG_MIPS_MALTA)    += -Iinclude/asm-mips/mach-mips
 load-$(CONFIG_MIPS_MALTA)      += 0xffffffff80100000
+all-$(CONFIG_MIPS_MALTA)       := vmlinux.srec
 
 #
 # MIPS SEAD board
@@ -323,32 +327,22 @@ load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
 core-$(CONFIG_MIPS_SEAD)       += arch/mips/mips-boards/sead/
 cflags-$(CONFIG_MIPS_SEAD)     += -Iinclude/asm-mips/mach-mips
 load-$(CONFIG_MIPS_SEAD)       += 0xffffffff80100000
+all-$(CONFIG_MIPS_SEAD)                := vmlinux.srec
 
 #
 # MIPS SIM
 #
-core-$(CONFIG_MIPS_SIM)                += arch/mips/mips-boards/sim/
-cflags-$(CONFIG_MIPS_SIM)      += -Iinclude/asm-mips/mach-sim
+core-$(CONFIG_MIPS_SIM)                += arch/mips/mipssim/
+cflags-$(CONFIG_MIPS_SIM)      += -Iinclude/asm-mips/mach-mipssim
 load-$(CONFIG_MIPS_SIM)                += 0x80100000
 
 #
-# Momentum Ocelot board
-#
-# The Ocelot setup.o must be linked early - it does the ioremap() for the
-# mips_io_port_base.
-#
-core-$(CONFIG_MOMENCO_OCELOT)  += arch/mips/gt64120/common/ \
-                                  arch/mips/gt64120/momenco_ocelot/
-cflags-$(CONFIG_MOMENCO_OCELOT)        += -Iinclude/asm-mips/mach-ocelot
-load-$(CONFIG_MOMENCO_OCELOT)  += 0xffffffff80100000
-
-#
-# Momentum Ocelot-C and -CS boards
+# PMC-Sierra MSP SOCs
 #
-# The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the
-# mips_io_port_base.
-core-$(CONFIG_MOMENCO_OCELOT_C)        += arch/mips/momentum/ocelot_c/
-load-$(CONFIG_MOMENCO_OCELOT_C)        += 0xffffffff80100000
+core-$(CONFIG_PMC_MSP)         += arch/mips/pmc-sierra/msp71xx/
+cflags-$(CONFIG_PMC_MSP)       += -Iinclude/asm-mips/pmc-sierra/msp71xx \
+                                       -mno-branch-likely
+load-$(CONFIG_PMC_MSP)         += 0xffffffff80100000
 
 #
 # PMC-Sierra Yosemite
@@ -363,13 +357,7 @@ load-$(CONFIG_PMC_YOSEMITE)        += 0xffffffff80100000
 core-$(CONFIG_QEMU)            += arch/mips/qemu/
 cflags-$(CONFIG_QEMU)          += -Iinclude/asm-mips/mach-qemu
 load-$(CONFIG_QEMU)            += 0xffffffff80010000
-
-#
-# Momentum Ocelot-3
-#
-core-$(CONFIG_MOMENCO_OCELOT_3)        += arch/mips/momentum/ocelot_3/
-cflags-$(CONFIG_MOMENCO_OCELOT_3)      += -Iinclude/asm-mips/mach-ocelot3
-load-$(CONFIG_MOMENCO_OCELOT_3)        += 0xffffffff80100000
+all-$(CONFIG_QEMU)             := vmlinux.bin
 
 #
 # Basler eXcite
@@ -378,21 +366,6 @@ core-$(CONFIG_BASLER_EXCITE)       += arch/mips/basler/excite/
 cflags-$(CONFIG_BASLER_EXCITE) += -Iinclude/asm-mips/mach-excite
 load-$(CONFIG_BASLER_EXCITE)   += 0x80100000
 
-#
-# NEC DDB
-#
-core-$(CONFIG_DDB5XXX_COMMON)  += arch/mips/ddb5xxx/common/
-
-#
-# NEC DDB Vrc-5477
-#
-core-$(CONFIG_DDB5477)         += arch/mips/ddb5xxx/ddb5477/
-load-$(CONFIG_DDB5477)         += 0xffffffff80100000
-
-core-$(CONFIG_LASAT)           += arch/mips/lasat/
-cflags-$(CONFIG_LASAT)         += -Iinclude/asm-mips/mach-lasat
-load-$(CONFIG_LASAT)           += 0xffffffff80000000
-
 #
 # Common VR41xx
 #
@@ -565,6 +538,7 @@ load-$(CONFIG_SIBYTE_BIGSUR)        := 0xffffffff80100000
 core-$(CONFIG_SNI_RM)          += arch/mips/sni/
 cflags-$(CONFIG_SNI_RM)                += -Iinclude/asm-mips/mach-rm
 load-$(CONFIG_SNI_RM)          += 0xffffffff80600000
+all-$(CONFIG_SNI_RM)           := vmlinux.ecoff
 
 #
 # Toshiba JMR-TX3927 board
@@ -580,6 +554,7 @@ load-$(CONFIG_TOSHIBA_JMR3927)      += 0xffffffff80050000
 #
 core-$(CONFIG_TOSHIBA_RBTX4927)        += arch/mips/tx4927/toshiba_rbtx4927/
 core-$(CONFIG_TOSHIBA_RBTX4927)        += arch/mips/tx4927/common/
+cflags-$(CONFIG_TOSHIBA_RBTX4927) += -Iinclude/asm-mips/mach-tx49xx
 load-$(CONFIG_TOSHIBA_RBTX4927)        += 0xffffffff80020000
 
 #
@@ -587,6 +562,7 @@ load-$(CONFIG_TOSHIBA_RBTX4927)     += 0xffffffff80020000
 #
 core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/
 core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
+cflags-$(CONFIG_TOSHIBA_RBTX4938) += -Iinclude/asm-mips/mach-tx49xx
 load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
 
 cflags-y                       += -Iinclude/asm-mips/mach-generic
@@ -603,7 +579,8 @@ JIFFIES                     = jiffies_64
 endif
 
 AFLAGS         += $(cflags-y)
-CFLAGS         += $(cflags-y)
+CFLAGS         += $(cflags-y) \
+                       -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
 
 LDFLAGS                        += -m $(ld-emul)
 
@@ -633,18 +610,11 @@ CPPFLAGS_vmlinux.lds := \
 head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
 
 libs-y                 += arch/mips/lib/
-libs-$(CONFIG_32BIT)   += arch/mips/lib-32/
-libs-$(CONFIG_64BIT)   += arch/mips/lib-64/
 
 core-y                 += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
 
 drivers-$(CONFIG_OPROFILE)     += arch/mips/oprofile/
 
-ifdef CONFIG_LASAT
-rom.bin rom.sw: vmlinux
-       $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
-endif
-
 #
 # Some machines like the Indy need 32-bit ELF binaries for booting purposes.
 # Other need ECOFF, so we build a 32-bit ELF binary for them which we then
@@ -662,33 +632,7 @@ vmlinux.64: vmlinux
 
 makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
 
-ifdef CONFIG_BOOT_ELF32
-all:   $(vmlinux-32)
-endif
-
-ifdef CONFIG_BOOT_ELF64
-all:   $(vmlinux-64)
-endif
-
-ifdef CONFIG_MIPS_ATLAS
-all:   vmlinux.srec
-endif
-
-ifdef CONFIG_MIPS_MALTA
-all:   vmlinux.srec
-endif
-
-ifdef CONFIG_MIPS_SEAD
-all:   vmlinux.srec
-endif
-
-ifdef CONFIG_QEMU
-all:   vmlinux.bin
-endif
-
-ifdef CONFIG_SNI_RM
-all:   vmlinux.ecoff
-endif
+all:   $(all-y)
 
 vmlinux.bin: $(vmlinux-32)
        +@$(call makeboot,$@)
@@ -714,7 +658,14 @@ endif
 
 archclean:
        @$(MAKE) $(clean)=arch/mips/boot
-       @$(MAKE) $(clean)=arch/mips/lasat
+
+define archhelp
+       echo '  vmlinux.ecoff        - ECOFF boot image'
+       echo '  vmlinux.bin          - Raw binary boot image'
+       echo '  vmlinux.srec         - SREC boot image'
+       echo
+       echo '  These will be default as apropriate for a configured platform.'
+endef
 
 CLEAN_FILES += vmlinux.32 \
               vmlinux.64 \