Skip to content

Commit 54f42d2

Browse files
committed
Merge tag 'mips_6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS updates from Thomas Bogendoerfer: - added support for Mobileye SoCs - unified GPR/CP0 regs handling for uasm - cleanups and fixes * tag 'mips_6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (56 commits) mips: cm: Convert __mips_cm_phys_base() to weak function mips: cm: Convert __mips_cm_l2sync_phys_base() to weak function mips: dts: ralink: mt7621: add cell count properties to usb mips: dts: ralink: mt7621: add serial1 and serial2 nodes mips: dts: ralink: mt7621: reorder serial0 properties mips: dts: ralink: mt7621: associate uart1_pins with serial0 MIPS: ralink: Don't use "proxy" headers mips: sibyte: make tb_class constant mips: mt: make mt_class constant MIPS: ralink: Remove unused of_gpio.h bus: bt1-apb: Remove duplicate include MAINTAINERS: remove entry to non-existing file in MOBILEYE MIPS SOCS MIPS: mipsregs: Parse fp and sp register by name in parse_r tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning mips: zboot: Fix "no previous prototype" build warning MIPS: mipsregs: Set proper ISA level for virt extensions MIPS: Implement microMIPS MT ASE helpers MIPS: Limit MIPS_MT_SMP support by ISA reversion MIPS: Loongson64: test for -march=loongson3a cflag MIPS: BMIPS: Drop unnecessary assembler flag ...
2 parents ab522e1 + 7329322 commit 54f42d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2010
-921
lines changed

Documentation/devicetree/bindings/mips/cpus.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,23 @@ properties:
2323
- brcm,bmips4380
2424
- brcm,bmips5000
2525
- brcm,bmips5200
26-
- ingenic,xburst-mxu1.0
26+
- img,i6500
2727
- ingenic,xburst-fpu1.0-mxu1.1
2828
- ingenic,xburst-fpu2.0-mxu2.0
29+
- ingenic,xburst-mxu1.0
2930
- ingenic,xburst2-fpu2.1-mxu2.1-smt
3031
- loongson,gs264
3132
- mips,m14Kc
32-
- mips,mips4Kc
33-
- mips,mips4KEc
34-
- mips,mips24Kc
33+
- mips,mips1004Kc
3534
- mips,mips24KEc
35+
- mips,mips24Kc
36+
- mips,mips4KEc
37+
- mips,mips4Kc
3638
- mips,mips74Kc
37-
- mips,mips1004Kc
3839
- mti,interaptiv
39-
- mti,mips24KEc
4040
- mti,mips14KEc
4141
- mti,mips14Kc
42+
- mti,mips24KEc
4243

4344
reg:
4445
maxItems: 1
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
# Copyright 2023 Mobileye Vision Technologies Ltd.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/mips/mobileye.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Mobileye SoC series
9+
10+
maintainers:
11+
- Vladimir Kondratiev <vladimir.kondratiev@intel.com>
12+
- Gregory CLEMENT <gregory.clement@bootlin.com>
13+
- Théo Lebrun <theo.lebrun@bootlin.com>
14+
15+
description:
16+
Boards with a Mobileye SoC shall have the following properties.
17+
18+
properties:
19+
$nodename:
20+
const: '/'
21+
22+
compatible:
23+
oneOf:
24+
- description: Boards with Mobileye EyeQ5 SoC
25+
items:
26+
- enum:
27+
- mobileye,eyeq5-epm5
28+
- const: mobileye,eyeq5
29+
30+
additionalProperties: true
31+
32+
...

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,8 @@ patternProperties:
941941
description: Miyoo
942942
"^mntre,.*":
943943
description: MNT Research GmbH
944+
"^mobileye,.*":
945+
description: Mobileye Vision Technologies Ltd.
944946
"^modtronix,.*":
945947
description: Modtronix Engineering
946948
"^moortec,.*":

MAINTAINERS

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14741,6 +14741,17 @@ F: arch/mips/
1474114741
F: drivers/platform/mips/
1474214742
F: include/dt-bindings/mips/
1474314743

14744+
MIPS BAIKAL-T1 PLATFORM
14745+
M: Serge Semin <fancer.lancer@gmail.com>
14746+
L: linux-mips@vger.kernel.org
14747+
S: Supported
14748+
F: Documentation/devicetree/bindings/bus/baikal,bt1-*.yaml
14749+
F: Documentation/devicetree/bindings/clock/baikal,bt1-*.yaml
14750+
F: drivers/bus/bt1-*.c
14751+
F: drivers/clk/baikal-t1/
14752+
F: drivers/memory/bt1-l2-ctl.c
14753+
F: drivers/mtd/maps/physmap-bt1-rom.[ch]
14754+
1474414755
MIPS BOSTON DEVELOPMENT BOARD
1474514756
M: Paul Burton <paulburton@kernel.org>
1474614757
L: linux-mips@vger.kernel.org
@@ -14861,6 +14872,17 @@ W: https://linuxtv.org
1486114872
Q: http://patchwork.linuxtv.org/project/linux-media/list/
1486214873
F: drivers/media/dvb-frontends/mn88473*
1486314874

14875+
MOBILEYE MIPS SOCS
14876+
M: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
14877+
M: Gregory CLEMENT <gregory.clement@bootlin.com>
14878+
M: Théo Lebrun <theo.lebrun@bootlin.com>
14879+
L: linux-mips@vger.kernel.org
14880+
S: Maintained
14881+
F: Documentation/devicetree/bindings/mips/mobileye.yaml
14882+
F: arch/mips/boot/dts/mobileye/
14883+
F: arch/mips/configs/eyeq5_defconfig
14884+
F: arch/mips/mobileye/board-epm5.its.S
14885+
1486414886
MODULE SUPPORT
1486514887
M: Luis Chamberlain <mcgrof@kernel.org>
1486614888
L: linux-modules@vger.kernel.org

arch/mips/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ obj- := $(platform-y)
1111
# mips object files
1212
# The object files are linked as core-y files would be linked
1313

14+
obj-y += generic/
1415
obj-y += kernel/
1516
obj-y += mm/
1617
obj-y += net/

arch/mips/Kbuild.platforms

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ platform-$(CONFIG_MACH_LOONGSON2EF) += loongson2ef/
1717
platform-$(CONFIG_MACH_LOONGSON32) += loongson32/
1818
platform-$(CONFIG_MACH_LOONGSON64) += loongson64/
1919
platform-$(CONFIG_MIPS_MALTA) += mti-malta/
20+
platform-$(CONFIG_MACH_EYEQ5) += mobileye/
2021
platform-$(CONFIG_MACH_NINTENDO64) += n64/
2122
platform-$(CONFIG_PIC32MZDA) += pic32/
2223
platform-$(CONFIG_RALINK) += ralink/

arch/mips/Kconfig

Lines changed: 99 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ config MIPS_FIXUP_BIGPHYS_ADDR
113113
config MIPS_GENERIC
114114
bool
115115

116+
config MACH_GENERIC_CORE
117+
bool
118+
116119
config MACH_INGENIC
117120
bool
118121
select SYS_SUPPORTS_32BIT_KERNEL
@@ -149,6 +152,7 @@ config MIPS_GENERIC_KERNEL
149152
select DMA_NONCOHERENT
150153
select HAVE_PCI
151154
select IRQ_MIPS_CPU
155+
select MACH_GENERIC_CORE
152156
select MIPS_AUTO_PFN_OFFSET
153157
select MIPS_CPU_SCACHE
154158
select MIPS_GIC
@@ -417,6 +421,7 @@ config MACH_INGENIC_SOC
417421
bool "Ingenic SoC based machines"
418422
select MIPS_GENERIC
419423
select MACH_INGENIC
424+
select MACH_GENERIC_CORE
420425
select SYS_SUPPORTS_ZBOOT_UART16550
421426
select CPU_SUPPORTS_CPUFREQ
422427
select MIPS_EXTERNAL_TIMER
@@ -570,6 +575,59 @@ config MACH_PIC32
570575
Microchip PIC32 is a family of general-purpose 32 bit MIPS core
571576
microcontrollers.
572577

578+
config MACH_EYEQ5
579+
bool "Mobileye EyeQ5 SoC"
580+
select MACH_GENERIC_CORE
581+
select ARM_AMBA
582+
select PHYSICAL_START_BOOL
583+
select ARCH_SPARSEMEM_DEFAULT if 64BIT
584+
select BOOT_RAW
585+
select BUILTIN_DTB
586+
select CEVT_R4K
587+
select CLKSRC_MIPS_GIC
588+
select COMMON_CLK
589+
select CPU_MIPSR2_IRQ_EI
590+
select CPU_MIPSR2_IRQ_VI
591+
select CSRC_R4K
592+
select DMA_NONCOHERENT
593+
select HAVE_PCI
594+
select IRQ_MIPS_CPU
595+
select MIPS_AUTO_PFN_OFFSET
596+
select MIPS_CPU_SCACHE
597+
select MIPS_GIC
598+
select MIPS_L1_CACHE_SHIFT_7
599+
select PCI_DRIVERS_GENERIC
600+
select SMP_UP if SMP
601+
select SWAP_IO_SPACE
602+
select SYS_HAS_CPU_MIPS64_R6
603+
select SYS_SUPPORTS_64BIT_KERNEL
604+
select SYS_SUPPORTS_HIGHMEM
605+
select SYS_SUPPORTS_LITTLE_ENDIAN
606+
select SYS_SUPPORTS_MIPS_CPS
607+
select SYS_SUPPORTS_RELOCATABLE
608+
select SYS_SUPPORTS_ZBOOT
609+
select UHI_BOOT
610+
select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
611+
select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
612+
select USB_OHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
613+
select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
614+
select USB_UHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
615+
select USB_UHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
616+
select USE_OF
617+
help
618+
Select this to build a kernel supporting EyeQ5 SoC from Mobileye.
619+
620+
bool
621+
622+
config FIT_IMAGE_FDT_EPM5
623+
bool "Include FDT for Mobileye EyeQ5 development platforms"
624+
depends on MACH_EYEQ5
625+
default n
626+
help
627+
Enable this to include the FDT for the EyeQ5 development platforms
628+
from Mobileye in the FIT kernel image.
629+
This requires u-boot on the platform.
630+
573631
config MACH_NINTENDO64
574632
bool "Nintendo 64 console"
575633
select CEVT_R4K
@@ -603,6 +661,7 @@ config RALINK
603661
config MACH_REALTEK_RTL
604662
bool "Realtek RTL838x/RTL839x based machines"
605663
select MIPS_GENERIC
664+
select MACH_GENERIC_CORE
606665
select DMA_NONCOHERENT
607666
select IRQ_MIPS_CPU
608667
select CSRC_R4K
@@ -1273,44 +1332,6 @@ config CPU_LOONGSON64
12731332
3B1000, 3B1500, 3A2000, 3A3000 and 3A4000) processors. However, old
12741333
Loongson-2E/2F is not covered here and will be removed in future.
12751334

1276-
config LOONGSON3_ENHANCEMENT
1277-
bool "New Loongson-3 CPU Enhancements"
1278-
default n
1279-
depends on CPU_LOONGSON64
1280-
help
1281-
New Loongson-3 cores (since Loongson-3A R2, as opposed to Loongson-3A
1282-
R1, Loongson-3B R1 and Loongson-3B R2) has many enhancements, such as
1283-
FTLB, L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPr2 ASE, User
1284-
Local register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer),
1285-
Fast TLB refill support, etc.
1286-
1287-
This option enable those enhancements which are not probed at run
1288-
time. If you want a generic kernel to run on all Loongson 3 machines,
1289-
please say 'N' here. If you want a high-performance kernel to run on
1290-
new Loongson-3 machines only, please say 'Y' here.
1291-
1292-
config CPU_LOONGSON3_WORKAROUNDS
1293-
bool "Loongson-3 LLSC Workarounds"
1294-
default y if SMP
1295-
depends on CPU_LOONGSON64
1296-
help
1297-
Loongson-3 processors have the llsc issues which require workarounds.
1298-
Without workarounds the system may hang unexpectedly.
1299-
1300-
Say Y, unless you know what you are doing.
1301-
1302-
config CPU_LOONGSON3_CPUCFG_EMULATION
1303-
bool "Emulate the CPUCFG instruction on older Loongson cores"
1304-
default y
1305-
depends on CPU_LOONGSON64
1306-
help
1307-
Loongson-3A R4 and newer have the CPUCFG instruction available for
1308-
userland to query CPU capabilities, much like CPUID on x86. This
1309-
option provides emulation of the instruction on older Loongson
1310-
cores, back to Loongson-3A1000.
1311-
1312-
If unsure, please say Y.
1313-
13141335
config CPU_LOONGSON2E
13151336
bool "Loongson 2E"
13161337
depends on SYS_HAS_CPU_LOONGSON2E
@@ -1650,6 +1671,44 @@ config CPU_BMIPS
16501671

16511672
endchoice
16521673

1674+
config LOONGSON3_ENHANCEMENT
1675+
bool "New Loongson-3 CPU Enhancements"
1676+
default n
1677+
depends on CPU_LOONGSON64
1678+
help
1679+
New Loongson-3 cores (since Loongson-3A R2, as opposed to Loongson-3A
1680+
R1, Loongson-3B R1 and Loongson-3B R2) has many enhancements, such as
1681+
FTLB, L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPr2 ASE, User
1682+
Local register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer),
1683+
Fast TLB refill support, etc.
1684+
1685+
This option enable those enhancements which are not probed at run
1686+
time. If you want a generic kernel to run on all Loongson 3 machines,
1687+
please say 'N' here. If you want a high-performance kernel to run on
1688+
new Loongson-3 machines only, please say 'Y' here.
1689+
1690+
config CPU_LOONGSON3_WORKAROUNDS
1691+
bool "Loongson-3 LLSC Workarounds"
1692+
default y if SMP
1693+
depends on CPU_LOONGSON64
1694+
help
1695+
Loongson-3 processors have the llsc issues which require workarounds.
1696+
Without workarounds the system may hang unexpectedly.
1697+
1698+
Say Y, unless you know what you are doing.
1699+
1700+
config CPU_LOONGSON3_CPUCFG_EMULATION
1701+
bool "Emulate the CPUCFG instruction on older Loongson cores"
1702+
default y
1703+
depends on CPU_LOONGSON64
1704+
help
1705+
Loongson-3A R4 and newer have the CPUCFG instruction available for
1706+
userland to query CPU capabilities, much like CPUID on x86. This
1707+
option provides emulation of the instruction on older Loongson
1708+
cores, back to Loongson-3A1000.
1709+
1710+
If unsure, please say Y.
1711+
16531712
config CPU_MIPS32_3_5_FEATURES
16541713
bool "MIPS32 Release 3.5 Features"
16551714
depends on SYS_HAS_CPU_MIPS32_R3_5
@@ -2124,7 +2183,8 @@ config CPU_R4K_CACHE_TLB
21242183
config MIPS_MT_SMP
21252184
bool "MIPS MT SMP support (1 TC on each available VPE)"
21262185
default y
2127-
depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MIPSR6 && !CPU_MICROMIPS
2186+
depends on TARGET_ISA_REV > 0 && TARGET_ISA_REV < 6
2187+
depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MICROMIPS
21282188
select CPU_MIPSR2_IRQ_VI
21292189
select CPU_MIPSR2_IRQ_EI
21302190
select SYNC_R4K

arch/mips/Makefile

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ cflags-y += $(call cc-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
148148
#
149149
# CPU-dependent compiler/assembler options for optimization.
150150
#
151-
cflags-$(CONFIG_CPU_R3000) += -march=r3000
152-
cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
153-
cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
154-
cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
151+
cflags-$(CONFIG_CPU_R3000) += $(call cc-option,-march=r3000,-march=mips1)
152+
cflags-$(CONFIG_CPU_R4300) += $(call cc-option,-march=r4300,-march=mips3) -Wa,--trap
153+
cflags-$(CONFIG_CPU_R4X00) += $(call cc-option,-march=r4600,-march=mips3) -Wa,--trap
154+
cflags-$(CONFIG_CPU_TX49XX) += $(call cc-option,-march=r4600,-march=mips3) -Wa,--trap
155155
cflags-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,--trap
156156
cflags-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,--trap
157157
cflags-$(CONFIG_CPU_MIPS32_R5) += -march=mips32r5 -Wa,--trap -modd-spreg
@@ -160,37 +160,35 @@ cflags-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,--trap
160160
cflags-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,--trap
161161
cflags-$(CONFIG_CPU_MIPS64_R5) += -march=mips64r5 -Wa,--trap
162162
cflags-$(CONFIG_CPU_MIPS64_R6) += -march=mips64r6 -Wa,--trap
163-
cflags-$(CONFIG_CPU_P5600) += -march=p5600 -Wa,--trap -modd-spreg
164-
cflags-$(CONFIG_CPU_R5000) += -march=r5000 -Wa,--trap
165-
cflags-$(CONFIG_CPU_R5500) += $(call cc-option,-march=r5500,-march=r5000) \
163+
cflags-$(CONFIG_CPU_P5600) += $(call cc-option,-march=p5600,-march=mips32r5) \
164+
-Wa,--trap -modd-spreg
165+
cflags-$(CONFIG_CPU_R5000) += $(call cc-option,-march=r5000,-march=mips4) \
166166
-Wa,--trap
167-
cflags-$(CONFIG_CPU_NEVADA) += $(call cc-option,-march=rm5200,-march=r5000) \
167+
cflags-$(CONFIG_CPU_R5500) += $(call cc-option,-march=r5500,-march=mips4) \
168168
-Wa,--trap
169-
cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=rm7000,-march=r5000) \
169+
cflags-$(CONFIG_CPU_NEVADA) += $(call cc-option,-march=rm5200,-march=mips4) \
170170
-Wa,--trap
171-
cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=r5000) \
171+
cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=rm7000,-march=mips4) \
172+
-Wa,--trap
173+
cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=mips64r1) \
172174
-Wa,--trap
173175
cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mdmx)
174176
cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mips3d)
175-
cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=r8000) \
177+
cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=mips4) \
176178
-Wa,--trap
177-
cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap
178-
ifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON))))
179-
cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon
180-
endif
179+
cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -march=octeon -Wa,--trap
181180
cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1
182-
cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap
181+
cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,--trap
183182

184-
cflags-$(CONFIG_CPU_LOONGSON2E) += -march=loongson2e -Wa,--trap
185-
cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f -Wa,--trap
183+
cflags-$(CONFIG_CPU_LOONGSON2E) += \
184+
$(call cc-option,-march=loongson2e,-march=mips3) -Wa,--trap
185+
cflags-$(CONFIG_CPU_LOONGSON2F) += \
186+
$(call cc-option,-march=loongson2f,-march=mips3) -Wa,--trap
186187
# Some -march= flags enable MMI instructions, and GCC complains about that
187188
# support being enabled alongside -msoft-float. Thus explicitly disable MMI.
188189
cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-mno-loongson-mmi)
189-
ifdef CONFIG_CPU_LOONGSON64
190-
cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap
191-
cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
192-
cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
193-
endif
190+
cflags-$(CONFIG_CPU_LOONGSON64) += \
191+
$(call cc-option,-march=loongson3a,-march=mips64r2) -Wa,--trap
194192
cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-mno-loongson-mmi)
195193

196194
cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)
@@ -299,7 +297,7 @@ drivers-$(CONFIG_PCI) += arch/mips/pci/
299297
ifdef CONFIG_64BIT
300298
ifndef KBUILD_SYM32
301299
ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
302-
KBUILD_SYM32 = y
300+
KBUILD_SYM32 = $(call cc-option-yn, -msym32)
303301
endif
304302
endif
305303

0 commit comments

Comments
 (0)