Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mips_6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS updates from Thomas Bogendoerfer:

- add support for Realtek RTL9302C

- add support for Mobileye EyeQ6H

- add support for Mobileye EyeQ OLB system controller

- improve r4k clocksource

- add mode for emulating ieee754 NAN2008

- rework for BMIPS CBR address handling

- fixes for Loongson 2K1000

- defconfig updates

- cleanups and fixes

* tag 'mips_6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (58 commits)
MIPS: config: Add ip30_defconfig
MIPS: config: lemote2f: Regenerate defconfig
MIPS: config: generic: Add board-litex
MIPS: config: Enable MSA and virtualization for MIPS64R6
MIPS: Fix fallback march for SB1
mips: dts: realtek: Add RTL9302C board
mips: generic: add fdt fixup for Realtek reference board
mips: select REALTEK_OTTO_TIMER for Realtek platforms
dt-bindings: interrupt-controller: realtek,rtl-intc: Add rtl9300-intc
dt-bindings: mips: realtek: Add rtl930x-soc compatible
dt-bindings: vendor-prefixes: Add Cameo Communications
mips: dts: realtek: add device_type property to cpu node
mips: dts: realtek: use "serial" instead of "uart" in node name
MIPS: Implement ieee754 NAN2008 emulation mode
MIPS: lantiq: improve USB initialization
MIPS: GIC: Generate redirect block accessors
MIPS: CPS: Add a couple of multi-cluster utility functions
MIPS: Octeron: remove source file executable bit
MAINTAINERS: Mobileye: add OLB drivers and dt-bindings
MIPS: mobileye: eyeq5: add OLB system-controller node
...

+2148 -399
+3 -1
Documentation/admin-guide/kernel-parameters.txt
··· 2003 2003 for the device. By default it is set to false (0). 2004 2004 2005 2005 ieee754= [MIPS] Select IEEE Std 754 conformance mode 2006 - Format: { strict | legacy | 2008 | relaxed } 2006 + Format: { strict | legacy | 2008 | relaxed | emulated } 2007 2007 Default: strict 2008 2008 2009 2009 Choose which programs will be accepted for execution ··· 2023 2023 by the FPU 2024 2024 relaxed accept any binaries regardless of whether 2025 2025 supported by the FPU 2026 + emulated accept any binaries but enable FPU emulator 2027 + if binary mode is unsupported by the FPU. 2026 2028 2027 2029 The FPU emulator is always able to support both NaN 2028 2030 encodings, so if no FPU hardware is present or it has
+19 -1
Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml
··· 25 25 - items: 26 26 - enum: 27 27 - realtek,rtl8380-intc 28 + - realtek,rtl9300-intc 28 29 - const: realtek,rtl-intc 29 30 - const: realtek,rtl-intc 30 31 deprecated: true ··· 36 35 const: 1 37 36 38 37 reg: 39 - maxItems: 1 38 + minItems: 1 39 + items: 40 + - description: vpe0 registers 41 + - description: vpe1 registers 40 42 41 43 interrupts: 42 44 minItems: 1 ··· 75 71 else: 76 72 required: 77 73 - interrupts 74 + - if: 75 + properties: 76 + compatible: 77 + contains: 78 + const: realtek,rtl9300-intc 79 + then: 80 + properties: 81 + reg: 82 + minItems: 2 83 + maxItems: 2 84 + else: 85 + properties: 86 + reg: 87 + maxItems: 1 78 88 79 89 additionalProperties: false 80 90
+24
Documentation/devicetree/bindings/mips/brcm/soc.yaml
··· 55 55 under the "cpus" node. 56 56 $ref: /schemas/types.yaml#/definitions/uint32 57 57 58 + brcm,bmips-cbr-reg: 59 + description: Reference address of the CBR. 60 + Some SoC suffer from a BUG where CBR(Core Base Register) 61 + address might be badly or never initialized by the Bootloader 62 + or reading it from co-processor registers, if the system boots 63 + from secondary CPU, results in invalid address. 64 + The CBR address is always the same on the SoC hence it 65 + can be provided in DT to handle these broken case. 66 + $ref: /schemas/types.yaml#/definitions/uint32 67 + 58 68 patternProperties: 59 69 "^cpu@[0-9]$": 60 70 type: object ··· 73 63 74 64 required: 75 65 - mips-hpt-frequency 66 + 67 + if: 68 + properties: 69 + compatible: 70 + contains: 71 + enum: 72 + - brcm,bcm6358 73 + - brcm,bcm6368 74 + 75 + then: 76 + properties: 77 + cpus: 78 + required: 79 + - brcm,bmips-cbr-reg 76 80 77 81 additionalProperties: true 78 82
+5
Documentation/devicetree/bindings/mips/mobileye.yaml
··· 26 26 - enum: 27 27 - mobileye,eyeq5-epm5 28 28 - const: mobileye,eyeq5 29 + - description: Boards with Mobileye EyeQ6H SoC 30 + items: 31 + - enum: 32 + - mobileye,eyeq6h-epm6 33 + - const: mobileye,eyeq6h 29 34 30 35 additionalProperties: true 31 36
+4
Documentation/devicetree/bindings/mips/realtek-rtl.yaml
··· 20 20 - enum: 21 21 - cisco,sg220-26 22 22 - const: realtek,rtl8382-soc 23 + - items: 24 + - enum: 25 + - cameo,rtl9302c-2x-rtl8224-2xge 26 + - const: realtek,rtl9302-soc 23 27 24 28 additionalProperties: true
+374
Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/soc/mobileye/mobileye,eyeq5-olb.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Mobileye EyeQ SoC system controller 8 + 9 + maintainers: 10 + - Grégory Clement <gregory.clement@bootlin.com> 11 + - Théo Lebrun <theo.lebrun@bootlin.com> 12 + - Vladimir Kondratiev <vladimir.kondratiev@mobileye.com> 13 + 14 + description: 15 + OLB ("Other Logic Block") is a hardware block grouping smaller blocks. Clocks, 16 + resets, pinctrl are being handled from here. EyeQ5 and EyeQ6L host a single 17 + instance. EyeQ6H hosts seven instances. 18 + 19 + properties: 20 + compatible: 21 + items: 22 + - enum: 23 + - mobileye,eyeq5-olb 24 + - mobileye,eyeq6l-olb 25 + - mobileye,eyeq6h-acc-olb 26 + - mobileye,eyeq6h-central-olb 27 + - mobileye,eyeq6h-east-olb 28 + - mobileye,eyeq6h-west-olb 29 + - mobileye,eyeq6h-south-olb 30 + - mobileye,eyeq6h-ddr0-olb 31 + - mobileye,eyeq6h-ddr1-olb 32 + - const: syscon 33 + 34 + reg: 35 + maxItems: 1 36 + 37 + '#reset-cells': 38 + description: 39 + First cell is domain and optional if compatible has a single reset domain. 40 + Second cell is reset index inside that domain. 41 + enum: [ 1, 2 ] 42 + 43 + '#clock-cells': 44 + description: 45 + Cell is clock index. Optional if compatible has a single clock. 46 + enum: [ 0, 1 ] 47 + 48 + clocks: 49 + maxItems: 1 50 + description: 51 + Input parent clock to all PLLs. Expected to be the main crystal. 52 + 53 + clock-names: 54 + const: ref 55 + 56 + patternProperties: 57 + '-pins?$': 58 + type: object 59 + description: Pin muxing configuration. 60 + $ref: /schemas/pinctrl/pinmux-node.yaml# 61 + additionalProperties: false 62 + properties: 63 + pins: true 64 + function: 65 + enum: [gpio, 66 + # Bank A 67 + timer0, timer1, timer2, timer5, uart0, uart1, can0, can1, spi0, 68 + spi1, refclk0, 69 + # Bank B 70 + timer3, timer4, timer6, uart2, can2, spi2, spi3, mclk0] 71 + bias-disable: true 72 + bias-pull-down: true 73 + bias-pull-up: true 74 + drive-strength: true 75 + required: 76 + - pins 77 + - function 78 + allOf: 79 + - if: 80 + properties: 81 + function: 82 + const: gpio 83 + then: 84 + properties: 85 + pins: 86 + items: # PA0 - PA28, PB0 - PB22 87 + pattern: '^(P(A|B)1?[0-9]|PA2[0-8]|PB2[0-2])$' 88 + - if: 89 + properties: 90 + function: 91 + const: timer0 92 + then: 93 + properties: 94 + pins: 95 + items: 96 + enum: [PA0, PA1] 97 + - if: 98 + properties: 99 + function: 100 + const: timer1 101 + then: 102 + properties: 103 + pins: 104 + items: 105 + enum: [PA2, PA3] 106 + - if: 107 + properties: 108 + function: 109 + const: timer2 110 + then: 111 + properties: 112 + pins: 113 + items: 114 + enum: [PA4, PA5] 115 + - if: 116 + properties: 117 + function: 118 + const: timer5 119 + then: 120 + properties: 121 + pins: 122 + items: 123 + enum: [PA6, PA7, PA8, PA9] 124 + - if: 125 + properties: 126 + function: 127 + const: uart0 128 + then: 129 + properties: 130 + pins: 131 + items: 132 + enum: [PA10, PA11] 133 + - if: 134 + properties: 135 + function: 136 + const: uart1 137 + then: 138 + properties: 139 + pins: 140 + items: 141 + enum: [PA12, PA13] 142 + - if: 143 + properties: 144 + function: 145 + const: can0 146 + then: 147 + properties: 148 + pins: 149 + items: 150 + enum: [PA14, PA15] 151 + - if: 152 + properties: 153 + function: 154 + const: can1 155 + then: 156 + properties: 157 + pins: 158 + items: 159 + enum: [PA16, PA17] 160 + - if: 161 + properties: 162 + function: 163 + const: spi0 164 + then: 165 + properties: 166 + pins: 167 + items: 168 + enum: [PA18, PA19, PA20, PA21, PA22] 169 + - if: 170 + properties: 171 + function: 172 + const: spi1 173 + then: 174 + properties: 175 + pins: 176 + items: 177 + enum: [PA23, PA24, PA25, PA26, PA27] 178 + - if: 179 + properties: 180 + function: 181 + const: refclk0 182 + then: 183 + properties: 184 + pins: 185 + items: 186 + enum: [PA28] 187 + - if: 188 + properties: 189 + function: 190 + const: timer3 191 + then: 192 + properties: 193 + pins: 194 + items: 195 + enum: [PB0, PB1] 196 + - if: 197 + properties: 198 + function: 199 + const: timer4 200 + then: 201 + properties: 202 + pins: 203 + items: 204 + enum: [PB2, PB3] 205 + - if: 206 + properties: 207 + function: 208 + const: timer6 209 + then: 210 + properties: 211 + pins: 212 + items: 213 + enum: [PB4, PB5, PB6, PB7] 214 + - if: 215 + properties: 216 + function: 217 + const: uart2 218 + then: 219 + properties: 220 + pins: 221 + items: 222 + enum: [PB8, PB9] 223 + - if: 224 + properties: 225 + function: 226 + const: can2 227 + then: 228 + properties: 229 + pins: 230 + items: 231 + enum: [PB10, PB11] 232 + - if: 233 + properties: 234 + function: 235 + const: spi2 236 + then: 237 + properties: 238 + pins: 239 + items: 240 + enum: [PB12, PB13, PB14, PB15, PB16] 241 + - if: 242 + properties: 243 + function: 244 + const: spi3 245 + then: 246 + properties: 247 + pins: 248 + items: 249 + enum: [PB17, PB18, PB19, PB20, PB21] 250 + - if: 251 + properties: 252 + function: 253 + const: mclk0 254 + then: 255 + properties: 256 + pins: 257 + items: 258 + enum: [PB22] 259 + 260 + required: 261 + - compatible 262 + - reg 263 + - '#clock-cells' 264 + - clocks 265 + - clock-names 266 + 267 + additionalProperties: false 268 + 269 + allOf: 270 + # Compatibles exposing a single reset domain. 271 + - if: 272 + properties: 273 + compatible: 274 + contains: 275 + enum: 276 + - mobileye,eyeq6h-acc-olb 277 + - mobileye,eyeq6h-east-olb 278 + - mobileye,eyeq6h-west-olb 279 + then: 280 + properties: 281 + '#reset-cells': 282 + const: 1 283 + required: 284 + - '#reset-cells' 285 + 286 + # Compatibles exposing two reset domains. 287 + - if: 288 + properties: 289 + compatible: 290 + contains: 291 + enum: 292 + - mobileye,eyeq5-olb 293 + - mobileye,eyeq6l-olb 294 + then: 295 + properties: 296 + '#reset-cells': 297 + const: 2 298 + required: 299 + - '#reset-cells' 300 + 301 + # Compatibles not exposing resets. 302 + - if: 303 + properties: 304 + compatible: 305 + contains: 306 + enum: 307 + - mobileye,eyeq6h-central-olb 308 + - mobileye,eyeq6h-south-olb 309 + - mobileye,eyeq6h-ddr0-olb 310 + - mobileye,eyeq6h-ddr1-olb 311 + then: 312 + properties: 313 + '#reset-cells': false 314 + 315 + # Compatibles exposing a single clock. 316 + - if: 317 + properties: 318 + compatible: 319 + contains: 320 + enum: 321 + - mobileye,eyeq6h-central-olb 322 + - mobileye,eyeq6h-east-olb 323 + - mobileye,eyeq6h-west-olb 324 + - mobileye,eyeq6h-ddr0-olb 325 + - mobileye,eyeq6h-ddr1-olb 326 + then: 327 + properties: 328 + '#clock-cells': 329 + const: 0 330 + else: 331 + properties: 332 + '#clock-cells': 333 + const: 1 334 + 335 + # Only EyeQ5 has pinctrl in OLB. 336 + - if: 337 + not: 338 + properties: 339 + compatible: 340 + contains: 341 + const: mobileye,eyeq5-olb 342 + then: 343 + patternProperties: 344 + '-pins?$': false 345 + 346 + examples: 347 + - | 348 + soc { 349 + #address-cells = <2>; 350 + #size-cells = <2>; 351 + 352 + system-controller@e00000 { 353 + compatible = "mobileye,eyeq5-olb", "syscon"; 354 + reg = <0 0xe00000 0x0 0x400>; 355 + #reset-cells = <2>; 356 + #clock-cells = <1>; 357 + clocks = <&xtal>; 358 + clock-names = "ref"; 359 + }; 360 + }; 361 + - | 362 + soc { 363 + #address-cells = <2>; 364 + #size-cells = <2>; 365 + 366 + system-controller@d2003000 { 367 + compatible = "mobileye,eyeq6h-acc-olb", "syscon"; 368 + reg = <0x0 0xd2003000 0x0 0x1000>; 369 + #reset-cells = <1>; 370 + #clock-cells = <1>; 371 + clocks = <&xtal>; 372 + clock-names = "ref"; 373 + }; 374 + };
+2
Documentation/devicetree/bindings/vendor-prefixes.yaml
··· 246 246 description: CALAO Systems SAS 247 247 "^calxeda,.*": 248 248 description: Calxeda 249 + "^cameo,.*": 250 + description: Cameo Communications, Inc 249 251 "^canaan,.*": 250 252 description: Canaan, Inc. 251 253 "^caninos,.*":
+5
MAINTAINERS
··· 15406 15406 L: linux-mips@vger.kernel.org 15407 15407 S: Maintained 15408 15408 F: Documentation/devicetree/bindings/mips/mobileye.yaml 15409 + F: Documentation/devicetree/bindings/soc/mobileye/ 15409 15410 F: arch/mips/boot/dts/mobileye/ 15410 15411 F: arch/mips/configs/eyeq5_defconfig 15411 15412 F: arch/mips/mobileye/board-epm5.its.S 15413 + F: drivers/clk/clk-eyeq.c 15414 + F: drivers/pinctrl/pinctrl-eyeq5.c 15415 + F: drivers/reset/reset-eyeq.c 15416 + F: include/dt-bindings/clock/mobileye,eyeq5-clk.h 15412 15417 15413 15418 MODULE SUPPORT 15414 15419 M: Luis Chamberlain <mcgrof@kernel.org>
+1 -1
arch/mips/Kbuild.platforms
··· 8 8 platform-$(CONFIG_BCM63XX) += bcm63xx/ 9 9 platform-$(CONFIG_BMIPS_GENERIC) += bmips/ 10 10 platform-$(CONFIG_CAVIUM_OCTEON_SOC) += cavium-octeon/ 11 + platform-$(CONFIG_EYEQ) += mobileye/ 11 12 platform-$(CONFIG_MIPS_COBALT) += cobalt/ 12 13 platform-$(CONFIG_MACH_DECSTATION) += dec/ 13 14 platform-$(CONFIG_MIPS_GENERIC) += generic/ ··· 18 17 platform-$(CONFIG_MACH_LOONGSON32) += loongson32/ 19 18 platform-$(CONFIG_MACH_LOONGSON64) += loongson64/ 20 19 platform-$(CONFIG_MIPS_MALTA) += mti-malta/ 21 - platform-$(CONFIG_MACH_EYEQ5) += mobileye/ 22 20 platform-$(CONFIG_MACH_NINTENDO64) += n64/ 23 21 platform-$(CONFIG_PIC32MZDA) += pic32/ 24 22 platform-$(CONFIG_RALINK) += ralink/
+7 -4
arch/mips/Kconfig
··· 30 30 select BUILDTIME_TABLE_SORT 31 31 select CLONE_BACKWARDS 32 32 select CPU_NO_EFFICIENT_FFS if (TARGET_ISA_REV < 1) 33 - select CPU_PM if CPU_IDLE 33 + select CPU_PM if CPU_IDLE || SUSPEND 34 34 select GENERIC_ATOMIC64 if !64BIT 35 35 select GENERIC_CMOS_UPDATE 36 36 select GENERIC_CPU_AUTOPROBE ··· 575 575 Microchip PIC32 is a family of general-purpose 32 bit MIPS core 576 576 microcontrollers. 577 577 578 - config MACH_EYEQ5 579 - bool "Mobileye EyeQ5 SoC" 578 + config EYEQ 579 + bool "Mobileye EyeQ SoC" 580 580 select MACH_GENERIC_CORE 581 581 select ARM_AMBA 582 582 select PHYSICAL_START_BOOL ··· 615 615 select USB_UHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN 616 616 select USE_OF 617 617 help 618 - Select this to build a kernel supporting EyeQ5 SoC from Mobileye. 618 + Select this to build a kernel supporting EyeQ SoC from Mobileye. 619 619 620 620 bool 621 621 ··· 667 667 select BOOT_RAW 668 668 select PINCTRL 669 669 select USE_OF 670 + select REALTEK_OTTO_TIMER 670 671 671 672 config SGI_IP22 672 673 bool "SGI IP22 (Indy/Indigo2)" ··· 1022 1021 source "arch/mips/ingenic/Kconfig" 1023 1022 source "arch/mips/jazz/Kconfig" 1024 1023 source "arch/mips/lantiq/Kconfig" 1024 + source "arch/mips/mobileye/Kconfig" 1025 1025 source "arch/mips/pic32/Kconfig" 1026 1026 source "arch/mips/ralink/Kconfig" 1027 1027 source "arch/mips/sgi-ip27/Kconfig" ··· 1085 1083 1086 1084 config CSRC_R4K 1087 1085 select CLOCKSOURCE_WATCHDOG if CPU_FREQ 1086 + select HAVE_UNSTABLE_SCHED_CLOCK if SMP && 64BIT 1088 1087 bool 1089 1088 1090 1089 config CSRC_SB1250
+1 -1
arch/mips/Makefile
··· 170 170 -Wa,--trap 171 171 cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=rm7000,-march=mips4) \ 172 172 -Wa,--trap 173 - cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=mips64r1) \ 173 + cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=mips64) \ 174 174 -Wa,--trap 175 175 cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mdmx) 176 176 cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mips3d)
+4 -4
arch/mips/alchemy/common/platform.c
··· 409 409 if (alchemy_get_macs(ctype) < 1) 410 410 return; 411 411 412 - macres = kmemdup(au1xxx_eth0_resources[ctype], 413 - sizeof(struct resource) * MAC_RES_COUNT, GFP_KERNEL); 412 + macres = kmemdup_array(au1xxx_eth0_resources[ctype], MAC_RES_COUNT, 413 + sizeof(*macres), GFP_KERNEL); 414 414 if (!macres) { 415 415 printk(KERN_INFO "Alchemy: no memory for MAC0 resources\n"); 416 416 return; ··· 430 430 if (alchemy_get_macs(ctype) < 2) 431 431 return; 432 432 433 - macres = kmemdup(au1xxx_eth1_resources[ctype], 434 - sizeof(struct resource) * MAC_RES_COUNT, GFP_KERNEL); 433 + macres = kmemdup_array(au1xxx_eth1_resources[ctype], MAC_RES_COUNT, 434 + sizeof(*macres), GFP_KERNEL); 435 435 if (!macres) { 436 436 printk(KERN_INFO "Alchemy: no memory for MAC1 resources\n"); 437 437 return;
+42 -38
arch/mips/alchemy/devboards/db1000.c
··· 10 10 #include <linux/dma-mapping.h> 11 11 #include <linux/gpio.h> 12 12 #include <linux/gpio/machine.h> 13 + #include <linux/gpio/property.h> 13 14 #include <linux/init.h> 14 15 #include <linux/interrupt.h> 15 16 #include <linux/leds.h> 16 17 #include <linux/mmc/host.h> 17 18 #include <linux/platform_device.h> 19 + #include <linux/property.h> 18 20 #include <linux/pm.h> 19 21 #include <linux/spi/spi.h> 20 22 #include <linux/spi/spi_gpio.h> 21 - #include <linux/spi/ads7846.h> 22 23 #include <asm/mach-au1x00/au1000.h> 23 24 #include <asm/mach-au1x00/gpio-au1000.h> 24 25 #include <asm/mach-au1x00/au1000_dma.h> ··· 375 374 376 375 /******************************************************************************/ 377 376 378 - static struct ads7846_platform_data db1100_touch_pd = { 379 - .model = 7846, 380 - .vref_mv = 3300, 377 + static const struct software_node db1100_alchemy2_gpiochip = { 378 + .name = "alchemy-gpio2", 381 379 }; 382 380 383 - static struct spi_gpio_platform_data db1100_spictl_pd = { 384 - .num_chipselect = 1, 381 + static const struct property_entry db1100_ads7846_properties[] = { 382 + PROPERTY_ENTRY_U16("ti,vref_min", 3300), 383 + PROPERTY_ENTRY_GPIO("pendown-gpios", 384 + &db1100_alchemy2_gpiochip, 21, GPIO_ACTIVE_LOW), 385 + { } 385 386 }; 386 387 387 - static struct gpiod_lookup_table db1100_touch_gpio_table = { 388 - .dev_id = "spi0.0", 389 - .table = { 390 - GPIO_LOOKUP("alchemy-gpio2", 21, 391 - "pendown", GPIO_ACTIVE_LOW), 392 - { } 393 - }, 388 + static const struct software_node db1100_ads7846_swnode = { 389 + .name = "ads7846", 390 + .properties = db1100_ads7846_properties, 394 391 }; 395 392 396 393 static struct spi_board_info db1100_spi_info[] __initdata = { ··· 399 400 .chip_select = 0, 400 401 .mode = 0, 401 402 .irq = AU1100_GPIO21_INT, 402 - .platform_data = &db1100_touch_pd, 403 + .swnode = &db1100_ads7846_swnode, 403 404 }, 404 405 }; 405 406 406 - static struct platform_device db1100_spi_dev = { 407 - .name = "spi_gpio", 408 - .id = 0, 409 - .dev = { 410 - .platform_data = &db1100_spictl_pd, 411 - .dma_mask = &au1xxx_all_dmamask, 412 - .coherent_dma_mask = DMA_BIT_MASK(32), 413 - }, 407 + static const struct spi_gpio_platform_data db1100_spictl_pd __initconst = { 408 + .num_chipselect = 1, 414 409 }; 415 410 416 411 /* 417 412 * Alchemy GPIO 2 has its base at 200 so the GPIO lines 418 413 * 207 thru 210 are GPIOs at offset 7 thru 10 at this chip. 419 414 */ 420 - static struct gpiod_lookup_table db1100_spi_gpiod_table = { 421 - .dev_id = "spi_gpio", 422 - .table = { 423 - GPIO_LOOKUP("alchemy-gpio2", 9, 424 - "sck", GPIO_ACTIVE_HIGH), 425 - GPIO_LOOKUP("alchemy-gpio2", 8, 426 - "mosi", GPIO_ACTIVE_HIGH), 427 - GPIO_LOOKUP("alchemy-gpio2", 7, 428 - "miso", GPIO_ACTIVE_HIGH), 429 - GPIO_LOOKUP("alchemy-gpio2", 10, 430 - "cs", GPIO_ACTIVE_HIGH), 431 - { }, 432 - }, 415 + static const struct property_entry db1100_spi_dev_properties[] __initconst = { 416 + PROPERTY_ENTRY_GPIO("miso-gpios", 417 + &db1100_alchemy2_gpiochip, 7, GPIO_ACTIVE_HIGH), 418 + PROPERTY_ENTRY_GPIO("mosi-gpios", 419 + &db1100_alchemy2_gpiochip, 8, GPIO_ACTIVE_HIGH), 420 + PROPERTY_ENTRY_GPIO("sck-gpios", 421 + &db1100_alchemy2_gpiochip, 9, GPIO_ACTIVE_HIGH), 422 + PROPERTY_ENTRY_GPIO("cs-gpios", 423 + &db1100_alchemy2_gpiochip, 10, GPIO_ACTIVE_HIGH), 424 + { } 425 + }; 426 + 427 + static const struct platform_device_info db1100_spi_dev_info __initconst = { 428 + .name = "spi_gpio", 429 + .id = 0, 430 + .data = &db1100_spictl_pd, 431 + .size_data = sizeof(db1100_spictl_pd), 432 + .dma_mask = DMA_BIT_MASK(32), 433 + .properties = db1100_spi_dev_properties, 433 434 }; 434 435 435 436 static struct platform_device *db1x00_devs[] = { ··· 451 452 { 452 453 int board = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)); 453 454 int c0, c1, d0, d1, s0, s1, flashsize = 32, twosocks = 1; 455 + int err; 454 456 unsigned long pfc; 455 457 struct clk *c, *p; 458 + struct platform_device *spi_dev; 456 459 457 460 if (board == BCSR_WHOAMI_DB1500) { 458 461 c0 = AU1500_GPIO2_INT; ··· 481 480 pfc |= (1 << 0); /* SSI0 pins as GPIOs */ 482 481 alchemy_wrsys(pfc, AU1000_SYS_PINFUNC); 483 482 484 - gpiod_add_lookup_table(&db1100_touch_gpio_table); 483 + software_node_register(&db1100_alchemy2_gpiochip); 485 484 spi_register_board_info(db1100_spi_info, 486 485 ARRAY_SIZE(db1100_spi_info)); 487 486 ··· 498 497 clk_put(p); 499 498 500 499 platform_add_devices(db1100_devs, ARRAY_SIZE(db1100_devs)); 501 - gpiod_add_lookup_table(&db1100_spi_gpiod_table); 502 - platform_device_register(&db1100_spi_dev); 500 + 501 + spi_dev = platform_device_register_full(&db1100_spi_dev_info); 502 + err = PTR_ERR_OR_ZERO(spi_dev); 503 + if (err) 504 + pr_err("failed to register SPI controller: %d\n", err); 503 505 } else if (board == BCSR_WHOAMI_DB1000) { 504 506 c0 = AU1000_GPIO2_INT; 505 507 c1 = AU1000_GPIO5_INT;
+3
arch/mips/bcm47xx/prom.c
··· 32 32 #include <linux/ssb/ssb_driver_chipcommon.h> 33 33 #include <linux/ssb/ssb_regs.h> 34 34 #include <linux/smp.h> 35 + #include <asm/bmips.h> 35 36 #include <asm/bootinfo.h> 36 37 #include <bcm47xx.h> 37 38 #include <bcm47xx_board.h> ··· 111 110 112 111 void __init prom_init(void) 113 112 { 113 + /* Cache CBR addr before CPU/DMA setup */ 114 + bmips_cbr_addr = BMIPS_GET_CBR(); 114 115 prom_init_mem(); 115 116 setup_8250_early_printk_port(CKSEG1ADDR(BCM47XX_SERIAL_ADDR), 0, 0); 116 117 }
+8
arch/mips/bcm47xx/setup.c
··· 37 37 #include <linux/ssb/ssb.h> 38 38 #include <linux/ssb/ssb_embedded.h> 39 39 #include <linux/bcma/bcma_soc.h> 40 + #include <asm/bmips.h> 40 41 #include <asm/bootinfo.h> 41 42 #include <asm/idle.h> 42 43 #include <asm/prom.h> ··· 45 44 #include <asm/time.h> 46 45 #include <bcm47xx.h> 47 46 #include <bcm47xx_board.h> 47 + 48 + /* 49 + * CBR addr doesn't change and we can cache it. 50 + * For broken SoC/Bootloader CBR addr might also be provided via DT 51 + * with "brcm,bmips-cbr-reg" in the "cpus" node. 52 + */ 53 + void __iomem *bmips_cbr_addr __read_mostly; 48 54 49 55 union bcm47xx_bus bcm47xx_bus; 50 56 EXPORT_SYMBOL(bcm47xx_bus);
+3
arch/mips/bcm63xx/prom.c
··· 22 22 { 23 23 u32 reg, mask; 24 24 25 + /* Cache CBR addr before CPU/DMA setup */ 26 + bmips_cbr_addr = BMIPS_GET_CBR(); 27 + 25 28 bcm63xx_cpu_init(); 26 29 27 30 /* stop any running watchdog */
+8
arch/mips/bcm63xx/setup.c
··· 12 12 #include <linux/memblock.h> 13 13 #include <linux/ioport.h> 14 14 #include <linux/pm.h> 15 + #include <asm/bmips.h> 15 16 #include <asm/bootinfo.h> 16 17 #include <asm/time.h> 17 18 #include <asm/reboot.h> ··· 22 21 #include <bcm63xx_regs.h> 23 22 #include <bcm63xx_io.h> 24 23 #include <bcm63xx_gpio.h> 24 + 25 + /* 26 + * CBR addr doesn't change and we can cache it. 27 + * For broken SoC/Bootloader CBR addr might also be provided via DT 28 + * with "brcm,bmips-cbr-reg" in the "cpus" node. 29 + */ 30 + void __iomem *bmips_cbr_addr __read_mostly; 25 31 26 32 void bcm63xx_machine_halt(void) 27 33 {
+1 -1
arch/mips/bmips/dma.c
··· 9 9 10 10 void arch_sync_dma_for_cpu_all(void) 11 11 { 12 - void __iomem *cbr = BMIPS_GET_CBR(); 12 + void __iomem *cbr = bmips_cbr_addr; 13 13 u32 cfg; 14 14 15 15 if (boot_cpu_type() != CPU_BMIPS3300 &&
+33 -2
arch/mips/bmips/setup.c
··· 34 34 #define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c)) 35 35 #define BCM6328_TP1_DISABLED BIT(9) 36 36 37 + /* 38 + * CBR addr doesn't change and we can cache it. 39 + * For broken SoC/Bootloader CBR addr might also be provided via DT 40 + * with "brcm,bmips-cbr-reg" in the "cpus" node. 41 + */ 42 + void __iomem *bmips_cbr_addr __read_mostly; 43 + 37 44 extern bool bmips_rac_flush_disable; 38 45 39 46 static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000; ··· 118 111 * because the bootloader is not initializing it properly. 119 112 */ 120 113 bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31)) || 121 - !!BMIPS_GET_CBR(); 114 + !!bmips_cbr_addr; 122 115 } 123 116 124 117 static void bcm6368_quirks(void) ··· 151 144 152 145 void __init prom_init(void) 153 146 { 147 + /* Cache CBR addr before CPU/DMA setup */ 148 + bmips_cbr_addr = BMIPS_GET_CBR(); 154 149 bmips_init_cfe(); 155 150 bmips_cpu_setup(); 156 151 register_bmips_smp_ops(); ··· 212 203 void __init device_tree_init(void) 213 204 { 214 205 struct device_node *np; 206 + u32 addr; 215 207 216 208 unflatten_and_copy_device_tree(); 217 209 218 210 /* Disable SMP boot unless both CPUs are listed in DT and !disabled */ 219 211 np = of_find_node_by_name(NULL, "cpus"); 220 - if (np && of_get_available_child_count(np) <= 1) 212 + if (!np) 213 + return; 214 + 215 + if (of_get_available_child_count(np) <= 1) 221 216 bmips_smp_enabled = 0; 217 + 218 + /* Check if DT provide a CBR address */ 219 + if (of_property_read_u32(np, "brcm,bmips-cbr-reg", &addr)) 220 + goto exit; 221 + 222 + /* Make sure CBR address is outside DRAM window */ 223 + if (addr >= (u32)memblock_start_of_DRAM() && 224 + addr < (u32)memblock_end_of_DRAM()) { 225 + WARN(1, "DT CBR %x inside DRAM window. Ignoring DT CBR.\n", 226 + addr); 227 + goto exit; 228 + } 229 + 230 + bmips_cbr_addr = (void __iomem *)addr; 231 + /* Since CBR is provided by DT, enable RAC flush */ 232 + bmips_rac_flush_disable = false; 233 + 234 + exit: 222 235 of_node_put(np); 223 236 } 224 237
+1 -1
arch/mips/boot/dts/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 subdir-$(CONFIG_BMIPS_GENERIC) += brcm 3 3 subdir-$(CONFIG_CAVIUM_OCTEON_SOC) += cavium-octeon 4 + subdir-$(CONFIG_EYEQ) += mobileye 4 5 subdir-$(CONFIG_FIT_IMAGE_FDT_MARDUK) += img 5 6 subdir-$(CONFIG_FIT_IMAGE_FDT_BOSTON) += img 6 7 subdir-$(CONFIG_MACH_INGENIC) += ingenic ··· 9 8 subdir-$(CONFIG_MACH_LOONGSON64) += loongson 10 9 subdir-$(CONFIG_SOC_VCOREIII) += mscc 11 10 subdir-$(CONFIG_MIPS_MALTA) += mti 12 - subdir-$(CONFIG_MACH_EYEQ5) += mobileye 13 11 subdir-$(CONFIG_LEGACY_BOARD_SEAD3) += mti 14 12 subdir-$(CONFIG_FIT_IMAGE_FDT_NI169445) += ni 15 13 subdir-$(CONFIG_MACH_PIC32) += pic32
+63 -39
arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi
··· 23 23 }; 24 24 }; 25 25 26 - memory@200000 { 27 - compatible = "memory"; 28 - device_type = "memory"; 29 - reg = <0x00000000 0x00200000 0x00000000 0x0ee00000>, /* 238 MB at 2 MB */ 30 - <0x00000000 0x20000000 0x00000000 0x1f000000>, /* 496 MB at 512 MB */ 31 - <0x00000001 0x10000000 0x00000001 0xb0000000>; /* 6912 MB at 4352MB */ 32 - }; 33 - 34 26 cpu_clk: cpu_clk { 35 27 #clock-cells = <0>; 36 28 compatible = "fixed-clock"; ··· 43 51 ranges = <0 0x10000000 0 0x10000000 0 0x10000000 /* ioports */ 44 52 0 0x40000000 0 0x40000000 0 0x40000000 45 53 0xfe 0x00000000 0xfe 0x00000000 0 0x40000000>; 54 + 55 + isa@18000000 { 56 + compatible = "isa"; 57 + #size-cells = <1>; 58 + #address-cells = <2>; 59 + ranges = <1 0x0 0x0 0x18000000 0x4000>; 60 + }; 46 61 47 62 pm: reset-controller@1fe07000 { 48 63 compatible = "loongson,ls2k-pm"; ··· 99 100 rtc0: rtc@1fe07800 { 100 101 compatible = "loongson,ls2k1000-rtc"; 101 102 reg = <0 0x1fe07800 0 0x78>; 102 - interrupt-parent = <&liointc0>; 103 - interrupts = <60 IRQ_TYPE_LEVEL_LOW>; 103 + interrupt-parent = <&liointc1>; 104 + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; 104 105 }; 105 106 106 107 uart0: serial@1fe00000 { ··· 108 109 reg = <0 0x1fe00000 0 0x8>; 109 110 clock-frequency = <125000000>; 110 111 interrupt-parent = <&liointc0>; 111 - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 112 + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; 112 113 no-loopback-test; 113 114 }; 114 115 ··· 117 118 device_type = "pci"; 118 119 #address-cells = <3>; 119 120 #size-cells = <2>; 120 - #interrupt-cells = <2>; 121 121 122 122 reg = <0 0x1a000000 0 0x02000000>, 123 123 <0xfe 0x00000000 0 0x20000000>; ··· 131 133 "pciclass0c03"; 132 134 133 135 reg = <0x1800 0x0 0x0 0x0 0x0>; 134 - interrupts = <12 IRQ_TYPE_LEVEL_LOW>, 135 - <13 IRQ_TYPE_LEVEL_LOW>; 136 + interrupts = <12 IRQ_TYPE_LEVEL_HIGH>, 137 + <13 IRQ_TYPE_LEVEL_HIGH>; 136 138 interrupt-names = "macirq", "eth_lpi"; 137 139 interrupt-parent = <&liointc0>; 138 - phy-mode = "rgmii"; 140 + phy-mode = "rgmii-id"; 141 + phy-handle = <&phy1>; 139 142 mdio { 140 143 #address-cells = <1>; 141 144 #size-cells = <0>; ··· 155 156 "loongson, pci-gmac"; 156 157 157 158 reg = <0x1900 0x0 0x0 0x0 0x0>; 158 - interrupts = <14 IRQ_TYPE_LEVEL_LOW>, 159 - <15 IRQ_TYPE_LEVEL_LOW>; 159 + interrupts = <14 IRQ_TYPE_LEVEL_HIGH>, 160 + <15 IRQ_TYPE_LEVEL_HIGH>; 160 161 interrupt-names = "macirq", "eth_lpi"; 161 162 interrupt-parent = <&liointc0>; 162 - phy-mode = "rgmii"; 163 + phy-mode = "rgmii-id"; 164 + phy-handle = <&phy1>; 163 165 mdio { 164 166 #address-cells = <1>; 165 167 #size-cells = <0>; ··· 178 178 "pciclass0c03"; 179 179 180 180 reg = <0x2100 0x0 0x0 0x0 0x0>; 181 - interrupts = <18 IRQ_TYPE_LEVEL_LOW>; 181 + interrupts = <18 IRQ_TYPE_LEVEL_HIGH>; 182 182 interrupt-parent = <&liointc1>; 183 183 }; 184 184 ··· 189 189 "pciclass0c03"; 190 190 191 191 reg = <0x2200 0x0 0x0 0x0 0x0>; 192 - interrupts = <19 IRQ_TYPE_LEVEL_LOW>; 192 + interrupts = <19 IRQ_TYPE_LEVEL_HIGH>; 193 193 interrupt-parent = <&liointc1>; 194 194 }; 195 195 ··· 200 200 "pciclass0106"; 201 201 202 202 reg = <0x4000 0x0 0x0 0x0 0x0>; 203 - interrupts = <19 IRQ_TYPE_LEVEL_LOW>; 203 + interrupts = <19 IRQ_TYPE_LEVEL_HIGH>; 204 204 interrupt-parent = <&liointc0>; 205 205 }; 206 206 207 - pci_bridge@9,0 { 207 + pcie@9,0 { 208 208 compatible = "pci0014,7a19.0", 209 209 "pci0014,7a19", 210 210 "pciclass060400", 211 211 "pciclass0604"; 212 212 213 213 reg = <0x4800 0x0 0x0 0x0 0x0>; 214 + #address-cells = <3>; 215 + #size-cells = <2>; 216 + device_type = "pci"; 214 217 #interrupt-cells = <1>; 215 - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 218 + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; 216 219 interrupt-parent = <&liointc1>; 217 220 interrupt-map-mask = <0 0 0 0>; 218 - interrupt-map = <0 0 0 0 &liointc1 0 IRQ_TYPE_LEVEL_LOW>; 221 + interrupt-map = <0 0 0 0 &liointc1 0 IRQ_TYPE_LEVEL_HIGH>; 222 + ranges; 219 223 external-facing; 220 224 }; 221 225 222 - pci_bridge@a,0 { 226 + pcie@a,0 { 223 227 compatible = "pci0014,7a09.0", 224 228 "pci0014,7a09", 225 229 "pciclass060400", 226 230 "pciclass0604"; 227 231 228 232 reg = <0x5000 0x0 0x0 0x0 0x0>; 233 + #address-cells = <3>; 234 + #size-cells = <2>; 235 + device_type = "pci"; 229 236 #interrupt-cells = <1>; 230 - interrupts = <1 IRQ_TYPE_LEVEL_LOW>; 237 + interrupts = <1 IRQ_TYPE_LEVEL_HIGH>; 231 238 interrupt-parent = <&liointc1>; 232 239 interrupt-map-mask = <0 0 0 0>; 233 - interrupt-map = <0 0 0 0 &liointc1 1 IRQ_TYPE_LEVEL_LOW>; 240 + interrupt-map = <0 0 0 0 &liointc1 1 IRQ_TYPE_LEVEL_HIGH>; 241 + ranges; 234 242 external-facing; 235 243 }; 236 244 237 - pci_bridge@b,0 { 245 + pcie@b,0 { 238 246 compatible = "pci0014,7a09.0", 239 247 "pci0014,7a09", 240 248 "pciclass060400", 241 249 "pciclass0604"; 242 250 243 251 reg = <0x5800 0x0 0x0 0x0 0x0>; 252 + #address-cells = <3>; 253 + #size-cells = <2>; 254 + device_type = "pci"; 244 255 #interrupt-cells = <1>; 245 - interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 256 + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; 246 257 interrupt-parent = <&liointc1>; 247 258 interrupt-map-mask = <0 0 0 0>; 248 - interrupt-map = <0 0 0 0 &liointc1 2 IRQ_TYPE_LEVEL_LOW>; 259 + interrupt-map = <0 0 0 0 &liointc1 2 IRQ_TYPE_LEVEL_HIGH>; 260 + ranges; 249 261 external-facing; 250 262 }; 251 263 252 - pci_bridge@c,0 { 264 + pcie@c,0 { 253 265 compatible = "pci0014,7a09.0", 254 266 "pci0014,7a09", 255 267 "pciclass060400", 256 268 "pciclass0604"; 257 269 258 270 reg = <0x6000 0x0 0x0 0x0 0x0>; 271 + #address-cells = <3>; 272 + #size-cells = <2>; 273 + device_type = "pci"; 259 274 #interrupt-cells = <1>; 260 - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 275 + interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; 261 276 interrupt-parent = <&liointc1>; 262 277 interrupt-map-mask = <0 0 0 0>; 263 - interrupt-map = <0 0 0 0 &liointc1 3 IRQ_TYPE_LEVEL_LOW>; 278 + interrupt-map = <0 0 0 0 &liointc1 3 IRQ_TYPE_LEVEL_HIGH>; 279 + ranges; 264 280 external-facing; 265 281 }; 266 282 267 - pci_bridge@d,0 { 283 + pcie@d,0 { 268 284 compatible = "pci0014,7a19.0", 269 285 "pci0014,7a19", 270 286 "pciclass060400", 271 287 "pciclass0604"; 272 288 273 289 reg = <0x6800 0x0 0x0 0x0 0x0>; 290 + #address-cells = <3>; 291 + #size-cells = <2>; 292 + device_type = "pci"; 274 293 #interrupt-cells = <1>; 275 - interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 294 + interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; 276 295 interrupt-parent = <&liointc1>; 277 296 interrupt-map-mask = <0 0 0 0>; 278 - interrupt-map = <0 0 0 0 &liointc1 4 IRQ_TYPE_LEVEL_LOW>; 297 + interrupt-map = <0 0 0 0 &liointc1 4 IRQ_TYPE_LEVEL_HIGH>; 298 + ranges; 279 299 external-facing; 280 300 }; 281 301 282 - pci_bridge@e,0 { 302 + pcie@e,0 { 283 303 compatible = "pci0014,7a09.0", 284 304 "pci0014,7a09", 285 305 "pciclass060400", 286 306 "pciclass0604"; 287 307 288 308 reg = <0x7000 0x0 0x0 0x0 0x0>; 309 + #address-cells = <3>; 310 + #size-cells = <2>; 311 + device_type = "pci"; 289 312 #interrupt-cells = <1>; 290 - interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 313 + interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; 291 314 interrupt-parent = <&liointc1>; 292 315 interrupt-map-mask = <0 0 0 0>; 293 - interrupt-map = <0 0 0 0 &liointc1 5 IRQ_TYPE_LEVEL_LOW>; 316 + interrupt-map = <0 0 0 0 &liointc1 5 IRQ_TYPE_LEVEL_HIGH>; 317 + ranges; 294 318 external-facing; 295 319 }; 296 320
+1
arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dts
··· 33 33 compatible = "loongson,pch-msi-1.0"; 34 34 reg = <0 0x2ff00000 0 0x8>; 35 35 interrupt-controller; 36 + #interrupt-cells = <1>; 36 37 msi-controller; 37 38 loongson,msi-base-vec = <64>; 38 39 loongson,msi-num-vecs = <192>;
+1
arch/mips/boot/dts/mobileye/Makefile
··· 2 2 # Copyright 2023 Mobileye Vision Technologies Ltd. 3 3 4 4 dtb-$(CONFIG_MACH_EYEQ5) += eyeq5-epm5.dtb 5 + dtb-$(CONFIG_MACH_EYEQ6H) += eyeq6h-epm6.dtb
+16 -38
arch/mips/boot/dts/mobileye/eyeq5-fixed-clocks.dtsi arch/mips/boot/dts/mobileye/eyeq5-clocks.dtsi
··· 3 3 * Copyright 2023 Mobileye Vision Technologies Ltd. 4 4 */ 5 5 6 + #include <dt-bindings/clock/mobileye,eyeq5-clk.h> 7 + 6 8 / { 7 9 /* Fixed clock */ 8 - pll_cpu: pll-cpu { 10 + xtal: xtal { 9 11 compatible = "fixed-clock"; 10 12 #clock-cells = <0>; 11 - clock-frequency = <1500000000>; 12 - }; 13 - 14 - pll_vdi: pll-vdi { 15 - compatible = "fixed-clock"; 16 - #clock-cells = <0>; 17 - clock-frequency = <1280000000>; 18 - }; 19 - 20 - pll_per: pll-per { 21 - compatible = "fixed-clock"; 22 - #clock-cells = <0>; 23 - clock-frequency = <2000000000>; 24 - }; 25 - 26 - pll_ddr0: pll-ddr0 { 27 - compatible = "fixed-clock"; 28 - #clock-cells = <0>; 29 - clock-frequency = <1857210000>; 30 - }; 31 - 32 - pll_ddr1: pll-ddr1 { 33 - compatible = "fixed-clock"; 34 - #clock-cells = <0>; 35 - clock-frequency = <1857210000>; 13 + clock-frequency = <30000000>; 36 14 }; 37 15 38 16 /* PLL_CPU derivatives */ 39 17 occ_cpu: occ-cpu { 40 18 compatible = "fixed-factor-clock"; 41 - clocks = <&pll_cpu>; 19 + clocks = <&olb EQ5C_PLL_CPU>; 42 20 #clock-cells = <0>; 43 21 clock-div = <1>; 44 22 clock-mult = <1>; ··· 79 101 }; 80 102 occ_isram: occ-isram { 81 103 compatible = "fixed-factor-clock"; 82 - clocks = <&pll_cpu>; 104 + clocks = <&olb EQ5C_PLL_CPU>; 83 105 #clock-cells = <0>; 84 106 clock-div = <2>; 85 107 clock-mult = <1>; ··· 93 115 }; 94 116 occ_dbu: occ-dbu { 95 117 compatible = "fixed-factor-clock"; 96 - clocks = <&pll_cpu>; 118 + clocks = <&olb EQ5C_PLL_CPU>; 97 119 #clock-cells = <0>; 98 120 clock-div = <10>; 99 121 clock-mult = <1>; ··· 108 130 /* PLL_VDI derivatives */ 109 131 occ_vdi: occ-vdi { 110 132 compatible = "fixed-factor-clock"; 111 - clocks = <&pll_vdi>; 133 + clocks = <&olb EQ5C_PLL_VDI>; 112 134 #clock-cells = <0>; 113 135 clock-div = <2>; 114 136 clock-mult = <1>; ··· 122 144 }; 123 145 occ_can_ser: occ-can-ser { 124 146 compatible = "fixed-factor-clock"; 125 - clocks = <&pll_vdi>; 147 + clocks = <&olb EQ5C_PLL_VDI>; 126 148 #clock-cells = <0>; 127 149 clock-div = <16>; 128 150 clock-mult = <1>; ··· 136 158 }; 137 159 i2c_ser_clk: i2c-ser-clk { 138 160 compatible = "fixed-factor-clock"; 139 - clocks = <&pll_vdi>; 161 + clocks = <&olb EQ5C_PLL_VDI>; 140 162 #clock-cells = <0>; 141 163 clock-div = <20>; 142 164 clock-mult = <1>; ··· 144 166 /* PLL_PER derivatives */ 145 167 occ_periph: occ-periph { 146 168 compatible = "fixed-factor-clock"; 147 - clocks = <&pll_per>; 169 + clocks = <&olb EQ5C_PLL_PER>; 148 170 #clock-cells = <0>; 149 171 clock-div = <16>; 150 172 clock-mult = <1>; ··· 203 225 }; 204 226 emmc_sys_clk: emmc-sys-clk { 205 227 compatible = "fixed-factor-clock"; 206 - clocks = <&pll_per>; 228 + clocks = <&olb EQ5C_PLL_PER>; 207 229 #clock-cells = <0>; 208 230 clock-div = <10>; 209 231 clock-mult = <1>; ··· 211 233 }; 212 234 ccf_ctrl_clk: ccf-ctrl-clk { 213 235 compatible = "fixed-factor-clock"; 214 - clocks = <&pll_per>; 236 + clocks = <&olb EQ5C_PLL_PER>; 215 237 #clock-cells = <0>; 216 238 clock-div = <4>; 217 239 clock-mult = <1>; ··· 219 241 }; 220 242 occ_mjpeg_core: occ-mjpeg-core { 221 243 compatible = "fixed-factor-clock"; 222 - clocks = <&pll_per>; 244 + clocks = <&olb EQ5C_PLL_PER>; 223 245 #clock-cells = <0>; 224 246 clock-div = <2>; 225 247 clock-mult = <1>; ··· 243 265 }; 244 266 fcmu_a_clk: fcmu-a-clk { 245 267 compatible = "fixed-factor-clock"; 246 - clocks = <&pll_per>; 268 + clocks = <&olb EQ5C_PLL_PER>; 247 269 #clock-cells = <0>; 248 270 clock-div = <20>; 249 271 clock-mult = <1>; ··· 251 273 }; 252 274 occ_pci_sys: occ-pci-sys { 253 275 compatible = "fixed-factor-clock"; 254 - clocks = <&pll_per>; 276 + clocks = <&olb EQ5C_PLL_PER>; 255 277 #clock-cells = <0>; 256 278 clock-div = <8>; 257 279 clock-mult = <1>;
+125
arch/mips/boot/dts/mobileye/eyeq5-pins.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + 3 + /* 4 + * Default pin configuration for Mobileye EyeQ5 boards. We mostly create one 5 + * pin configuration node per function. 6 + */ 7 + 8 + &olb { 9 + timer0_pins: timer0-pins { 10 + function = "timer0"; 11 + pins = "PA0", "PA1"; 12 + }; 13 + timer1_pins: timer1-pins { 14 + function = "timer1"; 15 + pins = "PA2", "PA3"; 16 + }; 17 + timer2_pins: timer2-pins { 18 + function = "timer2"; 19 + pins = "PA4", "PA5"; 20 + }; 21 + pps0_pins: pps0-pin { 22 + function = "timer2"; 23 + pins = "PA4"; 24 + }; 25 + pps1_pins: pps1-pin { 26 + function = "timer2"; 27 + pins = "PA5"; 28 + }; 29 + timer5_ext_pins: timer5-ext-pins { 30 + function = "timer5"; 31 + pins = "PA6", "PA7", "PA8", "PA9"; 32 + }; 33 + timer5_ext_input_pins: timer5-ext-input-pins { 34 + function = "timer5"; 35 + pins = "PA6", "PA7"; 36 + }; 37 + timer5_ext_incap_a_pins: timer5-ext-incap-a-pin { 38 + function = "timer5"; 39 + pins = "PA6"; 40 + }; 41 + timer5_ext_incap_b_pins: timer5-ext-incap-b-pin { 42 + function = "timer5"; 43 + pins = "PA7"; 44 + }; 45 + can0_pins: can0-pins { 46 + function = "can0"; 47 + pins = "PA14", "PA15"; 48 + }; 49 + can1_pins: can1-pins { 50 + function = "can1"; 51 + pins = "PA16", "PA17"; 52 + }; 53 + uart0_pins: uart0-pins { 54 + function = "uart0"; 55 + pins = "PA10", "PA11"; 56 + }; 57 + uart1_pins: uart1-pins { 58 + function = "uart1"; 59 + pins = "PA12", "PA13"; 60 + }; 61 + spi0_pins: spi0-pins { 62 + function = "spi0"; 63 + pins = "PA18", "PA19", "PA20", "PA21", "PA22"; 64 + }; 65 + spi1_pins: spi1-pins { 66 + function = "spi1"; 67 + pins = "PA23", "PA24", "PA25", "PA26", "PA27"; 68 + }; 69 + spi1_slave_pins: spi1-slave-pins { 70 + function = "spi1"; 71 + pins = "PA24", "PA25", "PA26"; 72 + }; 73 + refclk0_pins: refclk0-pin { 74 + function = "refclk0"; 75 + pins = "PA28"; 76 + }; 77 + timer3_pins: timer3-pins { 78 + function = "timer3"; 79 + pins = "PB0", "PB1"; 80 + }; 81 + timer4_pins: timer4-pins { 82 + function = "timer4"; 83 + pins = "PB2", "PB3"; 84 + }; 85 + timer6_ext_pins: timer6-ext-pins { 86 + function = "timer6"; 87 + pins = "PB4", "PB5", "PB6", "PB7"; 88 + }; 89 + timer6_ext_input_pins: timer6-ext-input-pins { 90 + function = "timer6"; 91 + pins = "PB4", "PB5"; 92 + }; 93 + timer6_ext_incap_a_pins: timer6-ext-incap-a-pin { 94 + function = "timer6"; 95 + pins = "PB4"; 96 + }; 97 + timer6_ext_incap_b_pins: timer6-ext-incap-b-pin { 98 + function = "timer6"; 99 + pins = "PB5"; 100 + }; 101 + can2_pins: can2-pins { 102 + function = "can2"; 103 + pins = "PB10", "PB11"; 104 + }; 105 + uart2_pins: uart2-pins { 106 + function = "uart2"; 107 + pins = "PB8", "PB9"; 108 + }; 109 + spi2_pins: spi2-pins { 110 + function = "spi2"; 111 + pins = "PB12", "PB13", "PB14", "PB15", "PB16"; 112 + }; 113 + spi3_pins: spi3-pins { 114 + function = "spi3"; 115 + pins = "PB17", "PB18", "PB19", "PB20", "PB21"; 116 + }; 117 + spi3_slave_pins: spi3-slave-pins { 118 + function = "spi3"; 119 + pins = "PB18", "PB19", "PB20"; 120 + }; 121 + mclk0_pins: mclk0-pin { 122 + function = "mclk0"; 123 + pins = "PB22"; 124 + }; 125 + };
+21 -1
arch/mips/boot/dts/mobileye/eyeq5.dtsi
··· 5 5 6 6 #include <dt-bindings/interrupt-controller/mips-gic.h> 7 7 8 - #include "eyeq5-fixed-clocks.dtsi" 8 + #include "eyeq5-clocks.dtsi" 9 9 10 10 / { 11 11 #address-cells = <2>; ··· 78 78 interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>; 79 79 clocks = <&uart_clk>, <&occ_periph>; 80 80 clock-names = "uartclk", "apb_pclk"; 81 + resets = <&olb 0 10>; 82 + pinctrl-names = "default"; 83 + pinctrl-0 = <&uart0_pins>; 81 84 }; 82 85 83 86 uart1: serial@900000 { ··· 91 88 interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>; 92 89 clocks = <&uart_clk>, <&occ_periph>; 93 90 clock-names = "uartclk", "apb_pclk"; 91 + resets = <&olb 0 11>; 92 + pinctrl-names = "default"; 93 + pinctrl-0 = <&uart1_pins>; 94 94 }; 95 95 96 96 uart2: serial@a00000 { ··· 104 98 interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>; 105 99 clocks = <&uart_clk>, <&occ_periph>; 106 100 clock-names = "uartclk", "apb_pclk"; 101 + resets = <&olb 0 12>; 102 + pinctrl-names = "default"; 103 + pinctrl-0 = <&uart2_pins>; 104 + }; 105 + 106 + olb: system-controller@e00000 { 107 + compatible = "mobileye,eyeq5-olb", "syscon"; 108 + reg = <0 0xe00000 0x0 0x400>; 109 + #reset-cells = <2>; 110 + #clock-cells = <1>; 111 + clocks = <&xtal>; 112 + clock-names = "ref"; 107 113 }; 108 114 109 115 gic: interrupt-controller@140000 { ··· 140 122 }; 141 123 }; 142 124 }; 125 + 126 + #include "eyeq5-pins.dtsi"
+22
arch/mips/boot/dts/mobileye/eyeq6h-epm6.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + /* 3 + * Copyright 2024 Mobileye Vision Technologies Ltd. 4 + */ 5 + 6 + /dts-v1/; 7 + 8 + #include "eyeq6h.dtsi" 9 + 10 + / { 11 + compatible = "mobileye,eyeq6-epm6", "mobileye,eyeq6"; 12 + model = "Mobile EyeQ6H MP6 Evaluation board"; 13 + 14 + chosen { 15 + stdout-path = "serial0:921600n8"; 16 + }; 17 + 18 + memory@0 { 19 + device_type = "memory"; 20 + reg = <0x1 0x00000000 0x1 0x00000000>; 21 + }; 22 + };
+52
arch/mips/boot/dts/mobileye/eyeq6h-fixed-clocks.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + /* 3 + * Copyright 2023 Mobileye Vision Technologies Ltd. 4 + */ 5 + 6 + #include <dt-bindings/clock/mobileye,eyeq5-clk.h> 7 + 8 + / { 9 + xtal: clock-30000000 { 10 + compatible = "fixed-clock"; 11 + #clock-cells = <0>; 12 + clock-frequency = <30000000>; 13 + }; 14 + 15 + pll_west: clock-2000000000-west { 16 + compatible = "fixed-clock"; 17 + #clock-cells = <0>; 18 + clock-frequency = <2000000000>; 19 + }; 20 + 21 + pll_cpu: clock-2000000000-cpu { 22 + compatible = "fixed-clock"; 23 + #clock-cells = <0>; 24 + clock-frequency = <2000000000>; 25 + }; 26 + 27 + /* pll-cpu derivatives */ 28 + occ_cpu: clock-2000000000-occ-cpu { 29 + compatible = "fixed-factor-clock"; 30 + clocks = <&pll_cpu>; 31 + #clock-cells = <0>; 32 + clock-div = <1>; 33 + clock-mult = <1>; 34 + }; 35 + 36 + /* pll-west derivatives */ 37 + occ_periph_w: clock-200000000 { 38 + compatible = "fixed-factor-clock"; 39 + clocks = <&pll_west>; 40 + #clock-cells = <0>; 41 + clock-div = <10>; 42 + clock-mult = <1>; 43 + }; 44 + uart_clk: clock-200000000-uart { 45 + compatible = "fixed-factor-clock"; 46 + clocks = <&occ_periph_w>; 47 + #clock-cells = <0>; 48 + clock-div = <1>; 49 + clock-mult = <1>; 50 + }; 51 + 52 + };
+88
arch/mips/boot/dts/mobileye/eyeq6h-pins.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + /* 3 + * Copyright 2024 Mobileye Vision Technologies Ltd. 4 + */ 5 + 6 + /* 7 + * MUX register structure 8 + * bits | field | comment 9 + * [0] | MUX_SEL | 0 - GPIO, 1 - alternative func 10 + * [4] | SW_LOOPBACK| 11 + * [5] | SW_OUT_HZ | 12 + * [7] | DBG_IN | 13 + * [11:8] | DS | drive strength 14 + * [13:12] | PUD | pull-up/pull-down. 0, 3 - no, 1 - PD, 2 - PU 15 + * [14] | OD | Open drain 16 + * [15] | ST_CFG | Hysteretic input enable (Schmitt trigger) 17 + */ 18 + 19 + &pinctrl_west { 20 + // TODO: use pinctrl-single,bias-pullup 21 + // TODO: use pinctrl-single,bias-pulldown 22 + // TODO: use pinctrl-single,drive-strength 23 + // TODO: use pinctrl-single,input-schmitt 24 + 25 + i2c0_pins: i2c0-pins { 26 + pinctrl-single,pins = < 27 + 0x000 0x200 // I2C0_SCL pin 28 + 0x004 0x200 // I2C0_SDA pin 29 + >; 30 + }; 31 + i2c1_pins: i2c1-pins { 32 + pinctrl-single,pins = < 33 + 0x008 0x200 // I2C1_SCL pin 34 + 0x00c 0x200 // I2C1_SDA pin 35 + >; 36 + }; 37 + eth0_pins: eth0-pins { 38 + pinctrl-single,pins = < 39 + 0x080 1 // GPIO_C4__SMA0_MDC pin 40 + 0x084 1 // GPIO_C5__SMA0_MDIO pin 41 + >; 42 + }; 43 + uart0_pins: uart0-pins { 44 + pinctrl-single,pins = <0x0a8 1>; // UART0 pin group 45 + }; 46 + uart1_pins: uart1-pins { 47 + pinctrl-single,pins = <0x0a0 1>; // UART1 pin group 48 + }; 49 + spi0_pins: spi0-pins { 50 + pinctrl-single,pins = <0x0ac 1>; // SPI0 pin group 51 + }; 52 + spi1_pins: spi1-pins { 53 + pinctrl-single,pins = <0x0a4 1>; // SPI1 pin group 54 + }; 55 + }; 56 + 57 + &pinctrl_east { 58 + i2c2_pins: i2c2-pins { 59 + pinctrl-single,pins = < 60 + 0x000 0x200 // i2c2_SCL pin 61 + 0x004 0x200 // i2c2_SDA pin 62 + >; 63 + }; 64 + i2c3_pins: i2c3-pins { 65 + pinctrl-single,pins = < 66 + 0x008 0x200 // i2c3_SCL pin 67 + 0x00c 0x200 // i2c3_SDA pin 68 + >; 69 + }; 70 + eth1_pins: eth1-pins { 71 + pinctrl-single,pins = < 72 + 0x080 1 // GPIO_D4__SMA1_MDC pin 73 + 0x084 1 // GPIO_D5__SMA1_MDIO pin 74 + >; 75 + }; 76 + uart2_sel_pins: uart2-pins { 77 + pinctrl-single,pins = <0x0a4 1>; // UART2 pin group 78 + }; 79 + uart3_pins: uart3-pins { 80 + pinctrl-single,pins = <0x09c 1>; // UART3 pin group 81 + }; 82 + spi2_pins: spi2-pins { 83 + pinctrl-single,pins = <0x0a8 1>; // SPI2 pin group 84 + }; 85 + spi3_pins: spi3-pins { 86 + pinctrl-single,pins = <0x0a0 1>; // SPI3 pin group 87 + }; 88 + };
+98
arch/mips/boot/dts/mobileye/eyeq6h.dtsi
··· 1 + // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + /* 3 + * Copyright 2024 Mobileye Vision Technologies Ltd. 4 + */ 5 + 6 + #include <dt-bindings/interrupt-controller/mips-gic.h> 7 + 8 + #include "eyeq6h-fixed-clocks.dtsi" 9 + 10 + / { 11 + #address-cells = <2>; 12 + #size-cells = <2>; 13 + cpus { 14 + #address-cells = <1>; 15 + #size-cells = <0>; 16 + cpu@0 { 17 + device_type = "cpu"; 18 + compatible = "img,i6500"; 19 + reg = <0>; 20 + clocks = <&occ_cpu>; 21 + }; 22 + }; 23 + 24 + aliases { 25 + serial0 = &uart0; 26 + }; 27 + 28 + cpu_intc: interrupt-controller { 29 + compatible = "mti,cpu-interrupt-controller"; 30 + interrupt-controller; 31 + #address-cells = <0>; 32 + #interrupt-cells = <1>; 33 + }; 34 + 35 + soc: soc { 36 + compatible = "simple-bus"; 37 + #address-cells = <2>; 38 + #size-cells = <2>; 39 + ranges; 40 + 41 + uart0: serial@d3331000 { 42 + compatible = "arm,pl011", "arm,primecell"; 43 + reg = <0 0xd3331000 0x0 0x1000>; 44 + reg-io-width = <4>; 45 + interrupt-parent = <&gic>; 46 + interrupts = <GIC_SHARED 43 IRQ_TYPE_LEVEL_HIGH>; 47 + clocks = <&occ_periph_w>, <&occ_periph_w>; 48 + clock-names = "uartclk", "apb_pclk"; 49 + }; 50 + 51 + pinctrl_west: pinctrl@d3337000 { 52 + compatible = "pinctrl-single"; 53 + reg = <0x0 0xd3337000 0x0 0xb0>; 54 + #pinctrl-cells = <1>; 55 + pinctrl-single,register-width = <32>; 56 + pinctrl-single,function-mask = <0xffff>; 57 + }; 58 + 59 + pinctrl_east: pinctrl@d3357000 { 60 + compatible = "pinctrl-single"; 61 + reg = <0x0 0xd3357000 0x0 0xb0>; 62 + #pinctrl-cells = <1>; 63 + pinctrl-single,register-width = <32>; 64 + pinctrl-single,function-mask = <0xffff>; 65 + }; 66 + 67 + pinctrl_south: pinctrl@d8014000 { 68 + compatible = "pinctrl-single"; 69 + reg = <0x0 0xd8014000 0x0 0xf8>; 70 + #pinctrl-cells = <1>; 71 + pinctrl-single,register-width = <32>; 72 + pinctrl-single,function-mask = <0xffff>; 73 + }; 74 + 75 + gic: interrupt-controller@f0920000 { 76 + compatible = "mti,gic"; 77 + reg = <0x0 0xf0920000 0x0 0x20000>; 78 + interrupt-controller; 79 + #interrupt-cells = <3>; 80 + 81 + /* 82 + * Declare the interrupt-parent even though the mti,gic 83 + * binding doesn't require it, such that the kernel can 84 + * figure out that cpu_intc is the root interrupt 85 + * controller & should be probed first. 86 + */ 87 + interrupt-parent = <&cpu_intc>; 88 + 89 + timer { 90 + compatible = "mti,gic-timer"; 91 + interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>; 92 + clocks = <&occ_cpu>; 93 + }; 94 + }; 95 + }; 96 + }; 97 + 98 + #include "eyeq6h-pins.dtsi"
+1
arch/mips/boot/dts/realtek/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 dtb-y += cisco_sg220-26.dtb 3 + dtb-y += cameo-rtl9302c-2x-rtl8224-2xge.dtb
+73
arch/mips/boot/dts/realtek/cameo-rtl9302c-2x-rtl8224-2xge.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later 2 + /dts-v1/; 3 + 4 + #include "rtl930x.dtsi" 5 + 6 + #include <dt-bindings/input/input.h> 7 + #include <dt-bindings/gpio/gpio.h> 8 + #include <dt-bindings/leds/common.h> 9 + #include <dt-bindings/thermal/thermal.h> 10 + 11 + / { 12 + compatible = "cameo,rtl9302c-2x-rtl8224-2xge", "realtek,rtl9302-soc"; 13 + model = "RTL9302C Development Board"; 14 + 15 + memory@0 { 16 + device_type = "memory"; 17 + reg = <0x0 0x8000000>; 18 + }; 19 + 20 + chosen { 21 + stdout-path = "serial0:115200n8"; 22 + }; 23 + }; 24 + 25 + &uart0 { 26 + status = "okay"; 27 + }; 28 + 29 + &spi0 { 30 + status = "okay"; 31 + flash@0 { 32 + compatible = "jedec,spi-nor"; 33 + reg = <0>; 34 + spi-max-frequency = <10000000>; 35 + 36 + partitions { 37 + compatible = "fixed-partitions"; 38 + #address-cells = <1>; 39 + #size-cells = <1>; 40 + 41 + partition@0 { 42 + label = "LOADER"; 43 + reg = <0x0 0xe0000>; 44 + read-only; 45 + }; 46 + partition@e0000 { 47 + label = "BDINFO"; 48 + reg = <0xe0000 0x10000>; 49 + }; 50 + partition@f0000 { 51 + label = "SYSINFO"; 52 + reg = <0xf0000 0x10000>; 53 + read-only; 54 + }; 55 + partition@100000 { 56 + label = "JFFS2 CFG"; 57 + reg = <0x100000 0x100000>; 58 + }; 59 + partition@200000 { 60 + label = "JFFS2 LOG"; 61 + reg = <0x200000 0x100000>; 62 + }; 63 + partition@300000 { 64 + label = "RUNTIME"; 65 + reg = <0x300000 0xe80000>; 66 + }; 67 + partition@1180000 { 68 + label = "RUNTIME2"; 69 + reg = <0x1180000 0xe80000>; 70 + }; 71 + }; 72 + }; 73 + };
+1
arch/mips/boot/dts/realtek/rtl838x.dtsi
··· 6 6 #size-cells = <0>; 7 7 8 8 cpu@0 { 9 + device_type = "cpu"; 9 10 compatible = "mips,mips4KEc"; 10 11 reg = <0>; 11 12 clocks = <&baseclk 0>;
+2 -2
arch/mips/boot/dts/realtek/rtl83xx.dtsi
··· 22 22 #size-cells = <1>; 23 23 ranges = <0x0 0x18000000 0x10000>; 24 24 25 - uart0: uart@2000 { 25 + uart0: serial@2000 { 26 26 compatible = "ns16550a"; 27 27 reg = <0x2000 0x100>; 28 28 ··· 39 39 status = "disabled"; 40 40 }; 41 41 42 - uart1: uart@2100 { 42 + uart1: serial@2100 { 43 43 compatible = "ns16550a"; 44 44 reg = <0x2100 0x100>; 45 45
+79
arch/mips/boot/dts/realtek/rtl930x.dtsi
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause 2 + 3 + #include "rtl83xx.dtsi" 4 + 5 + / { 6 + compatible = "realtek,rtl9302-soc"; 7 + 8 + cpus { 9 + #address-cells = <1>; 10 + #size-cells = <0>; 11 + 12 + cpu@0 { 13 + device_type = "cpu"; 14 + compatible = "mips,mips34Kc"; 15 + reg = <0>; 16 + clocks = <&baseclk 0>; 17 + clock-names = "cpu"; 18 + }; 19 + }; 20 + 21 + baseclk: clock-800mhz { 22 + compatible = "fixed-clock"; 23 + #clock-cells = <0>; 24 + clock-frequency = <800000000>; 25 + }; 26 + 27 + lx_clk: clock-175mhz { 28 + compatible = "fixed-clock"; 29 + #clock-cells = <0>; 30 + clock-frequency = <175000000>; 31 + }; 32 + }; 33 + 34 + &soc { 35 + intc: interrupt-controller@3000 { 36 + compatible = "realtek,rtl9300-intc", "realtek,rtl-intc"; 37 + reg = <0x3000 0x18>, <0x3018 0x18>; 38 + interrupt-controller; 39 + #interrupt-cells = <1>; 40 + 41 + interrupt-parent = <&cpuintc>; 42 + interrupts = <2>, <3>, <4>, <5>, <6>, <7>; 43 + }; 44 + 45 + spi0: spi@1200 { 46 + compatible = "realtek,rtl8380-spi"; 47 + reg = <0x1200 0x100>; 48 + 49 + #address-cells = <1>; 50 + #size-cells = <0>; 51 + }; 52 + 53 + timer0: timer@3200 { 54 + compatible = "realtek,rtl9302-timer", "realtek,otto-timer"; 55 + reg = <0x3200 0x10>, <0x3210 0x10>, <0x3220 0x10>, 56 + <0x3230 0x10>, <0x3240 0x10>; 57 + 58 + interrupt-parent = <&intc>; 59 + interrupts = <7>, <8>, <9>, <10>, <11>; 60 + clocks = <&lx_clk>; 61 + }; 62 + }; 63 + 64 + &uart0 { 65 + /delete-property/ clock-frequency; 66 + clocks = <&lx_clk>; 67 + 68 + interrupt-parent = <&intc>; 69 + interrupts = <30>; 70 + }; 71 + 72 + &uart1 { 73 + /delete-property/ clock-frequency; 74 + clocks = <&lx_clk>; 75 + 76 + interrupt-parent = <&intc>; 77 + interrupts = <31>; 78 + }; 79 +
+1
arch/mips/configs/ci20_defconfig
··· 122 122 CONFIG_MEDIA_SUPPORT=m 123 123 CONFIG_DRM=m 124 124 CONFIG_DRM_DISPLAY_CONNECTOR=m 125 + CONFIG_DRM_DW_HDMI=m 125 126 CONFIG_DRM_INGENIC=m 126 127 CONFIG_DRM_INGENIC_DW_HDMI=m 127 128 CONFIG_FB=y
-1
arch/mips/configs/db1xxx_defconfig
··· 12 12 CONFIG_BLK_CGROUP=y 13 13 CONFIG_CGROUP_SCHED=y 14 14 CONFIG_CFS_BANDWIDTH=y 15 - CONFIG_RT_GROUP_SCHED=y 16 15 CONFIG_CGROUP_FREEZER=y 17 16 CONFIG_CGROUP_DEVICE=y 18 17 CONFIG_CGROUP_CPUACCT=y
+1 -1
arch/mips/configs/eyeq5_defconfig
··· 8 8 CONFIG_MEMCG=y 9 9 CONFIG_BLK_CGROUP=y 10 10 CONFIG_CFS_BANDWIDTH=y 11 - CONFIG_RT_GROUP_SCHED=y 12 11 CONFIG_CGROUP_PIDS=y 13 12 CONFIG_CGROUP_FREEZER=y 14 13 CONFIG_CPUSETS=y ··· 18 19 CONFIG_SCHED_AUTOGROUP=y 19 20 CONFIG_BLK_DEV_INITRD=y 20 21 CONFIG_EXPERT=y 22 + CONFIG_EYEQ=y 21 23 CONFIG_MACH_EYEQ5=y 22 24 CONFIG_FIT_IMAGE_FDT_EPM5=y 23 25 CONFIG_PAGE_SIZE_16KB=y
+111
arch/mips/configs/eyeq6_defconfig
··· 1 + CONFIG_SYSVIPC=y 2 + CONFIG_NO_HZ_IDLE=y 3 + CONFIG_HIGH_RES_TIMERS=y 4 + CONFIG_BPF_SYSCALL=y 5 + CONFIG_TASKSTATS=y 6 + CONFIG_IKCONFIG=y 7 + CONFIG_IKCONFIG_PROC=y 8 + CONFIG_MEMCG=y 9 + CONFIG_BLK_CGROUP=y 10 + CONFIG_CFS_BANDWIDTH=y 11 + CONFIG_RT_GROUP_SCHED=y 12 + CONFIG_CGROUP_PIDS=y 13 + CONFIG_CGROUP_FREEZER=y 14 + CONFIG_CPUSETS=y 15 + CONFIG_CGROUP_DEVICE=y 16 + CONFIG_CGROUP_CPUACCT=y 17 + CONFIG_NAMESPACES=y 18 + CONFIG_USER_NS=y 19 + CONFIG_SCHED_AUTOGROUP=y 20 + CONFIG_BLK_DEV_INITRD=y 21 + CONFIG_EXPERT=y 22 + CONFIG_EYEQ=y 23 + CONFIG_MACH_EYEQ6H=y 24 + CONFIG_MIPS_CPS=y 25 + CONFIG_CPU_HAS_MSA=y 26 + CONFIG_NR_CPUS=16 27 + CONFIG_MIPS_RAW_APPENDED_DTB=y 28 + CONFIG_JUMP_LABEL=y 29 + CONFIG_PAGE_SIZE_16KB=y 30 + CONFIG_COMPAT_32BIT_TIME=y 31 + CONFIG_MODULES=y 32 + CONFIG_MODULE_UNLOAD=y 33 + CONFIG_TRIM_UNUSED_KSYMS=y 34 + # CONFIG_COMPAT_BRK is not set 35 + CONFIG_SPARSEMEM_MANUAL=y 36 + CONFIG_USERFAULTFD=y 37 + CONFIG_NET=y 38 + CONFIG_PACKET=y 39 + CONFIG_UNIX=y 40 + CONFIG_NET_KEY=y 41 + CONFIG_INET=y 42 + CONFIG_IP_PNP=y 43 + CONFIG_IP_PNP_DHCP=y 44 + CONFIG_NETFILTER=y 45 + CONFIG_CAN=y 46 + CONFIG_PCI=y 47 + CONFIG_PCI_MSI=y 48 + CONFIG_PCI_DEBUG=y 49 + CONFIG_PCI_ENDPOINT=y 50 + CONFIG_DEVTMPFS=y 51 + CONFIG_DEVTMPFS_MOUNT=y 52 + CONFIG_CONNECTOR=y 53 + CONFIG_MTD=y 54 + CONFIG_MTD_UBI=y 55 + CONFIG_MTD_UBI_BLOCK=y 56 + CONFIG_SCSI=y 57 + CONFIG_NETDEVICES=y 58 + CONFIG_MACVLAN=y 59 + CONFIG_IPVLAN=y 60 + CONFIG_MACB=y 61 + CONFIG_MARVELL_PHY=y 62 + CONFIG_MICREL_PHY=y 63 + CONFIG_CAN_M_CAN=y 64 + CONFIG_SERIAL_AMBA_PL011=y 65 + CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 66 + CONFIG_HW_RANDOM=y 67 + CONFIG_I2C=y 68 + CONFIG_I2C_CHARDEV=y 69 + # CONFIG_PTP_1588_CLOCK is not set 70 + CONFIG_PINCTRL=y 71 + CONFIG_PINCTRL_SINGLE=y 72 + CONFIG_MFD_SYSCON=y 73 + CONFIG_HID_A4TECH=y 74 + CONFIG_HID_BELKIN=y 75 + CONFIG_HID_CHERRY=y 76 + CONFIG_HID_CYPRESS=y 77 + CONFIG_HID_EZKEY=y 78 + CONFIG_HID_ITE=y 79 + CONFIG_HID_KENSINGTON=y 80 + CONFIG_HID_REDRAGON=y 81 + CONFIG_HID_MICROSOFT=y 82 + CONFIG_HID_MONTEREY=y 83 + CONFIG_MMC=y 84 + CONFIG_MMC_SDHCI=y 85 + # CONFIG_IOMMU_SUPPORT is not set 86 + CONFIG_RESET_CONTROLLER=y 87 + # CONFIG_NVMEM is not set 88 + CONFIG_EXT4_FS=y 89 + CONFIG_EXT4_FS_POSIX_ACL=y 90 + CONFIG_EXT4_FS_SECURITY=y 91 + CONFIG_FS_ENCRYPTION=y 92 + CONFIG_FUSE_FS=y 93 + CONFIG_CUSE=y 94 + CONFIG_MSDOS_FS=y 95 + CONFIG_VFAT_FS=y 96 + CONFIG_TMPFS=y 97 + CONFIG_TMPFS_POSIX_ACL=y 98 + CONFIG_UBIFS_FS=y 99 + CONFIG_NFS_FS=y 100 + CONFIG_NFS_V3_ACL=y 101 + CONFIG_NFS_V4=y 102 + CONFIG_NFS_V4_1=y 103 + CONFIG_NFS_V4_2=y 104 + CONFIG_ROOT_NFS=y 105 + CONFIG_CRYPTO_CRC32_MIPS=y 106 + CONFIG_FRAME_WARN=1024 107 + CONFIG_DEBUG_FS=y 108 + # CONFIG_RCU_TRACE is not set 109 + # CONFIG_FTRACE is not set 110 + CONFIG_CMDLINE_BOOL=y 111 + CONFIG_CMDLINE="earlycon"
+2
arch/mips/configs/generic/64r6.config
··· 3 3 CONFIG_MIPS32_O32=y 4 4 CONFIG_MIPS32_N32=y 5 5 6 + CONFIG_CPU_HAS_MSA=y 6 7 CONFIG_CRYPTO_CRC32_MIPS=y 8 + CONFIG_VIRTUALIZATION=y
+8
arch/mips/configs/generic/board-litex.config
··· 1 + CONFIG_LITEX_LITEETH=y 2 + CONFIG_SERIAL_LITEUART=y 3 + CONFIG_SERIAL_LITEUART_CONSOLE=y 4 + CONFIG_MMC=y 5 + CONFIG_MMC_LITEX=y 6 + CONFIG_LITEX_SOC_CONTROLLER=y 7 + CONFIG_USB_OHCI_HCD=y 8 + CONFIG_USB_OHCI_HCD_PLATFORM=y
-1
arch/mips/configs/generic_defconfig
··· 5 5 CONFIG_MEMCG=y 6 6 CONFIG_BLK_CGROUP=y 7 7 CONFIG_CFS_BANDWIDTH=y 8 - CONFIG_RT_GROUP_SCHED=y 9 8 CONFIG_CGROUP_PIDS=y 10 9 CONFIG_CGROUP_FREEZER=y 11 10 CONFIG_CPUSETS=y
+183
arch/mips/configs/ip30_defconfig
··· 1 + CONFIG_SYSVIPC=y 2 + CONFIG_POSIX_MQUEUE=y 3 + CONFIG_NO_HZ=y 4 + CONFIG_HIGH_RES_TIMERS=y 5 + CONFIG_IKCONFIG=y 6 + CONFIG_IKCONFIG_PROC=y 7 + CONFIG_LOG_BUF_SHIFT=15 8 + CONFIG_CGROUPS=y 9 + CONFIG_CPUSETS=y 10 + CONFIG_RELAY=y 11 + CONFIG_EXPERT=y 12 + CONFIG_SGI_IP30=y 13 + CONFIG_SMP=y 14 + CONFIG_NR_CPUS=2 15 + CONFIG_HZ_1000=y 16 + CONFIG_MIPS32_O32=y 17 + CONFIG_MIPS32_N32=y 18 + CONFIG_PM=y 19 + CONFIG_MODULES=y 20 + CONFIG_MODULE_UNLOAD=y 21 + CONFIG_MODULE_SRCVERSION_ALL=y 22 + CONFIG_PARTITION_ADVANCED=y 23 + CONFIG_SGI_PARTITION=y 24 + CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 25 + CONFIG_NET=y 26 + CONFIG_PACKET=y 27 + CONFIG_UNIX=y 28 + CONFIG_XFRM_USER=m 29 + CONFIG_XFRM_STATISTICS=y 30 + CONFIG_NET_KEY=y 31 + CONFIG_NET_KEY_MIGRATE=y 32 + CONFIG_INET=y 33 + CONFIG_IP_MULTICAST=y 34 + CONFIG_IP_PNP=y 35 + CONFIG_TCP_MD5SIG=y 36 + CONFIG_IPV6_ROUTER_PREF=y 37 + CONFIG_IPV6_ROUTE_INFO=y 38 + CONFIG_IPV6_OPTIMISTIC_DAD=y 39 + CONFIG_INET6_AH=m 40 + CONFIG_INET6_ESP=m 41 + CONFIG_INET6_IPCOMP=m 42 + CONFIG_IPV6_MIP6=m 43 + CONFIG_IPV6_SIT=m 44 + CONFIG_IPV6_SIT_6RD=y 45 + CONFIG_IPV6_TUNNEL=m 46 + CONFIG_IPV6_MULTIPLE_TABLES=y 47 + CONFIG_IPV6_SUBTREES=y 48 + CONFIG_IPV6_MROUTE=y 49 + CONFIG_IPV6_PIMSM_V2=y 50 + CONFIG_NETWORK_SECMARK=y 51 + CONFIG_NET_SCHED=y 52 + CONFIG_NET_SCH_HTB=m 53 + CONFIG_NET_SCH_HFSC=m 54 + CONFIG_NET_SCH_PRIO=m 55 + CONFIG_NET_SCH_MULTIQ=y 56 + CONFIG_NET_SCH_RED=m 57 + CONFIG_NET_SCH_SFQ=m 58 + CONFIG_NET_SCH_TEQL=m 59 + CONFIG_NET_SCH_TBF=m 60 + CONFIG_NET_SCH_GRED=m 61 + CONFIG_NET_SCH_NETEM=m 62 + CONFIG_NET_SCH_INGRESS=m 63 + CONFIG_NET_CLS_BASIC=m 64 + CONFIG_NET_CLS_ROUTE4=m 65 + CONFIG_NET_CLS_FW=m 66 + CONFIG_NET_CLS_U32=m 67 + CONFIG_CLS_U32_MARK=y 68 + CONFIG_NET_CLS_FLOW=m 69 + CONFIG_NET_CLS_CGROUP=y 70 + CONFIG_NET_CLS_ACT=y 71 + CONFIG_NET_ACT_POLICE=y 72 + CONFIG_NET_ACT_GACT=m 73 + CONFIG_GACT_PROB=y 74 + CONFIG_NET_ACT_MIRRED=m 75 + CONFIG_NET_ACT_NAT=m 76 + CONFIG_NET_ACT_PEDIT=m 77 + CONFIG_NET_ACT_SKBEDIT=m 78 + # CONFIG_VGA_ARB is not set 79 + CONFIG_BLK_DEV_LOOP=y 80 + CONFIG_CDROM_PKTCDVD=m 81 + CONFIG_ATA_OVER_ETH=m 82 + CONFIG_SCSI=y 83 + CONFIG_BLK_DEV_SD=y 84 + CONFIG_CHR_DEV_ST=y 85 + CONFIG_BLK_DEV_SR=m 86 + CONFIG_CHR_DEV_SG=m 87 + CONFIG_CHR_DEV_SCH=m 88 + CONFIG_SCSI_CONSTANTS=y 89 + CONFIG_SCSI_LOGGING=y 90 + CONFIG_SCSI_SCAN_ASYNC=y 91 + CONFIG_SCSI_SPI_ATTRS=y 92 + CONFIG_SCSI_FC_ATTRS=y 93 + CONFIG_LIBFC=m 94 + CONFIG_SCSI_QLOGIC_1280=y 95 + CONFIG_SCSI_BFA_FC=m 96 + CONFIG_SCSI_DH=y 97 + CONFIG_SCSI_DH_RDAC=m 98 + CONFIG_SCSI_DH_HP_SW=m 99 + CONFIG_SCSI_DH_EMC=m 100 + CONFIG_SCSI_DH_ALUA=m 101 + CONFIG_MD=y 102 + CONFIG_BLK_DEV_MD=y 103 + CONFIG_MD_RAID0=y 104 + CONFIG_MD_RAID1=y 105 + CONFIG_MD_RAID10=m 106 + CONFIG_MD_RAID456=y 107 + CONFIG_BLK_DEV_DM=m 108 + CONFIG_DM_CRYPT=m 109 + CONFIG_DM_SNAPSHOT=m 110 + CONFIG_DM_MIRROR=m 111 + CONFIG_DM_LOG_USERSPACE=m 112 + CONFIG_DM_ZERO=m 113 + CONFIG_DM_MULTIPATH=m 114 + CONFIG_DM_MULTIPATH_QL=m 115 + CONFIG_DM_MULTIPATH_ST=m 116 + CONFIG_DM_UEVENT=y 117 + CONFIG_NETDEVICES=y 118 + CONFIG_SGI_IOC3_ETH=y 119 + CONFIG_INPUT_SPARSEKMAP=y 120 + CONFIG_INPUT_MATRIXKMAP=y 121 + CONFIG_INPUT_EVDEV=y 122 + CONFIG_SERIO_SGI_IOC3=y 123 + CONFIG_SERIO_RAW=m 124 + CONFIG_SERIO_ALTERA_PS2=m 125 + # CONFIG_VT is not set 126 + CONFIG_SERIAL_8250=y 127 + CONFIG_SERIAL_8250_CONSOLE=y 128 + CONFIG_SERIAL_8250_MANY_PORTS=y 129 + CONFIG_SERIAL_8250_IOC3=y 130 + CONFIG_NOZOMI=m 131 + CONFIG_HW_RANDOM_TIMERIOMEM=m 132 + # CONFIG_PTP_1588_CLOCK is not set 133 + # CONFIG_HWMON is not set 134 + CONFIG_THERMAL=y 135 + CONFIG_SGI_MFD_IOC3=y 136 + CONFIG_RTC_CLASS=y 137 + CONFIG_RTC_DRV_M48T35=y 138 + CONFIG_UIO=y 139 + CONFIG_UIO_AEC=m 140 + CONFIG_UIO_SERCOS3=m 141 + CONFIG_UIO_PCI_GENERIC=m 142 + CONFIG_EXT2_FS=y 143 + CONFIG_EXT2_FS_XATTR=y 144 + CONFIG_EXT2_FS_POSIX_ACL=y 145 + CONFIG_EXT2_FS_SECURITY=y 146 + CONFIG_EXT3_FS=y 147 + CONFIG_EXT3_FS_POSIX_ACL=y 148 + CONFIG_EXT3_FS_SECURITY=y 149 + CONFIG_XFS_FS=m 150 + CONFIG_XFS_QUOTA=y 151 + CONFIG_XFS_POSIX_ACL=y 152 + CONFIG_BTRFS_FS=m 153 + CONFIG_BTRFS_FS_POSIX_ACL=y 154 + CONFIG_QUOTA_NETLINK_INTERFACE=y 155 + CONFIG_FUSE_FS=m 156 + CONFIG_CUSE=m 157 + CONFIG_PROC_KCORE=y 158 + CONFIG_TMPFS=y 159 + CONFIG_TMPFS_POSIX_ACL=y 160 + CONFIG_SQUASHFS=m 161 + CONFIG_OMFS_FS=m 162 + CONFIG_NFS_FS=y 163 + CONFIG_SECURITYFS=y 164 + CONFIG_CRYPTO_CRYPTD=m 165 + CONFIG_CRYPTO_BLOWFISH=m 166 + CONFIG_CRYPTO_CAMELLIA=m 167 + CONFIG_CRYPTO_CAST5=m 168 + CONFIG_CRYPTO_CAST6=m 169 + CONFIG_CRYPTO_FCRYPT=m 170 + CONFIG_CRYPTO_SERPENT=m 171 + CONFIG_CRYPTO_TWOFISH=m 172 + CONFIG_CRYPTO_CTS=m 173 + CONFIG_CRYPTO_LRW=m 174 + CONFIG_CRYPTO_PCBC=m 175 + CONFIG_CRYPTO_XTS=m 176 + CONFIG_CRYPTO_HMAC=y 177 + CONFIG_CRYPTO_MD4=m 178 + CONFIG_CRYPTO_RMD160=m 179 + CONFIG_CRYPTO_VMAC=m 180 + CONFIG_CRYPTO_WP512=m 181 + CONFIG_CRYPTO_XCBC=m 182 + CONFIG_CRYPTO_LZO=m 183 + CONFIG_CRC_T10DIF=m
+23 -31
arch/mips/configs/lemote2f_defconfig
··· 12 12 CONFIG_BLK_DEV_INITRD=y 13 13 CONFIG_EXPERT=y 14 14 CONFIG_PROFILING=y 15 + CONFIG_KEXEC=y 15 16 CONFIG_MACH_LOONGSON2EF=y 16 17 CONFIG_LEMOTE_MACH2F=y 17 - CONFIG_KEXEC=y 18 - # CONFIG_SECCOMP is not set 19 - CONFIG_PCI=y 20 18 CONFIG_MIPS32_O32=y 21 19 CONFIG_MIPS32_N32=y 22 20 CONFIG_HIBERNATION=y 23 21 CONFIG_PM_STD_PARTITION="/dev/hda3" 22 + # CONFIG_SECCOMP is not set 24 23 CONFIG_MODULES=y 25 24 CONFIG_MODULE_UNLOAD=y 26 25 CONFIG_MODVERSIONS=y ··· 67 68 CONFIG_BT_HCIBTUSB=m 68 69 CONFIG_BT_HCIBFUSB=m 69 70 CONFIG_BT_HCIVHCI=m 70 - CONFIG_CFG80211=m 71 - CONFIG_MAC80211=m 71 + CONFIG_CFG80211=y 72 + CONFIG_MAC80211=y 72 73 CONFIG_MAC80211_LEDS=y 73 - CONFIG_RFKILL=m 74 + CONFIG_RFKILL=y 74 75 CONFIG_RFKILL_INPUT=y 75 76 CONFIG_BLK_DEV_LOOP=y 76 77 CONFIG_BLK_DEV_RAM=y ··· 82 83 CONFIG_PATA_AMD=y 83 84 CONFIG_MD=y 84 85 CONFIG_BLK_DEV_MD=m 85 - CONFIG_MD_LINEAR=m 86 86 CONFIG_MD_RAID0=m 87 87 CONFIG_MD_RAID1=m 88 88 CONFIG_MD_RAID10=m 89 89 CONFIG_MD_RAID456=m 90 - CONFIG_MD_MULTIPATH=m 91 - CONFIG_MD_FAULTY=m 92 90 CONFIG_BLK_DEV_DM=m 93 91 CONFIG_DM_DEBUG=y 94 92 CONFIG_DM_CRYPT=m ··· 108 112 CONFIG_R8169=y 109 113 CONFIG_USB_USBNET=m 110 114 CONFIG_USB_NET_CDC_EEM=m 115 + CONFIG_RTL8180=m 116 + CONFIG_RTL8187=y 117 + CONFIG_RTL_CARDS=m 118 + CONFIG_RTL8XXXU=m 111 119 CONFIG_INPUT_EVDEV=y 112 120 # CONFIG_MOUSE_PS2_ALPS is not set 113 121 # CONFIG_MOUSE_PS2_LOGIPS2PP is not set ··· 119 119 CONFIG_MOUSE_APPLETOUCH=m 120 120 # CONFIG_SERIO_SERPORT is not set 121 121 CONFIG_LEGACY_PTY_COUNT=16 122 - CONFIG_SERIAL_NONSTANDARD=y 123 122 CONFIG_SERIAL_8250=m 124 123 # CONFIG_SERIAL_8250_PCI is not set 125 124 CONFIG_SERIAL_8250_NR_UARTS=16 126 125 CONFIG_SERIAL_8250_EXTENDED=y 127 126 CONFIG_SERIAL_8250_MANY_PORTS=y 128 127 CONFIG_SERIAL_8250_FOURPORT=y 128 + CONFIG_SERIAL_NONSTANDARD=y 129 129 CONFIG_HW_RANDOM=y 130 130 CONFIG_GPIO_LOONGSON=y 131 131 CONFIG_THERMAL=y 132 132 CONFIG_MEDIA_SUPPORT=m 133 133 CONFIG_FB=y 134 - CONFIG_FIRMWARE_EDID=y 135 - CONFIG_FB_MODE_HELPERS=y 136 - CONFIG_FB_TILEBLITTING=y 137 134 CONFIG_FB_SIS=y 138 135 CONFIG_FB_SIS_300=y 139 136 CONFIG_FB_SIS_315=y 140 - # CONFIG_LCD_CLASS_DEVICE is not set 137 + CONFIG_FB_SIMPLE=y 138 + CONFIG_FB_SM712=y 139 + CONFIG_FIRMWARE_EDID=y 140 + CONFIG_FB_MODE_HELPERS=y 141 + CONFIG_FB_TILEBLITTING=y 141 142 CONFIG_BACKLIGHT_CLASS_DEVICE=y 142 - # CONFIG_VGA_CONSOLE is not set 143 143 CONFIG_FRAMEBUFFER_CONSOLE=y 144 144 CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y 145 145 CONFIG_LOGO=y ··· 238 238 CONFIG_QUOTA=y 239 239 CONFIG_QFMT_V2=m 240 240 CONFIG_AUTOFS_FS=m 241 - CONFIG_NETFS_SUPPORT=m 242 241 CONFIG_FSCACHE=y 243 242 CONFIG_CACHEFILES=m 244 243 CONFIG_ISO9660_FS=m ··· 246 247 CONFIG_MSDOS_FS=m 247 248 CONFIG_VFAT_FS=m 248 249 CONFIG_NTFS_FS=m 249 - CONFIG_NTFS_RW=y 250 250 CONFIG_PROC_KCORE=y 251 251 CONFIG_TMPFS=y 252 252 CONFIG_CRAMFS=m ··· 297 299 CONFIG_NLS_KOI8_U=m 298 300 CONFIG_NLS_UTF8=y 299 301 CONFIG_CRYPTO_CRYPTD=m 300 - CONFIG_CRYPTO_AUTHENC=m 301 302 CONFIG_CRYPTO_TEST=m 302 - CONFIG_CRYPTO_LRW=m 303 - CONFIG_CRYPTO_PCBC=m 304 - CONFIG_CRYPTO_XTS=m 305 - CONFIG_CRYPTO_XCBC=m 306 - CONFIG_CRYPTO_MICHAEL_MIC=m 307 - CONFIG_CRYPTO_RMD160=m 308 - CONFIG_CRYPTO_SHA1=m 309 - CONFIG_CRYPTO_WP512=m 310 - CONFIG_CRYPTO_ANUBIS=m 311 303 CONFIG_CRYPTO_BLOWFISH=m 312 304 CONFIG_CRYPTO_CAMELLIA=m 313 305 CONFIG_CRYPTO_CAST5=m 314 306 CONFIG_CRYPTO_CAST6=m 315 307 CONFIG_CRYPTO_FCRYPT=m 316 - CONFIG_CRYPTO_KHAZAD=m 317 - CONFIG_CRYPTO_SEED=m 318 308 CONFIG_CRYPTO_SERPENT=m 319 - CONFIG_CRYPTO_TEA=m 320 309 CONFIG_CRYPTO_TWOFISH=m 310 + CONFIG_CRYPTO_LRW=m 311 + CONFIG_CRYPTO_PCBC=m 312 + CONFIG_CRYPTO_XTS=m 313 + CONFIG_CRYPTO_MICHAEL_MIC=m 314 + CONFIG_CRYPTO_RMD160=m 315 + CONFIG_CRYPTO_SHA1=m 316 + CONFIG_CRYPTO_WP512=m 317 + CONFIG_CRYPTO_XCBC=m 321 318 CONFIG_CRYPTO_DEFLATE=m 322 - CONFIG_CRYPTO_LZO=m 323 319 CONFIG_FONTS=y 324 320 CONFIG_FONT_8x8=y 325 321 CONFIG_FONT_6x11=y
+1
arch/mips/crypto/poly1305-glue.c
··· 186 186 module_init(mips_poly1305_mod_init); 187 187 module_exit(mips_poly1305_mod_exit); 188 188 189 + MODULE_DESCRIPTION("Poly1305 transform (MIPS accelerated"); 189 190 MODULE_LICENSE("GPL v2"); 190 191 MODULE_ALIAS_CRYPTO("poly1305"); 191 192 MODULE_ALIAS_CRYPTO("poly1305-mips");
+1
arch/mips/generic/Makefile
··· 13 13 obj-$(CONFIG_LEGACY_BOARD_OCELOT) += board-ocelot.o 14 14 obj-$(CONFIG_MACH_INGENIC) += board-ingenic.o 15 15 obj-$(CONFIG_VIRT_BOARD_RANCHU) += board-ranchu.o 16 + obj-$(CONFIG_MACH_REALTEK_RTL) += board-realtek.o
+79
arch/mips/generic/board-realtek.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (C) 2024 Allied Telesis 4 + */ 5 + 6 + #include <linux/errno.h> 7 + #include <linux/libfdt.h> 8 + #include <linux/printk.h> 9 + #include <linux/types.h> 10 + 11 + #include <asm/fw/fw.h> 12 + #include <asm/machine.h> 13 + 14 + static __init int realtek_add_initrd(void *fdt) 15 + { 16 + int node, err; 17 + u32 start, size; 18 + 19 + node = fdt_path_offset(fdt, "/chosen"); 20 + if (node < 0) { 21 + pr_err("/chosen node not found\n"); 22 + return -ENOENT; 23 + } 24 + 25 + start = fw_getenvl("initrd_start"); 26 + size = fw_getenvl("initrd_size"); 27 + 28 + if (start == 0 && size == 0) 29 + return 0; 30 + 31 + pr_info("Adding initrd info from environment\n"); 32 + 33 + err = fdt_setprop_u32(fdt, node, "linux,initrd-start", start); 34 + if (err) { 35 + pr_err("unable to set initrd-start: %d\n", err); 36 + return err; 37 + } 38 + 39 + err = fdt_setprop_u32(fdt, node, "linux,initrd-end", start + size); 40 + if (err) { 41 + pr_err("unable to set initrd-end: %d\n", err); 42 + return err; 43 + } 44 + 45 + return 0; 46 + } 47 + 48 + static const struct mips_fdt_fixup realtek_fdt_fixups[] __initconst = { 49 + { realtek_add_initrd, "add initrd" }, 50 + {}, 51 + }; 52 + 53 + static __init const void *realtek_fixup_fdt(const void *fdt, const void *match_data) 54 + { 55 + static unsigned char fdt_buf[16 << 10] __initdata; 56 + int err; 57 + 58 + if (fdt_check_header(fdt)) 59 + panic("Corrupt DT"); 60 + 61 + fw_init_cmdline(); 62 + 63 + err = apply_mips_fdt_fixups(fdt_buf, sizeof(fdt_buf), fdt, realtek_fdt_fixups); 64 + if (err) 65 + panic("Unable to fixup FDT: %d", err); 66 + 67 + return fdt_buf; 68 + 69 + } 70 + 71 + static const struct of_device_id realtek_of_match[] __initconst = { 72 + { .compatible = "realtek,rtl9302-soc" }, 73 + {} 74 + }; 75 + 76 + MIPS_MACHINE(realtek) = { 77 + .matches = realtek_of_match, 78 + .fixup_fdt = realtek_fixup_fdt, 79 + };
+1
arch/mips/include/asm/bmips.h
··· 81 81 extern char bmips_smp_int_vec[]; 82 82 extern char bmips_smp_int_vec_end[]; 83 83 84 + extern void __iomem *bmips_cbr_addr; 84 85 extern int bmips_smp_enabled; 85 86 extern int bmips_cpu_offset; 86 87 extern cpumask_t bmips_booted_mask;
+15
arch/mips/include/asm/fpu.h
··· 129 129 if (ret) 130 130 return ret; 131 131 132 + if (current->thread.fpu.fcr31 & FPU_CSR_NAN2008) { 133 + if (!cpu_has_nan_2008) { 134 + ret = SIGFPE; 135 + goto failed; 136 + } 137 + } else { 138 + if (!cpu_has_nan_legacy) { 139 + ret = SIGFPE; 140 + goto failed; 141 + } 142 + } 143 + 132 144 KSTK_STATUS(current) |= ST0_CU1; 133 145 if (mode == FPU_64BIT || mode == FPU_HYBRID) 134 146 KSTK_STATUS(current) |= ST0_FR; ··· 149 137 150 138 set_thread_flag(TIF_USEDFPU); 151 139 return 0; 140 + failed: 141 + __disable_fpu(); 142 + return ret; 152 143 } 153 144 154 145 static inline int own_fpu_inatomic(int restore)
+2
arch/mips/include/asm/mach-loongson64/boot_param.h
··· 42 42 Legacy_1B = 0x5, 43 43 Legacy_2G = 0x6, 44 44 Legacy_2H = 0x7, 45 + Legacy_2K = 0x8, 45 46 Loongson_1A = 0x100, 46 47 Loongson_1B = 0x101, 47 48 Loongson_2E = 0x200, 48 49 Loongson_2F = 0x201, 49 50 Loongson_2G = 0x202, 50 51 Loongson_2H = 0x203, 52 + Loongson_2K = 0x204, 51 53 Loongson_3A = 0x300, 52 54 Loongson_3B = 0x301 53 55 };
+39
arch/mips/include/asm/mips-cps.h
··· 8 8 #define __MIPS_ASM_MIPS_CPS_H__ 9 9 10 10 #include <linux/bitfield.h> 11 + #include <linux/cpumask.h> 11 12 #include <linux/io.h> 12 13 #include <linux/types.h> 13 14 ··· 228 227 229 228 return FIELD_GET(CM_GCR_Cx_CONFIG_PVPE, cfg + 1); 230 229 } 230 + 231 + /** 232 + * mips_cps_multicluster_cpus() - Detect whether CPUs are in multiple clusters 233 + * 234 + * Determine whether the system includes CPUs in multiple clusters - ie. 235 + * whether we can treat the system as single or multi-cluster as far as CPUs 236 + * are concerned. Note that this is slightly different to simply checking 237 + * whether multiple clusters are present - it is possible for there to be 238 + * clusters which contain no CPUs, which this function will effectively ignore. 239 + * 240 + * Returns true if CPUs are spread across multiple clusters, else false. 241 + */ 242 + static inline bool mips_cps_multicluster_cpus(void) 243 + { 244 + unsigned int first_cl, last_cl; 245 + 246 + /* 247 + * CPUs are numbered sequentially by cluster - ie. CPUs 0..X will be in 248 + * cluster 0, CPUs X+1..Y in cluster 1, CPUs Y+1..Z in cluster 2 etc. 249 + * 250 + * Thus we can detect multiple clusters trivially by checking whether 251 + * the first & last CPUs belong to the same cluster. 252 + */ 253 + first_cl = cpu_cluster(&boot_cpu_data); 254 + last_cl = cpu_cluster(&cpu_data[nr_cpu_ids - 1]); 255 + return first_cl != last_cl; 256 + } 257 + 258 + /** 259 + * mips_cps_first_online_in_cluster() - Detect if CPU is first online in cluster 260 + * 261 + * Determine whether the local CPU is the first to be brought online in its 262 + * cluster - that is, whether there are any other online CPUs in the local 263 + * cluster. 264 + * 265 + * Returns true if this CPU is first online, else false. 266 + */ 267 + extern unsigned int mips_cps_first_online_in_cluster(void); 231 268 232 269 #endif /* __MIPS_ASM_MIPS_CPS_H__ */
+34 -16
arch/mips/include/asm/mips-gic.h
··· 28 28 29 29 /* For read-only shared registers */ 30 30 #define GIC_ACCESSOR_RO(sz, off, name) \ 31 - CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_SHARED_OFS + off, name) 31 + CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_SHARED_OFS + off, name) \ 32 + CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_REDIR_OFS + off, redir_##name) 32 33 33 34 /* For read-write shared registers */ 34 35 #define GIC_ACCESSOR_RW(sz, off, name) \ 35 - CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_SHARED_OFS + off, name) 36 + CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_SHARED_OFS + off, name) \ 37 + CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_REDIR_OFS + off, redir_##name) 36 38 37 39 /* For read-only local registers */ 38 40 #define GIC_VX_ACCESSOR_RO(sz, off, name) \ ··· 47 45 CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_REDIR_OFS + off, vo_##name) 48 46 49 47 /* For read-only shared per-interrupt registers */ 50 - #define GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ 48 + #define _GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ 51 49 static inline void __iomem *addr_gic_##name(unsigned int intr) \ 52 50 { \ 53 51 return mips_gic_base + (off) + (intr * (stride)); \ ··· 60 58 } 61 59 62 60 /* For read-write shared per-interrupt registers */ 63 - #define GIC_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ 64 - GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ 61 + #define _GIC_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ 62 + _GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ 65 63 \ 66 64 static inline void write_gic_##name(unsigned int intr, \ 67 65 unsigned int val) \ ··· 70 68 __raw_writel(val, addr_gic_##name(intr)); \ 71 69 } 72 70 71 + #define GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ 72 + _GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ 73 + _GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, stride, redir_##name) 74 + 75 + #define GIC_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ 76 + _GIC_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ 77 + _GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, stride, redir_##name) 78 + 73 79 /* For read-only local per-interrupt registers */ 74 80 #define GIC_VX_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ 75 - GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_LOCAL_OFS + off, \ 81 + _GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_LOCAL_OFS + off, \ 76 82 stride, vl_##name) \ 77 - GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, \ 83 + _GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, \ 78 84 stride, vo_##name) 79 85 80 86 /* For read-write local per-interrupt registers */ 81 87 #define GIC_VX_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ 82 - GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_LOCAL_OFS + off, \ 88 + _GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_LOCAL_OFS + off, \ 83 89 stride, vl_##name) \ 84 - GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, \ 90 + _GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, \ 85 91 stride, vo_##name) 86 92 87 93 /* For read-only shared bit-per-interrupt registers */ 88 - #define GIC_ACCESSOR_RO_INTR_BIT(off, name) \ 94 + #define _GIC_ACCESSOR_RO_INTR_BIT(off, name) \ 89 95 static inline void __iomem *addr_gic_##name(void) \ 90 96 { \ 91 97 return mips_gic_base + (off); \ ··· 116 106 } 117 107 118 108 /* For read-write shared bit-per-interrupt registers */ 119 - #define GIC_ACCESSOR_RW_INTR_BIT(off, name) \ 120 - GIC_ACCESSOR_RO_INTR_BIT(off, name) \ 109 + #define _GIC_ACCESSOR_RW_INTR_BIT(off, name) \ 110 + _GIC_ACCESSOR_RO_INTR_BIT(off, name) \ 121 111 \ 122 112 static inline void write_gic_##name(unsigned int intr) \ 123 113 { \ ··· 156 146 } \ 157 147 } 158 148 149 + #define GIC_ACCESSOR_RO_INTR_BIT(off, name) \ 150 + _GIC_ACCESSOR_RO_INTR_BIT(off, name) \ 151 + _GIC_ACCESSOR_RO_INTR_BIT(MIPS_GIC_REDIR_OFS + off, redir_##name) 152 + 153 + #define GIC_ACCESSOR_RW_INTR_BIT(off, name) \ 154 + _GIC_ACCESSOR_RW_INTR_BIT(off, name) \ 155 + _GIC_ACCESSOR_RW_INTR_BIT(MIPS_GIC_REDIR_OFS + off, redir_##name) 156 + 159 157 /* For read-only local bit-per-interrupt registers */ 160 158 #define GIC_VX_ACCESSOR_RO_INTR_BIT(sz, off, name) \ 161 159 GIC_ACCESSOR_RO_INTR_BIT(sz, MIPS_GIC_LOCAL_OFS + off, \ ··· 173 155 174 156 /* For read-write local bit-per-interrupt registers */ 175 157 #define GIC_VX_ACCESSOR_RW_INTR_BIT(sz, off, name) \ 176 - GIC_ACCESSOR_RW_INTR_BIT(sz, MIPS_GIC_LOCAL_OFS + off, \ 177 - vl_##name) \ 178 - GIC_ACCESSOR_RW_INTR_BIT(sz, MIPS_GIC_REDIR_OFS + off, \ 179 - vo_##name) 158 + _GIC_ACCESSOR_RW_INTR_BIT(sz, MIPS_GIC_LOCAL_OFS + off, \ 159 + vl_##name) \ 160 + _GIC_ACCESSOR_RW_INTR_BIT(sz, MIPS_GIC_REDIR_OFS + off, \ 161 + vo_##name) 180 162 181 163 /* GIC_SH_CONFIG - Information about the GIC configuration */ 182 164 GIC_ACCESSOR_RW(32, 0x000, config)
+11 -11
arch/mips/include/asm/pm.h
··· 17 17 18 18 /* Save CPU state to stack for suspend to RAM */ 19 19 .macro SUSPEND_SAVE_REGS 20 - subu sp, PT_SIZE 20 + PTR_SUBU sp, PT_SIZE 21 21 /* Call preserved GPRs */ 22 22 LONG_S $16, PT_R16(sp) 23 23 LONG_S $17, PT_R17(sp) ··· 56 56 LONG_L $31, PT_R31(sp) 57 57 /* Pop and return */ 58 58 jr ra 59 - addiu sp, PT_SIZE 59 + PTR_ADDIU sp, PT_SIZE 60 60 .set pop 61 61 .endm 62 62 63 63 /* Get address of static suspend state into t1 */ 64 64 .macro LA_STATIC_SUSPEND 65 - la t1, mips_static_suspend_state 65 + PTR_LA t1, mips_static_suspend_state 66 66 .endm 67 67 68 68 /* Save important CPU state for early restoration to global data */ ··· 72 72 * Segment configuration is saved in global data where it can be easily 73 73 * reloaded without depending on the segment configuration. 74 74 */ 75 - mfc0 k0, CP0_PAGEMASK, 2 /* SegCtl0 */ 75 + mfc0 k0, CP0_SEGCTL0 76 76 LONG_S k0, SSS_SEGCTL0(t1) 77 - mfc0 k0, CP0_PAGEMASK, 3 /* SegCtl1 */ 77 + mfc0 k0, CP0_SEGCTL1 78 78 LONG_S k0, SSS_SEGCTL1(t1) 79 - mfc0 k0, CP0_PAGEMASK, 4 /* SegCtl2 */ 79 + mfc0 k0, CP0_SEGCTL2 80 80 LONG_S k0, SSS_SEGCTL2(t1) 81 81 #endif 82 82 /* save stack pointer (pointing to GPRs) */ ··· 92 92 * segments. 93 93 */ 94 94 LONG_L k0, SSS_SEGCTL0(t1) 95 - mtc0 k0, CP0_PAGEMASK, 2 /* SegCtl0 */ 95 + mtc0 k0, CP0_SEGCTL0 96 96 LONG_L k0, SSS_SEGCTL1(t1) 97 - mtc0 k0, CP0_PAGEMASK, 3 /* SegCtl1 */ 97 + mtc0 k0, CP0_SEGCTL1 98 98 LONG_L k0, SSS_SEGCTL2(t1) 99 - mtc0 k0, CP0_PAGEMASK, 4 /* SegCtl2 */ 99 + mtc0 k0, CP0_SEGCTL2 100 100 tlbw_use_hazard 101 101 #endif 102 102 /* restore stack pointer (pointing to GPRs) */ ··· 105 105 106 106 /* flush caches to make sure context has reached memory */ 107 107 .macro SUSPEND_CACHE_FLUSH 108 - .extern __wback_cache_all 108 + .extern __flush_cache_all 109 109 .set push 110 110 .set noreorder 111 - la t1, __wback_cache_all 111 + PTR_LA t1, __flush_cache_all 112 112 LONG_L t0, 0(t1) 113 113 jalr t0 114 114 nop
-5
arch/mips/include/asm/r4k-timer.h
··· 12 12 13 13 #ifdef CONFIG_SYNC_R4K 14 14 15 - extern void synchronise_count_master(int cpu); 16 15 extern void synchronise_count_slave(int cpu); 17 16 18 17 #else 19 - 20 - static inline void synchronise_count_master(int cpu) 21 - { 22 - } 23 18 24 19 static inline void synchronise_count_slave(int cpu) 25 20 {
+3
arch/mips/include/asm/sgi/ip22.h
··· 76 76 77 77 extern unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg); 78 78 extern unsigned short ip22_nvram_read(int reg); 79 + extern void ip22_be_interrupt(int irq); 80 + extern void ip22_be_init(void) __init; 81 + extern void indy_8254timer_irq(void); 79 82 80 83 #endif
+19 -5
arch/mips/kernel/csrc-r4k.c
··· 21 21 .name = "MIPS", 22 22 .read = c0_hpt_read, 23 23 .mask = CLOCKSOURCE_MASK(32), 24 - .flags = CLOCK_SOURCE_IS_CONTINUOUS, 24 + .flags = CLOCK_SOURCE_IS_CONTINUOUS | 25 + CLOCK_SOURCE_MUST_VERIFY | 26 + CLOCK_SOURCE_VERIFY_PERCPU, 25 27 }; 26 28 27 29 static u64 __maybe_unused notrace r4k_read_sched_clock(void) ··· 66 64 67 65 pr_warn("Not using R4K clocksource in VDSO due to broken RDHWR\n"); 68 66 return false; 67 + } 68 + 69 + static inline __init bool count_can_be_sched_clock(void) 70 + { 71 + if (IS_ENABLED(CONFIG_CPU_FREQ)) 72 + return false; 73 + 74 + if (num_possible_cpus() > 1 && 75 + !IS_ENABLED(CONFIG_HAVE_UNSTABLE_SCHED_CLOCK)) 76 + return false; 77 + 78 + return true; 69 79 } 70 80 71 81 #ifdef CONFIG_CPU_FREQ ··· 125 111 return -ENXIO; 126 112 127 113 /* Calculate a somewhat reasonable rating value */ 128 - clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; 114 + clocksource_mips.rating = 200; 115 + clocksource_mips.rating += clamp(mips_hpt_frequency / 10000000, 0, 99); 129 116 130 117 /* 131 118 * R2 onwards makes the count accessible to user mode so it can be used ··· 137 122 138 123 clocksource_register_hz(&clocksource_mips, mips_hpt_frequency); 139 124 140 - #ifndef CONFIG_CPU_FREQ 141 - sched_clock_register(r4k_read_sched_clock, 32, mips_hpt_frequency); 142 - #endif 125 + if (count_can_be_sched_clock()) 126 + sched_clock_register(r4k_read_sched_clock, 32, mips_hpt_frequency); 143 127 144 128 return 0; 145 129 }
+4
arch/mips/kernel/elf.c
··· 318 318 t->thread.fpu.fcr31 = c->fpu_csr31; 319 319 switch (state->nan_2008) { 320 320 case 0: 321 + if (!(c->fpu_msk31 & FPU_CSR_NAN2008)) 322 + t->thread.fpu.fcr31 &= ~FPU_CSR_NAN2008; 323 + if (!(c->fpu_msk31 & FPU_CSR_ABS2008)) 324 + t->thread.fpu.fcr31 &= ~FPU_CSR_ABS2008; 321 325 break; 322 326 case 1: 323 327 if (!(c->fpu_msk31 & FPU_CSR_NAN2008))
+8 -1
arch/mips/kernel/fpu-probe.c
··· 144 144 * IEEE 754 conformance mode to use. Affects the NaN encoding and the 145 145 * ABS.fmt/NEG.fmt execution mode. 146 146 */ 147 - static enum { STRICT, LEGACY, STD2008, RELAXED } ieee754 = STRICT; 147 + static enum { STRICT, EMULATED, LEGACY, STD2008, RELAXED } ieee754 = STRICT; 148 148 149 149 /* 150 150 * Set the IEEE 754 NaN encodings and the ABS.fmt/NEG.fmt execution modes ··· 160 160 161 161 switch (ieee754) { 162 162 case STRICT: 163 + case EMULATED: 163 164 if (c->isa_level & (MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M64R1 | 164 165 MIPS_CPU_ISA_M32R2 | MIPS_CPU_ISA_M64R2 | 165 166 MIPS_CPU_ISA_M32R5 | MIPS_CPU_ISA_M64R5 | ··· 205 204 mips_use_nan_legacy = !cpu_has_nan_2008; 206 205 mips_use_nan_2008 = !!cpu_has_nan_2008; 207 206 break; 207 + case EMULATED: 208 + /* Pretend ABS2008/NAN2008 options are dynamic */ 209 + c->fpu_msk31 &= ~(FPU_CSR_NAN2008 | FPU_CSR_ABS2008); 210 + fallthrough; 208 211 case RELAXED: 209 212 mips_use_nan_legacy = true; 210 213 mips_use_nan_2008 = true; ··· 231 226 return -1; 232 227 else if (!strcmp(s, "strict")) 233 228 ieee754 = STRICT; 229 + else if (!strcmp(s, "emulated")) 230 + ieee754 = EMULATED; 234 231 else if (!strcmp(s, "legacy")) 235 232 ieee754 = LEGACY; 236 233 else if (!strcmp(s, "2008"))
+37
arch/mips/kernel/mips-cm.c
··· 512 512 /* reprime cause register */ 513 513 write_gcr_error_cause(cm_error); 514 514 } 515 + 516 + unsigned int mips_cps_first_online_in_cluster(void) 517 + { 518 + unsigned int local_cl; 519 + int i; 520 + 521 + local_cl = cpu_cluster(&current_cpu_data); 522 + 523 + /* 524 + * We rely upon knowledge that CPUs are numbered sequentially by 525 + * cluster - ie. CPUs 0..X will be in cluster 0, CPUs X+1..Y in cluster 526 + * 1, CPUs Y+1..Z in cluster 2 etc. This means that CPUs in the same 527 + * cluster will immediately precede or follow one another. 528 + * 529 + * First we scan backwards, until we find an online CPU in the cluster 530 + * or we move on to another cluster. 531 + */ 532 + for (i = smp_processor_id() - 1; i >= 0; i--) { 533 + if (cpu_cluster(&cpu_data[i]) != local_cl) 534 + break; 535 + if (!cpu_online(i)) 536 + continue; 537 + return false; 538 + } 539 + 540 + /* Then do the same for higher numbered CPUs */ 541 + for (i = smp_processor_id() + 1; i < nr_cpu_ids; i++) { 542 + if (cpu_cluster(&cpu_data[i]) != local_cl) 543 + break; 544 + if (!cpu_online(i)) 545 + continue; 546 + return false; 547 + } 548 + 549 + /* We found no online CPUs in the local cluster */ 550 + return true; 551 + }
+20 -2
arch/mips/kernel/smp-bmips.c
··· 518 518 info.val = val; 519 519 bmips_set_reset_vec_remote(&info); 520 520 } else { 521 - void __iomem *cbr = BMIPS_GET_CBR(); 521 + void __iomem *cbr = bmips_cbr_addr; 522 522 523 523 if (cpu == 0) 524 524 __raw_writel(val, cbr + BMIPS_RELO_VECTOR_CONTROL_0); ··· 591 591 592 592 void bmips_cpu_setup(void) 593 593 { 594 - void __iomem __maybe_unused *cbr = BMIPS_GET_CBR(); 594 + void __iomem __maybe_unused *cbr = bmips_cbr_addr; 595 + u32 __maybe_unused rac_addr; 595 596 u32 __maybe_unused cfg; 596 597 597 598 switch (current_cpu_type()) { ··· 619 618 cfg = __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE); 620 619 __raw_writel(cfg | 0x0fff0000, cbr + BMIPS_RAC_ADDRESS_RANGE); 621 620 __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE); 621 + break; 622 + 623 + case CPU_BMIPS4350: 624 + rac_addr = BMIPS_RAC_CONFIG_1; 625 + 626 + if (!(read_c0_brcm_cmt_local() & (1 << 31))) 627 + rac_addr = BMIPS_RAC_CONFIG; 628 + 629 + /* Enable data RAC */ 630 + cfg = __raw_readl(cbr + rac_addr); 631 + __raw_writel(cfg | 0xf, cbr + rac_addr); 632 + __raw_readl(cbr + rac_addr); 633 + 634 + /* Flush stale data out of the readahead cache */ 635 + cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG); 636 + __raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG); 637 + __raw_readl(cbr + BMIPS_RAC_CONFIG); 622 638 break; 623 639 624 640 case CPU_BMIPS4380:
-2
arch/mips/kernel/smp.c
··· 462 462 return -EIO; 463 463 } 464 464 465 - synchronise_count_master(cpu); 466 - 467 465 /* Wait for CPU to finish startup & mark itself online before return */ 468 466 wait_for_completion(&cpu_running); 469 467 return 0;
+207 -84
arch/mips/kernel/sync-r4k.c
··· 2 2 /* 3 3 * Count register synchronisation. 4 4 * 5 - * All CPUs will have their count registers synchronised to the CPU0 next time 6 - * value. This can cause a small timewarp for CPU0. All other CPU's should 7 - * not have done anything significant (but they may have had interrupts 8 - * enabled briefly - prom_smp_finish() should not be responsible for enabling 9 - * interrupts...) 5 + * Derived from arch/x86/kernel/tsc_sync.c 6 + * Copyright (C) 2006, Red Hat, Inc., Ingo Molnar 10 7 */ 11 8 12 9 #include <linux/kernel.h> 13 10 #include <linux/irqflags.h> 14 11 #include <linux/cpumask.h> 12 + #include <linux/atomic.h> 13 + #include <linux/nmi.h> 14 + #include <linux/smp.h> 15 + #include <linux/spinlock.h> 15 16 16 17 #include <asm/r4k-timer.h> 17 - #include <linux/atomic.h> 18 - #include <asm/barrier.h> 19 18 #include <asm/mipsregs.h> 19 + #include <asm/time.h> 20 20 21 - static unsigned int initcount = 0; 22 - static atomic_t count_count_start = ATOMIC_INIT(0); 23 - static atomic_t count_count_stop = ATOMIC_INIT(0); 21 + #define COUNTON 100 22 + #define NR_LOOPS 3 23 + #define LOOP_TIMEOUT 20 24 24 25 - #define COUNTON 100 26 - #define NR_LOOPS 3 25 + /* 26 + * Entry/exit counters that make sure that both CPUs 27 + * run the measurement code at once: 28 + */ 29 + static atomic_t start_count; 30 + static atomic_t stop_count; 31 + static atomic_t test_runs; 27 32 28 - void synchronise_count_master(int cpu) 33 + /* 34 + * We use a raw spinlock in this exceptional case, because 35 + * we want to have the fastest, inlined, non-debug version 36 + * of a critical section, to be able to prove counter time-warps: 37 + */ 38 + static arch_spinlock_t sync_lock = __ARCH_SPIN_LOCK_UNLOCKED; 39 + 40 + static uint32_t last_counter; 41 + static uint32_t max_warp; 42 + static int nr_warps; 43 + static int random_warps; 44 + 45 + /* 46 + * Counter warp measurement loop running on both CPUs. 47 + */ 48 + static uint32_t check_counter_warp(void) 29 49 { 30 - int i; 31 - unsigned long flags; 50 + uint32_t start, now, prev, end, cur_max_warp = 0; 51 + int i, cur_warps = 0; 32 52 33 - pr_info("Synchronize counters for CPU %u: ", cpu); 53 + start = read_c0_count(); 54 + end = start + (uint32_t) mips_hpt_frequency / 1000 * LOOP_TIMEOUT; 34 55 35 - local_irq_save(flags); 36 - 37 - /* 38 - * We loop a few times to get a primed instruction cache, 39 - * then the last pass is more or less synchronised and 40 - * the master and slaves each set their cycle counters to a known 41 - * value all at once. This reduces the chance of having random offsets 42 - * between the processors, and guarantees that the maximum 43 - * delay between the cycle counters is never bigger than 44 - * the latency of information-passing (cachelines) between 45 - * two CPUs. 46 - */ 47 - 48 - for (i = 0; i < NR_LOOPS; i++) { 49 - /* slaves loop on '!= 2' */ 50 - while (atomic_read(&count_count_start) != 1) 51 - mb(); 52 - atomic_set(&count_count_stop, 0); 53 - smp_wmb(); 54 - 55 - /* Let the slave writes its count register */ 56 - atomic_inc(&count_count_start); 57 - 58 - /* Count will be initialised to current timer */ 59 - if (i == 1) 60 - initcount = read_c0_count(); 56 + for (i = 0; ; i++) { 57 + /* 58 + * We take the global lock, measure counter, save the 59 + * previous counter that was measured (possibly on 60 + * another CPU) and update the previous counter timestamp. 61 + */ 62 + arch_spin_lock(&sync_lock); 63 + prev = last_counter; 64 + now = read_c0_count(); 65 + last_counter = now; 66 + arch_spin_unlock(&sync_lock); 61 67 62 68 /* 63 - * Everyone initialises count in the last loop: 69 + * Be nice every now and then (and also check whether 70 + * measurement is done [we also insert a 10 million 71 + * loops safety exit, so we dont lock up in case the 72 + * counter is totally broken]): 64 73 */ 65 - if (i == NR_LOOPS-1) 66 - write_c0_count(initcount); 67 - 74 + if (unlikely(!(i & 7))) { 75 + if (now > end || i > 10000000) 76 + break; 77 + cpu_relax(); 78 + touch_nmi_watchdog(); 79 + } 68 80 /* 69 - * Wait for slave to leave the synchronization point: 81 + * Outside the critical section we can now see whether 82 + * we saw a time-warp of the counter going backwards: 70 83 */ 71 - while (atomic_read(&count_count_stop) != 1) 72 - mb(); 73 - atomic_set(&count_count_start, 0); 74 - smp_wmb(); 75 - atomic_inc(&count_count_stop); 84 + if (unlikely(prev > now)) { 85 + arch_spin_lock(&sync_lock); 86 + max_warp = max(max_warp, prev - now); 87 + cur_max_warp = max_warp; 88 + /* 89 + * Check whether this bounces back and forth. Only 90 + * one CPU should observe time going backwards. 91 + */ 92 + if (cur_warps != nr_warps) 93 + random_warps++; 94 + nr_warps++; 95 + cur_warps = nr_warps; 96 + arch_spin_unlock(&sync_lock); 97 + } 76 98 } 77 - /* Arrange for an interrupt in a short while */ 78 - write_c0_compare(read_c0_count() + COUNTON); 79 - 80 - local_irq_restore(flags); 81 - 82 - /* 83 - * i386 code reported the skew here, but the 84 - * count registers were almost certainly out of sync 85 - * so no point in alarming people 86 - */ 87 - pr_cont("done.\n"); 99 + WARN(!(now-start), 100 + "Warning: zero counter calibration delta: %d [max: %d]\n", 101 + now-start, end-start); 102 + return cur_max_warp; 88 103 } 89 104 105 + /* 106 + * The freshly booted CPU initiates this via an async SMP function call. 107 + */ 108 + static void check_counter_sync_source(void *__cpu) 109 + { 110 + unsigned int cpu = (unsigned long)__cpu; 111 + int cpus = 2; 112 + 113 + atomic_set(&test_runs, NR_LOOPS); 114 + retry: 115 + /* Wait for the target to start. */ 116 + while (atomic_read(&start_count) != cpus - 1) 117 + cpu_relax(); 118 + 119 + /* 120 + * Trigger the target to continue into the measurement too: 121 + */ 122 + atomic_inc(&start_count); 123 + 124 + check_counter_warp(); 125 + 126 + while (atomic_read(&stop_count) != cpus-1) 127 + cpu_relax(); 128 + 129 + /* 130 + * If the test was successful set the number of runs to zero and 131 + * stop. If not, decrement the number of runs an check if we can 132 + * retry. In case of random warps no retry is attempted. 133 + */ 134 + if (!nr_warps) { 135 + atomic_set(&test_runs, 0); 136 + 137 + pr_info("Counter synchronization [CPU#%d -> CPU#%u]: passed\n", 138 + smp_processor_id(), cpu); 139 + } else if (atomic_dec_and_test(&test_runs) || random_warps) { 140 + /* Force it to 0 if random warps brought us here */ 141 + atomic_set(&test_runs, 0); 142 + 143 + pr_info("Counter synchronization [CPU#%d -> CPU#%u]:\n", 144 + smp_processor_id(), cpu); 145 + pr_info("Measured %d cycles counter warp between CPUs", max_warp); 146 + if (random_warps) 147 + pr_warn("Counter warped randomly between CPUs\n"); 148 + } 149 + 150 + /* 151 + * Reset it - just in case we boot another CPU later: 152 + */ 153 + atomic_set(&start_count, 0); 154 + random_warps = 0; 155 + nr_warps = 0; 156 + max_warp = 0; 157 + last_counter = 0; 158 + 159 + /* 160 + * Let the target continue with the bootup: 161 + */ 162 + atomic_inc(&stop_count); 163 + 164 + /* 165 + * Retry, if there is a chance to do so. 166 + */ 167 + if (atomic_read(&test_runs) > 0) 168 + goto retry; 169 + } 170 + 171 + /* 172 + * Freshly booted CPUs call into this: 173 + */ 90 174 void synchronise_count_slave(int cpu) 91 175 { 92 - int i; 93 - unsigned long flags; 176 + uint32_t cur_max_warp, gbl_max_warp, count; 177 + int cpus = 2; 94 178 95 - local_irq_save(flags); 179 + if (!cpu_has_counter || !mips_hpt_frequency) 180 + return; 181 + 182 + /* Kick the control CPU into the counter synchronization function */ 183 + smp_call_function_single(cpumask_first(cpu_online_mask), 184 + check_counter_sync_source, 185 + (unsigned long *)(unsigned long)cpu, 0); 186 + retry: 187 + /* 188 + * Register this CPU's participation and wait for the 189 + * source CPU to start the measurement: 190 + */ 191 + atomic_inc(&start_count); 192 + while (atomic_read(&start_count) != cpus) 193 + cpu_relax(); 194 + 195 + cur_max_warp = check_counter_warp(); 96 196 97 197 /* 98 - * Not every cpu is online at the time this gets called, 99 - * so we first wait for the master to say everyone is ready 198 + * Store the maximum observed warp value for a potential retry: 100 199 */ 200 + gbl_max_warp = max_warp; 101 201 102 - for (i = 0; i < NR_LOOPS; i++) { 103 - atomic_inc(&count_count_start); 104 - while (atomic_read(&count_count_start) != 2) 105 - mb(); 202 + /* 203 + * Ok, we are done: 204 + */ 205 + atomic_inc(&stop_count); 106 206 107 - /* 108 - * Everyone initialises count in the last loop: 109 - */ 110 - if (i == NR_LOOPS-1) 111 - write_c0_count(initcount); 207 + /* 208 + * Wait for the source CPU to print stuff: 209 + */ 210 + while (atomic_read(&stop_count) != cpus) 211 + cpu_relax(); 112 212 113 - atomic_inc(&count_count_stop); 114 - while (atomic_read(&count_count_stop) != 2) 115 - mb(); 213 + /* 214 + * Reset it for the next sync test: 215 + */ 216 + atomic_set(&stop_count, 0); 217 + 218 + /* 219 + * Check the number of remaining test runs. If not zero, the test 220 + * failed and a retry with adjusted counter is possible. If zero the 221 + * test was either successful or failed terminally. 222 + */ 223 + if (!atomic_read(&test_runs)) { 224 + /* Arrange for an interrupt in a short while */ 225 + write_c0_compare(read_c0_count() + COUNTON); 226 + return; 116 227 } 117 - /* Arrange for an interrupt in a short while */ 118 - write_c0_compare(read_c0_count() + COUNTON); 119 228 120 - local_irq_restore(flags); 229 + /* 230 + * If the warp value of this CPU is 0, then the other CPU 231 + * observed time going backwards so this counter was ahead and 232 + * needs to move backwards. 233 + */ 234 + if (!cur_max_warp) 235 + cur_max_warp = -gbl_max_warp; 236 + 237 + count = read_c0_count(); 238 + count += cur_max_warp; 239 + write_c0_count(count); 240 + 241 + pr_debug("Counter compensate: CPU%u observed %d warp\n", cpu, cur_max_warp); 242 + 243 + goto retry; 244 + 121 245 } 122 - #undef NR_LOOPS
+4
arch/mips/kvm/interrupt.h
··· 37 37 int kvm_mips_pending_timer(struct kvm_vcpu *vcpu); 38 38 39 39 void kvm_mips_deliver_interrupts(struct kvm_vcpu *vcpu, u32 cause); 40 + 41 + #ifdef CONFIG_CPU_LOONGSON64 42 + extern void kvm_init_loongson_ipi(struct kvm *kvm); 43 + #endif
+2
arch/mips/kvm/loongson_ipi.c
··· 10 10 11 11 #include <linux/kvm_host.h> 12 12 13 + #include "interrupt.h" 14 + 13 15 #define IPI_BASE 0x3ff01000ULL 14 16 15 17 #define CORE0_STATUS_OFF 0x000
-2
arch/mips/kvm/mips.c
··· 135 135 kvm_mips_callbacks->hardware_disable(); 136 136 } 137 137 138 - extern void kvm_init_loongson_ipi(struct kvm *kvm); 139 - 140 138 int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) 141 139 { 142 140 switch (type) {
+20
arch/mips/lantiq/xway/sysctrl.c
··· 247 247 pr_warn("deactivating PMU module failed!"); 248 248 } 249 249 250 + static void usb_set_clock(void) 251 + { 252 + unsigned int val = ltq_cgu_r32(ifccr); 253 + 254 + if (of_machine_is_compatible("lantiq,ar10") || 255 + of_machine_is_compatible("lantiq,grx390")) { 256 + val &= ~0x03; /* XTAL divided by 3 */ 257 + } else if (of_machine_is_compatible("lantiq,ar9") || 258 + of_machine_is_compatible("lantiq,vr9")) { 259 + /* TODO: this depends on the XTAL frequency */ 260 + val |= 0x03; /* XTAL divided by 3 */ 261 + } else if (of_machine_is_compatible("lantiq,ase")) { 262 + val |= 0x20; /* from XTAL */ 263 + } else if (of_machine_is_compatible("lantiq,danube")) { 264 + val |= 0x30; /* 12 MHz, generated from 36 MHz */ 265 + } 266 + ltq_cgu_w32(val, ifccr); 267 + } 268 + 250 269 /* the pci enable helper */ 251 270 static int pci_enable(struct clk *clk) 252 271 { ··· 607 588 clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE); 608 589 clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0); 609 590 } 591 + usb_set_clock(); 610 592 }
+1 -1
arch/mips/loongson64/Makefile
··· 8 8 obj-$(CONFIG_SMP) += smp.o 9 9 obj-$(CONFIG_NUMA) += numa.o 10 10 obj-$(CONFIG_RS780_HPET) += hpet.o 11 - obj-$(CONFIG_SUSPEND) += pm.o 11 + obj-$(CONFIG_SUSPEND) += pm.o sleeper.o 12 12 obj-$(CONFIG_PCI_QUIRKS) += vbios_quirk.o 13 13 obj-$(CONFIG_CPU_LOONGSON3_CPUCFG_EMULATION) += cpucfg-emul.o 14 14 obj-$(CONFIG_SYSFS) += boardinfo.o
+1
arch/mips/loongson64/dma.c
··· 2 2 #include <linux/dma-direct.h> 3 3 #include <linux/init.h> 4 4 #include <linux/swiotlb.h> 5 + #include <asm/bootinfo.h> 5 6 #include <boot_param.h> 6 7 7 8 dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
+8
arch/mips/loongson64/env.c
··· 88 88 cpu_clock_freq = ecpu->cpu_clock_freq; 89 89 loongson_sysconf.cputype = ecpu->cputype; 90 90 switch (ecpu->cputype) { 91 + case Legacy_2K: 92 + case Loongson_2K: 93 + smp_group[0] = 0x900000001fe11000; 94 + loongson_sysconf.cores_per_node = 2; 95 + loongson_sysconf.cores_per_package = 2; 96 + break; 91 97 case Legacy_3A: 92 98 case Loongson_3A: 93 99 loongson_sysconf.cores_per_node = 4; ··· 227 221 default: 228 222 break; 229 223 } 224 + } else if ((read_c0_prid() & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64R) { 225 + loongson_fdt_blob = __dtb_loongson64_2core_2k1000_begin; 230 226 } else if ((read_c0_prid() & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64G) { 231 227 if (loongson_sysconf.bridgetype == LS7A) 232 228 loongson_fdt_blob = __dtb_loongson64g_4core_ls7a_begin;
+20 -72
arch/mips/loongson64/pm.c
··· 6 6 * Author: Wu Zhangjin <wuzhangjin@gmail.com> 7 7 */ 8 8 #include <linux/suspend.h> 9 - #include <linux/interrupt.h> 10 9 #include <linux/pm.h> 11 10 12 - #include <asm/i8259.h> 13 11 #include <asm/mipsregs.h> 14 12 15 13 #include <loongson.h> 16 14 17 - static unsigned int __maybe_unused cached_master_mask; /* i8259A */ 18 - static unsigned int __maybe_unused cached_slave_mask; 19 - static unsigned int __maybe_unused cached_bonito_irq_mask; /* bonito */ 15 + asmlinkage void loongson_lefi_sleep(unsigned long sleep_addr); 20 16 21 - void arch_suspend_disable_irqs(void) 22 - { 23 - /* disable all mips events */ 24 - local_irq_disable(); 25 - 26 - #ifdef CONFIG_I8259 27 - /* disable all events of i8259A */ 28 - cached_slave_mask = inb(PIC_SLAVE_IMR); 29 - cached_master_mask = inb(PIC_MASTER_IMR); 30 - 31 - outb(0xff, PIC_SLAVE_IMR); 32 - inb(PIC_SLAVE_IMR); 33 - outb(0xff, PIC_MASTER_IMR); 34 - inb(PIC_MASTER_IMR); 35 - #endif 36 - /* disable all events of bonito */ 37 - cached_bonito_irq_mask = LOONGSON_INTEN; 38 - LOONGSON_INTENCLR = 0xffff; 39 - (void)LOONGSON_INTENCLR; 40 - } 41 - 42 - void arch_suspend_enable_irqs(void) 43 - { 44 - /* enable all mips events */ 45 - local_irq_enable(); 46 - #ifdef CONFIG_I8259 47 - /* only enable the cached events of i8259A */ 48 - outb(cached_slave_mask, PIC_SLAVE_IMR); 49 - outb(cached_master_mask, PIC_MASTER_IMR); 50 - #endif 51 - /* enable all cached events of bonito */ 52 - LOONGSON_INTENSET = cached_bonito_irq_mask; 53 - (void)LOONGSON_INTENSET; 54 - } 55 - 56 - /* 57 - * Setup the board-specific events for waking up loongson from wait mode 58 - */ 59 - void __weak setup_wakeup_events(void) 60 - { 61 - } 62 - 63 - void __weak mach_suspend(void) 64 - { 65 - } 66 - 67 - void __weak mach_resume(void) 68 - { 69 - } 70 - 71 - static int loongson_pm_enter(suspend_state_t state) 72 - { 73 - mach_suspend(); 74 - 75 - mach_resume(); 76 - 77 - return 0; 78 - } 79 - 80 - static int loongson_pm_valid_state(suspend_state_t state) 17 + static int lefi_pm_enter(suspend_state_t state) 81 18 { 82 19 switch (state) { 83 - case PM_SUSPEND_ON: 84 - case PM_SUSPEND_STANDBY: 85 20 case PM_SUSPEND_MEM: 86 - return 1; 21 + pm_set_suspend_via_firmware(); 22 + loongson_lefi_sleep(loongson_sysconf.suspend_addr); 23 + pm_set_resume_via_firmware(); 24 + return 0; 25 + default: 26 + return -EINVAL; 27 + } 28 + } 87 29 30 + static int lefi_pm_valid_state(suspend_state_t state) 31 + { 32 + switch (state) { 33 + case PM_SUSPEND_MEM: 34 + return !!loongson_sysconf.suspend_addr; 88 35 default: 89 36 return 0; 90 37 } 91 38 } 92 39 93 - static const struct platform_suspend_ops loongson_pm_ops = { 94 - .valid = loongson_pm_valid_state, 95 - .enter = loongson_pm_enter, 40 + static const struct platform_suspend_ops lefi_pm_ops = { 41 + .valid = lefi_pm_valid_state, 42 + .enter = lefi_pm_enter, 96 43 }; 97 44 98 45 static int __init loongson_pm_init(void) 99 46 { 100 - suspend_set_ops(&loongson_pm_ops); 47 + if (loongson_sysconf.fw_interface == LOONGSON_LEFI) 48 + suspend_set_ops(&lefi_pm_ops); 101 49 102 50 return 0; 103 51 }
+16 -22
arch/mips/loongson64/reset.c
··· 11 11 #include <linux/init.h> 12 12 #include <linux/kexec.h> 13 13 #include <linux/pm.h> 14 + #include <linux/reboot.h> 14 15 #include <linux/slab.h> 15 16 16 17 #include <asm/bootinfo.h> ··· 22 21 #include <loongson.h> 23 22 #include <boot_param.h> 24 23 25 - static void loongson_restart(char *command) 24 + static int firmware_restart(struct sys_off_data *unusedd) 26 25 { 27 26 28 27 void (*fw_restart)(void) = (void *)loongson_sysconf.restart_addr; 29 28 30 29 fw_restart(); 31 - while (1) { 32 - if (cpu_wait) 33 - cpu_wait(); 34 - } 30 + return NOTIFY_DONE; 35 31 } 36 32 37 - static void loongson_poweroff(void) 33 + static int firmware_poweroff(struct sys_off_data *unused) 38 34 { 39 35 void (*fw_poweroff)(void) = (void *)loongson_sysconf.poweroff_addr; 40 36 41 37 fw_poweroff(); 42 - while (1) { 43 - if (cpu_wait) 44 - cpu_wait(); 45 - } 46 - } 47 - 48 - static void loongson_halt(void) 49 - { 50 - pr_notice("\n\n** You can safely turn off the power now **\n\n"); 51 - while (1) { 52 - if (cpu_wait) 53 - cpu_wait(); 54 - } 38 + return NOTIFY_DONE; 55 39 } 56 40 57 41 #ifdef CONFIG_KEXEC_CORE ··· 140 154 141 155 static int __init mips_reboot_setup(void) 142 156 { 143 - _machine_restart = loongson_restart; 144 - _machine_halt = loongson_halt; 145 - pm_power_off = loongson_poweroff; 157 + if (loongson_sysconf.restart_addr) { 158 + register_sys_off_handler(SYS_OFF_MODE_RESTART, 159 + SYS_OFF_PRIO_FIRMWARE, 160 + firmware_restart, NULL); 161 + } 162 + 163 + if (loongson_sysconf.poweroff_addr) { 164 + register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, 165 + SYS_OFF_PRIO_FIRMWARE, 166 + firmware_poweroff, NULL); 167 + } 146 168 147 169 #ifdef CONFIG_KEXEC_CORE 148 170 kexec_argv = kmalloc(KEXEC_ARGV_SIZE, GFP_KERNEL);
+21
arch/mips/loongson64/sleeper.S
··· 1 + /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 + /* 3 + * Copyright (C) 2024, Jiaxun Yang <jiaxun.yang@flygoat.com> 4 + * Loongson EFI firmware sleeper routine 5 + */ 6 + 7 + #include <asm/asm.h> 8 + #include <asm/pm.h> 9 + 10 + #include <kernel-entry-init.h> 11 + 12 + LEAF(loongson_lefi_sleep) 13 + SUSPEND_SAVE 14 + move t9, a0 15 + PTR_LA a0, wake 16 + move a1, sp 17 + jalr t9 18 + wake: 19 + smp_slave_setup 20 + RESUME_RESTORE_REGS_RETURN 21 + END(loongson_lefi_sleep)
+21 -2
arch/mips/loongson64/smp.c
··· 466 466 static void __init loongson3_smp_setup(void) 467 467 { 468 468 int i = 0, num = 0; /* i: physical id, num: logical id */ 469 + int max_cpus = 0; 469 470 470 471 init_cpu_possible(cpu_none_mask); 472 + 473 + for (i = 0; i < ARRAY_SIZE(smp_group); i++) { 474 + if (!smp_group[i]) 475 + break; 476 + max_cpus += loongson_sysconf.cores_per_node; 477 + } 478 + 479 + if (max_cpus < loongson_sysconf.nr_cpus) { 480 + pr_err("SMP Groups are less than the number of CPUs\n"); 481 + loongson_sysconf.nr_cpus = max_cpus ? max_cpus : 1; 482 + } 471 483 472 484 /* For unified kernel, NR_CPUS is the maximum possible value, 473 485 * loongson_sysconf.nr_cpus is the really present value 474 486 */ 487 + i = 0; 475 488 while (i < loongson_sysconf.nr_cpus) { 476 489 if (loongson_sysconf.reserved_cpus_mask & (1<<i)) { 477 490 /* Reserved physical CPU cores */ ··· 505 492 __cpu_logical_map[num] = -1; 506 493 num++; 507 494 } 508 - 509 495 csr_ipi_probe(); 510 496 ipi_set0_regs_init(); 511 497 ipi_clear0_regs_init(); 512 498 ipi_status0_regs_init(); 513 499 ipi_en0_regs_init(); 514 500 ipi_mailbox_buf_init(); 515 - ipi_write_enable(0); 501 + if (smp_group[0]) 502 + ipi_write_enable(0); 516 503 517 504 cpu_set_core(&cpu_data[0], 518 505 cpu_logical_map(0) % loongson_sysconf.cores_per_package); ··· 831 818 uint64_t core_id = cpu_core(&cpu_data[cpu]); 832 819 uint64_t package_id = cpu_data[cpu].package; 833 820 821 + if (!loongson_chipcfg[package_id] || !loongson_freqctrl[package_id]) 822 + return 0; 823 + 834 824 if ((read_c0_prid() & PRID_REV_MASK) == PRID_REV_LOONGSON3A_R1) { 835 825 LOONGSON_CHIPCFG(package_id) &= ~(1 << (12 + core_id)); 836 826 } else { ··· 847 831 { 848 832 uint64_t core_id = cpu_core(&cpu_data[cpu]); 849 833 uint64_t package_id = cpu_data[cpu].package; 834 + 835 + if (!loongson_chipcfg[package_id] || !loongson_freqctrl[package_id]) 836 + return 0; 850 837 851 838 if ((read_c0_prid() & PRID_REV_MASK) == PRID_REV_LOONGSON3A_R1) { 852 839 LOONGSON_CHIPCFG(package_id) |= 1 << (12 + core_id);
+26
arch/mips/mobileye/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + if EYEQ 3 + 4 + choice 5 + prompt "Mobileye EyeQ SoC selection" 6 + default MACH_EYEQ5 7 + help 8 + Select Mobileye EyeQ MIPS SoC type. 9 + 10 + config MACH_EYEQ5 11 + bool "Mobileye EyeQ5 SoC" 12 + 13 + config MACH_EYEQ6H 14 + bool "Mobileye EyeQ6H SoC" 15 + endchoice 16 + 17 + config FIT_IMAGE_FDT_EPM5 18 + bool "Include FDT for Mobileye EyeQ5 development platforms" 19 + depends on MACH_EYEQ5 20 + default n 21 + help 22 + Enable this to include the FDT for the EyeQ5 development platforms 23 + from Mobileye in the FIT kernel image. 24 + This requires u-boot on the platform. 25 + 26 + endif
+1
arch/mips/mobileye/Platform
··· 9 9 # 10 10 11 11 load-$(CONFIG_MACH_EYEQ5) = 0xa800000808000000 12 + load-$(CONFIG_MACH_EYEQ6H) = 0xa800000100800000 12 13 all-$(CONFIG_MACH_EYEQ5) += vmlinux.gz.itb 13 14 14 15 its-y := vmlinux.its.S
arch/mips/pci/pcie-octeon.c
+2 -2
arch/mips/sgi-ip22/ip22-gio.c
··· 246 246 } 247 247 EXPORT_SYMBOL_GPL(gio_set_master); 248 248 249 - void ip22_gio_set_64bit(int slotno) 249 + static void ip22_gio_set_64bit(int slotno) 250 250 { 251 251 u32 tmp = sgimc->giopar; 252 252 ··· 395 395 .flags = IORESOURCE_MEM, 396 396 }; 397 397 398 - int __init ip22_gio_init(void) 398 + static int __init ip22_gio_init(void) 399 399 { 400 400 unsigned int pbdma __maybe_unused; 401 401 int ret;
-2
arch/mips/sgi-ip22/ip22-int.c
··· 165 165 #define SGI_INTERRUPTS SGINT_LOCAL3 166 166 #endif 167 167 168 - extern void indy_8254timer_irq(void); 169 - 170 168 /* 171 169 * IRQs on the INDY look basically (barring software IRQs which we don't use 172 170 * at all) like:
-2
arch/mips/sgi-ip22/ip22-setup.c
··· 26 26 #include <asm/sgi/hpc3.h> 27 27 #include <asm/sgi/ip22.h> 28 28 29 - extern void ip22_be_init(void) __init; 30 - 31 29 void __init plat_mem_setup(void) 32 30 { 33 31 char *ctype;
+1
arch/mips/sgi-ip30/ip30-console.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 3 3 #include <linux/io.h> 4 + #include <linux/processor.h> 4 5 5 6 #include <asm/sn/ioc3.h> 6 7 #include <asm/setup.h>
+3
drivers/platform/mips/cpu_hwmon.c
··· 139 139 csr_temp_enable = csr_readl(LOONGSON_CSR_FEATURES) & 140 140 LOONGSON_CSRF_TEMP; 141 141 142 + if (!csr_temp_enable && !loongson_chiptemp[0]) 143 + return -ENODEV; 144 + 142 145 nr_packages = loongson_sysconf.nr_cpus / 143 146 loongson_sysconf.cores_per_package; 144 147