Skip to content

Commit 7e69deb

Browse files
David Daneyralfbaechle
authored andcommitted
MIPS: Hook up Cavium OCTEON in arch/mips.
Take all the OCTEON specific files that were added, and hook them into the build system for the arch/mips. For versions of GCC that lack OCTEON support, override gas target architecture. Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com> Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 47d979e commit 7e69deb

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎arch/mips/Makefile‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=r5000) \
144144
cflags-$(CONFIG_CPU_R8000) += -march=r8000 -Wa,--trap
145145
cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=r8000) \
146146
-Wa,--trap
147+
cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap
148+
ifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON))))
149+
cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon
150+
endif
147151

148152
cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)
149153
cflags-$(CONFIG_CPU_R4400_WORKAROUNDS) += $(call cc-option,-mfix-r4400,)
@@ -586,6 +590,18 @@ core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/txx9/rbtx4927/
586590
core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/txx9/rbtx4938/
587591
core-$(CONFIG_TOSHIBA_RBTX4939) += arch/mips/txx9/rbtx4939/
588592

593+
#
594+
# Cavium Octeon
595+
#
596+
core-$(CONFIG_CPU_CAVIUM_OCTEON) += arch/mips/cavium-octeon/
597+
cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -I$(srctree)/arch/mips/include/asm/mach-cavium-octeon
598+
core-$(CONFIG_CPU_CAVIUM_OCTEON) += arch/mips/cavium-octeon/executive/
599+
ifdef CONFIG_CAVIUM_OCTEON_2ND_KERNEL
600+
load-$(CONFIG_CPU_CAVIUM_OCTEON) += 0xffffffff84100000
601+
else
602+
load-$(CONFIG_CPU_CAVIUM_OCTEON) += 0xffffffff81100000
603+
endif
604+
589605
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
590606
drivers-$(CONFIG_PCI) += arch/mips/pci/
591607

‎arch/mips/kernel/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ obj-$(CONFIG_CPU_SB1) += r4k_fpu.o r4k_switch.o
4343
obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
4444
obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o
4545
obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o
46+
obj-$(CONFIG_CPU_CAVIUM_OCTEON) += octeon_switch.o
4647

4748
obj-$(CONFIG_SMP) += smp.o
4849
obj-$(CONFIG_SMP_UP) += smp-up.o

‎arch/mips/lib/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ obj-$(CONFIG_CPU_SB1) += dump_tlb.o
2727
obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
2828
obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o
2929
obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o
30+
obj-$(CONFIG_CPU_CAVIUM_OCTEON) += dump_tlb.o
3031

3132
# libgcc-style stuff needed in the kernel
3233
obj-y += ashldi3.o ashrdi3.o cmpdi2.o lshrdi3.o ucmpdi2.o

‎arch/mips/mm/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ obj-$(CONFIG_CPU_SB1) += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o
2727
obj-$(CONFIG_CPU_TX39XX) += c-tx39.o tlb-r3k.o
2828
obj-$(CONFIG_CPU_TX49XX) += c-r4k.o cex-gen.o tlb-r4k.o
2929
obj-$(CONFIG_CPU_VR41XX) += c-r4k.o cex-gen.o tlb-r4k.o
30+
obj-$(CONFIG_CPU_CAVIUM_OCTEON) += c-octeon.o cex-oct.o tlb-r4k.o
3031

3132
obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
3233
obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o

0 commit comments

Comments
 (0)