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

Merge tag 'mips_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips

Pull MIPS updates from James Hogan:
"These are the main MIPS changes for 4.17. Rough overview:

(1) generic platform: Add support for Microsemi Ocelot SoCs

(2) crypto: Add CRC32 and CRC32C HW acceleration module

(3) Various cleanups and misc improvements

More detailed summary:

Miscellaneous:
- hang more efficiently on halt/powerdown/restart
- pm-cps: Block system suspend when a JTAG probe is present
- expand make help text for generic defconfigs
- refactor handling of legacy defconfigs
- determine the entry point from the ELF file header to fix microMIPS
for certain toolchains
- introduce isa-rev.h for MIPS_ISA_REV and use to simplify other code

Minor cleanups:
- DTS: boston/ci20: Unit name cleanups and correction
- kdump: Make the default for PHYSICAL_START always 64-bit
- constify gpio_led in Alchemy, AR7, and TXX9
- silence a couple of W=1 warnings
- remove duplicate includes

Platform support:
Generic platform:
- add support for Microsemi Ocelot
- dt-bindings: Add vendor prefix for Microsemi Corporation
- dt-bindings: Add bindings for Microsemi SoCs
- add ocelot SoC & PCB123 board DTS files
- MAINTAINERS: Add entry for Microsemi MIPS SoCs
- enable crc32-mips on r6 configs

ath79:
- fix AR724X_PLL_REG_PCIE_CONFIG offset

BCM47xx:
- firmware: Use mac_pton() for MAC address parsing
- add Luxul XAP1500/XWR1750 WiFi LEDs
- use standard reset button for Luxul XWR-1750

BMIPS:
- enable CONFIG_BRCMSTB_PM in bmips_stb_defconfig for build coverage
- add STB PM, wake-up timer, watchdog DT nodes

Octeon:
- drop '.' after newlines in printk calls

ralink:
- pci-mt7621: Enable PCIe on MT7688"

* tag 'mips_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: (37 commits)
MIPS: BCM47XX: Use standard reset button for Luxul XWR-1750
MIPS: BCM47XX: Add Luxul XAP1500/XWR1750 WiFi LEDs
MIPS: Make the default for PHYSICAL_START always 64-bit
MIPS: Use the entry point from the ELF file header
MAINTAINERS: Add entry for Microsemi MIPS SoCs
MIPS: generic: Add support for Microsemi Ocelot
MIPS: mscc: Add ocelot PCB123 device tree
MIPS: mscc: Add ocelot dtsi
dt-bindings: mips: Add bindings for Microsemi SoCs
dt-bindings: Add vendor prefix for Microsemi Corporation
MIPS: ath79: Fix AR724X_PLL_REG_PCIE_CONFIG offset
MIPS: pci-mt7620: Enable PCIe on MT7688
MIPS: pm-cps: Block system suspend when a JTAG probe is present
MIPS: VDSO: Replace __mips_isa_rev with MIPS_ISA_REV
MIPS: BPF: Replace __mips_isa_rev with MIPS_ISA_REV
MIPS: cpu-features.h: Replace __mips_isa_rev with MIPS_ISA_REV
MIPS: Introduce isa-rev.h to define MIPS_ISA_REV
MIPS: Hang more efficiently on halt/powerdown/restart
FIRMWARE: bcm47xx_nvram: Replace mac address parsing
MIPS: BMIPS: Add Broadcom STB watchdog nodes
...

+1381 -84
+43
Documentation/devicetree/bindings/mips/mscc.txt
··· 1 + * Microsemi MIPS CPUs 2 + 3 + Boards with a SoC of the Microsemi MIPS family shall have the following 4 + properties: 5 + 6 + Required properties: 7 + - compatible: "mscc,ocelot" 8 + 9 + 10 + * Other peripherals: 11 + 12 + o CPU chip regs: 13 + 14 + The SoC has a few registers (DEVCPU_GCB:CHIP_REGS) handling miscellaneous 15 + functionalities: chip ID, general purpose register for software use, reset 16 + controller, hardware status and configuration, efuses. 17 + 18 + Required properties: 19 + - compatible: Should be "mscc,ocelot-chip-regs", "simple-mfd", "syscon" 20 + - reg : Should contain registers location and length 21 + 22 + Example: 23 + syscon@71070000 { 24 + compatible = "mscc,ocelot-chip-regs", "simple-mfd", "syscon"; 25 + reg = <0x71070000 0x1c>; 26 + }; 27 + 28 + 29 + o CPU system control: 30 + 31 + The SoC has a few registers (ICPU_CFG:CPU_SYSTEM_CTRL) handling configuration of 32 + the CPU: 8 general purpose registers, reset control, CPU en/disabling, CPU 33 + endianness, CPU bus control, CPU status. 34 + 35 + Required properties: 36 + - compatible: Should be "mscc,ocelot-cpu-syscon", "syscon" 37 + - reg : Should contain registers location and length 38 + 39 + Example: 40 + syscon@70000000 { 41 + compatible = "mscc,ocelot-cpu-syscon", "syscon"; 42 + reg = <0x70000000 0x2c>; 43 + };
+1
Documentation/devicetree/bindings/vendor-prefixes.txt
··· 225 225 moxa Moxa Inc. 226 226 mpl MPL AG 227 227 mqmaker mqmaker Inc. 228 + mscc Microsemi Corporation 228 229 msi Micro-Star International Co. Ltd. 229 230 mti Imagination Technologies Ltd. (formerly MIPS Technologies Inc.) 230 231 multi-inno Multi-Inno Technology Co.,Ltd
+9
MAINTAINERS
··· 9230 9230 F: drivers/usb/misc/usb251xb.c 9231 9231 F: Documentation/devicetree/bindings/usb/usb251xb.txt 9232 9232 9233 + MICROSEMI MIPS SOCS 9234 + M: Alexandre Belloni <alexandre.belloni@bootlin.com> 9235 + L: linux-mips@linux-mips.org 9236 + S: Maintained 9237 + F: arch/mips/generic/board-ocelot.c 9238 + F: arch/mips/configs/generic/board-ocelot.config 9239 + F: arch/mips/boot/dts/mscc/ 9240 + F: Documentation/devicetree/bindings/mips/mscc.txt 9241 + 9233 9242 MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi) 9234 9243 M: Don Brace <don.brace@microsemi.com> 9235 9244 L: esc.storagedev@microsemi.com
+5 -2
arch/mips/Kconfig
··· 2029 2029 select CPU_HAS_RIXI 2030 2030 select HAVE_ARCH_BITREVERSE 2031 2031 select MIPS_ASID_BITS_VARIABLE 2032 + select MIPS_CRC_SUPPORT 2032 2033 select MIPS_SPRAM 2033 2034 2034 2035 config EVA ··· 2503 2502 config MIPS_ASID_BITS_VARIABLE 2504 2503 bool 2505 2504 2505 + config MIPS_CRC_SUPPORT 2506 + bool 2507 + 2506 2508 # 2507 2509 # - Highmem only makes sense for the 32-bit kernel. 2508 2510 # - The current highmem code will only work properly on physically indexed ··· 2854 2850 2855 2851 config PHYSICAL_START 2856 2852 hex "Physical address where the kernel is loaded" 2857 - default "0xffffffff84000000" if 64BIT 2858 - default "0x84000000" if 32BIT 2853 + default "0xffffffff84000000" 2859 2854 depends on CRASH_DUMP 2860 2855 help 2861 2856 This gives the CKSEG0 or KSEG0 address where the kernel is loaded.
+41 -23
arch/mips/Makefile
··· 222 222 xpa-cflags-$(micromips-ase) += -mmicromips -Wa$(comma)-fatal-warnings 223 223 toolchain-xpa := $(call cc-option-yn,$(xpa-cflags-y) -mxpa) 224 224 cflags-$(toolchain-xpa) += -DTOOLCHAIN_SUPPORTS_XPA 225 + toolchain-crc := $(call cc-option-yn,$(mips-cflags) -Wa$(comma)-mcrc) 226 + cflags-$(toolchain-crc) += -DTOOLCHAIN_SUPPORTS_CRC 225 227 226 228 # 227 229 # Firmware support ··· 251 249 load-y = $(CONFIG_PHYSICAL_START) 252 250 endif 253 251 254 - entry-noisa-y = 0x$(shell $(NM) vmlinux 2>/dev/null \ 255 - | grep "\bkernel_entry\b" | cut -f1 -d \ ) 256 - ifdef CONFIG_CPU_MICROMIPS 257 - # 258 - # Set the ISA bit, since the kernel_entry symbol in the ELF will have it 259 - # clear which would lead to images containing addresses which bootloaders may 260 - # jump to as MIPS32 code. 261 - # 262 - entry-y = $(patsubst %0,%1,$(patsubst %2,%3,$(patsubst %4,%5, \ 263 - $(patsubst %6,%7,$(patsubst %8,%9,$(patsubst %a,%b, \ 264 - $(patsubst %c,%d,$(patsubst %e,%f,$(entry-noisa-y))))))))) 265 - else 266 - entry-y = $(entry-noisa-y) 267 - endif 252 + # Sign-extend the entry point to 64 bits if retrieved as a 32-bit number. 253 + entry-y = $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \ 254 + | sed -n '/^start address / { \ 255 + s/^.* //; \ 256 + s/0x\([0-7].......\)$$/0x00000000\1/; \ 257 + s/0x\(........\)$$/0xffffffff\1/; p }') 268 258 269 259 cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 270 260 drivers-$(CONFIG_PCI) += arch/mips/pci/ ··· 324 330 # See arch/mips/Kbuild for content of core part of the kernel 325 331 core-y += arch/mips/ 326 332 333 + drivers-$(CONFIG_MIPS_CRC_SUPPORT) += arch/mips/crypto/ 327 334 drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/ 328 335 329 336 # suspend and hibernation support ··· 468 473 echo 469 474 echo ' {micro32,32,64}{r1,r2,r6}{el,}_defconfig <BOARDS="list of boards">' 470 475 echo 476 + echo ' Where BOARDS is some subset of the following:' 477 + for board in $(sort $(BOARDS)); do echo " $${board}"; done 478 + echo 479 + echo ' Specifically the following generic default configurations are' 480 + echo ' supported:' 481 + echo 482 + $(foreach cfg,$(generic_defconfigs), 483 + printf " %-24s - Build generic kernel for $(call describe_generic_defconfig,$(cfg))\n" $(cfg);) 484 + echo 485 + echo ' The following legacy default configurations have been converted to' 486 + echo ' generic and can still be used:' 487 + echo 488 + $(foreach cfg,$(sort $(legacy_defconfigs)), 489 + printf " %-24s - Build $($(cfg)-y)\n" $(cfg);) 490 + echo 471 491 echo ' Otherwise, the following default configurations are available:' 472 492 endef 473 493 ··· 516 506 517 507 $(eval $(call gen_generic_defconfigs,32 64,r1 r2 r6,eb el)) 518 508 $(eval $(call gen_generic_defconfigs,micro32,r2,eb el)) 509 + 510 + define describe_generic_defconfig 511 + $(subst 32r,MIPS32 r,$(subst 64r,MIPS64 r,$(subst el, little endian,$(patsubst %_defconfig,%,$(1))))) 512 + endef 519 513 520 514 .PHONY: $(generic_defconfigs) 521 515 $(generic_defconfigs): ··· 557 543 # now that the boards have been converted to use the generic kernel they are 558 544 # wrappers around the generic rules above. 559 545 # 560 - .PHONY: sead3_defconfig 561 - sead3_defconfig: 562 - $(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=sead-3 546 + legacy_defconfigs += ocelot_defconfig 547 + ocelot_defconfig-y := 32r2el_defconfig BOARDS=ocelot 563 548 564 - .PHONY: sead3micro_defconfig 565 - sead3micro_defconfig: 566 - $(Q)$(MAKE) -f $(srctree)/Makefile micro32r2el_defconfig BOARDS=sead-3 549 + legacy_defconfigs += sead3_defconfig 550 + sead3_defconfig-y := 32r2el_defconfig BOARDS=sead-3 567 551 568 - .PHONY: xilfpga_defconfig 569 - xilfpga_defconfig: 570 - $(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=xilfpga 552 + legacy_defconfigs += sead3micro_defconfig 553 + sead3micro_defconfig-y := micro32r2el_defconfig BOARDS=sead-3 554 + 555 + legacy_defconfigs += xilfpga_defconfig 556 + xilfpga_defconfig-y := 32r2el_defconfig BOARDS=xilfpga 557 + 558 + .PHONY: $(legacy_defconfigs) 559 + $(legacy_defconfigs): 560 + $(Q)$(MAKE) -f $(srctree)/Makefile $($@-y)
+1 -1
arch/mips/alchemy/board-gpr.c
··· 190 190 /* 191 191 * LEDs 192 192 */ 193 - static struct gpio_led gpr_gpio_leds[] = { 193 + static const struct gpio_led gpr_gpio_leds[] = { 194 194 { /* green */ 195 195 .name = "gpr:green", 196 196 .gpio = 4,
+1 -1
arch/mips/alchemy/board-mtx1.c
··· 145 145 .resource = mtx1_wdt_res, 146 146 }; 147 147 148 - static struct gpio_led default_leds[] = { 148 + static const struct gpio_led default_leds[] = { 149 149 { 150 150 .name = "mtx1:green", 151 151 .gpio = 211,
+7 -7
arch/mips/ar7/platform.c
··· 346 346 /***************************************************************************** 347 347 * LEDs 348 348 ****************************************************************************/ 349 - static struct gpio_led default_leds[] = { 349 + static const struct gpio_led default_leds[] = { 350 350 { 351 351 .name = "status", 352 352 .gpio = 8, ··· 354 354 }, 355 355 }; 356 356 357 - static struct gpio_led titan_leds[] = { 357 + static const struct gpio_led titan_leds[] = { 358 358 { .name = "status", .gpio = 8, .active_low = 1, }, 359 359 { .name = "wifi", .gpio = 13, .active_low = 1, }, 360 360 }; 361 361 362 - static struct gpio_led dsl502t_leds[] = { 362 + static const struct gpio_led dsl502t_leds[] = { 363 363 { 364 364 .name = "status", 365 365 .gpio = 9, ··· 377 377 }, 378 378 }; 379 379 380 - static struct gpio_led dg834g_leds[] = { 380 + static const struct gpio_led dg834g_leds[] = { 381 381 { 382 382 .name = "ppp", 383 383 .gpio = 6, ··· 406 406 }, 407 407 }; 408 408 409 - static struct gpio_led fb_sl_leds[] = { 409 + static const struct gpio_led fb_sl_leds[] = { 410 410 { 411 411 .name = "1", 412 412 .gpio = 7, ··· 433 433 }, 434 434 }; 435 435 436 - static struct gpio_led fb_fon_leds[] = { 436 + static const struct gpio_led fb_fon_leds[] = { 437 437 { 438 438 .name = "1", 439 439 .gpio = 8, ··· 459 459 }, 460 460 }; 461 461 462 - static struct gpio_led gt701_leds[] = { 462 + static const struct gpio_led gt701_leds[] = { 463 463 { 464 464 .name = "inet:green", 465 465 .gpio = 13,
+1 -1
arch/mips/bcm47xx/buttons.c
··· 355 355 356 356 static const struct gpio_keys_button 357 357 bcm47xx_buttons_luxul_xwr_1750_v1[] = { 358 - BCM47XX_GPIO_KEY(14, BTN_TASK), 358 + BCM47XX_GPIO_KEY(14, KEY_RESTART), 359 359 }; 360 360 361 361 /* Microsoft */
+21
arch/mips/bcm47xx/leds.c
··· 409 409 }; 410 410 411 411 static const struct gpio_led 412 + bcm47xx_leds_luxul_xap1500_v1_extra[] __initconst = { 413 + BCM47XX_GPIO_LED(44, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 414 + BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 415 + }; 416 + 417 + static const struct gpio_led 412 418 bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = { 413 419 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 414 420 BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"), ··· 439 433 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), 440 434 BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 0, "timer"), 441 435 BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), 436 + }; 437 + 438 + static const struct gpio_led 439 + bcm47xx_leds_luxul_xwr1750_v1_extra[] __initconst = { 440 + BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF), 442 441 }; 443 442 444 443 /* Microsoft */ ··· 537 526 #define bcm47xx_set_pdata(dev_leds) do { \ 538 527 bcm47xx_leds_pdata.leds = dev_leds; \ 539 528 bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \ 529 + } while (0) 530 + 531 + static struct gpio_led_platform_data bcm47xx_leds_pdata_extra __initdata = {}; 532 + #define bcm47xx_set_pdata_extra(dev_leds) do { \ 533 + bcm47xx_leds_pdata_extra.leds = dev_leds; \ 534 + bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds); \ 540 535 } while (0) 541 536 542 537 void __init bcm47xx_leds_register(void) ··· 722 705 break; 723 706 case BCM47XX_BOARD_LUXUL_XAP_1500_V1: 724 707 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1); 708 + bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xap1500_v1_extra); 725 709 break; 726 710 case BCM47XX_BOARD_LUXUL_XBR_4400_V1: 727 711 bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1); ··· 735 717 break; 736 718 case BCM47XX_BOARD_LUXUL_XWR_1750_V1: 737 719 bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1); 720 + bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xwr1750_v1_extra); 738 721 break; 739 722 740 723 case BCM47XX_BOARD_MICROSOFT_MN700: ··· 779 760 } 780 761 781 762 gpio_led_register_device(-1, &bcm47xx_leds_pdata); 763 + if (bcm47xx_leds_pdata_extra.num_leds) 764 + gpio_led_register_device(0, &bcm47xx_leds_pdata_extra); 782 765 }
+1
arch/mips/boot/dts/Makefile
··· 4 4 subdir-y += img 5 5 subdir-y += ingenic 6 6 subdir-y += lantiq 7 + subdir-y += mscc 7 8 subdir-y += mti 8 9 subdir-y += netlogic 9 10 subdir-y += ni
+7
arch/mips/boot/dts/brcm/bcm7125.dtsi
··· 198 198 status = "disabled"; 199 199 }; 200 200 201 + watchdog: watchdog@4067e8 { 202 + clocks = <&upg_clk>; 203 + compatible = "brcm,bcm7038-wdt"; 204 + reg = <0x4067e8 0x14>; 205 + status = "disabled"; 206 + }; 207 + 201 208 upg_gio: gpio@406700 { 202 209 compatible = "brcm,brcmstb-gpio"; 203 210 reg = <0x406700 0x80>;
+62
arch/mips/boot/dts/brcm/bcm7346.dtsi
··· 233 233 status = "disabled"; 234 234 }; 235 235 236 + watchdog: watchdog@4067e8 { 237 + clocks = <&upg_clk>; 238 + compatible = "brcm,bcm7038-wdt"; 239 + reg = <0x4067e8 0x14>; 240 + status = "disabled"; 241 + }; 242 + 236 243 aon_pm_l2_intc: interrupt-controller@408440 { 237 244 compatible = "brcm,l2-intc"; 238 245 reg = <0x408440 0x30>; ··· 248 241 interrupt-parent = <&periph_intc>; 249 242 interrupts = <53>; 250 243 brcm,irq-can-wake; 244 + }; 245 + 246 + aon_ctrl: syscon@408000 { 247 + compatible = "brcm,brcmstb-aon-ctrl"; 248 + reg = <0x408000 0x100>, <0x408200 0x200>; 249 + reg-names = "aon-ctrl", "aon-sram"; 250 + }; 251 + 252 + timers: timer@4067c0 { 253 + compatible = "brcm,brcmstb-timers"; 254 + reg = <0x4067c0 0x40>; 251 255 }; 252 256 253 257 upg_gio: gpio@406700 { ··· 500 482 interrupt-parent = <&upg_aon_irq0_intc>; 501 483 interrupt-names = "mspi_done"; 502 484 status = "disabled"; 485 + }; 486 + 487 + waketimer: waketimer@408e80 { 488 + compatible = "brcm,brcmstb-waketimer"; 489 + reg = <0x408e80 0x14>; 490 + interrupts = <0x3>; 491 + interrupt-parent = <&aon_pm_l2_intc>; 492 + interrupt-names = "timer"; 493 + clocks = <&upg_clk>; 494 + status = "disabled"; 495 + }; 496 + }; 497 + 498 + memory_controllers { 499 + compatible = "simple-bus"; 500 + ranges = <0x0 0x103b0000 0xa000>; 501 + #address-cells = <1>; 502 + #size-cells = <1>; 503 + 504 + memory-controller@0 { 505 + compatible = "brcm,brcmstb-memc", "simple-bus"; 506 + ranges = <0x0 0x0 0xa000>; 507 + #address-cells = <1>; 508 + #size-cells = <1>; 509 + 510 + memc-arb@1000 { 511 + compatible = "brcm,brcmstb-memc-arb"; 512 + reg = <0x1000 0x248>; 513 + }; 514 + 515 + memc-ddr@2000 { 516 + compatible = "brcm,brcmstb-memc-ddr"; 517 + reg = <0x2000 0x300>; 518 + }; 519 + 520 + ddr-phy@6000 { 521 + compatible = "brcm,brcmstb-ddr-phy"; 522 + reg = <0x6000 0xc8>; 523 + }; 524 + 525 + shimphy@8000 { 526 + compatible = "brcm,brcmstb-ddr-shimphy"; 527 + reg = <0x8000 0x13c>; 528 + }; 503 529 }; 504 530 }; 505 531 };
+17
arch/mips/boot/dts/brcm/bcm7358.dtsi
··· 217 217 status = "disabled"; 218 218 }; 219 219 220 + watchdog: watchdog@4066a8 { 221 + clocks = <&upg_clk>; 222 + compatible = "brcm,bcm7038-wdt"; 223 + reg = <0x4066a8 0x14>; 224 + status = "disabled"; 225 + }; 226 + 220 227 aon_pm_l2_intc: interrupt-controller@408240 { 221 228 compatible = "brcm,l2-intc"; 222 229 reg = <0x408240 0x30>; ··· 367 360 interrupts = <0x14>; 368 361 interrupt-parent = <&upg_aon_irq0_intc>; 369 362 interrupt-names = "mspi_done"; 363 + status = "disabled"; 364 + }; 365 + 366 + waketimer: waketimer@408e80 { 367 + compatible = "brcm,brcmstb-waketimer"; 368 + reg = <0x408e80 0x14>; 369 + interrupts = <0x3>; 370 + interrupt-parent = <&aon_pm_l2_intc>; 371 + interrupt-names = "timer"; 372 + clocks = <&upg_clk>; 370 373 status = "disabled"; 371 374 }; 372 375 };
+62
arch/mips/boot/dts/brcm/bcm7360.dtsi
··· 209 209 status = "disabled"; 210 210 }; 211 211 212 + watchdog: watchdog@4066a8 { 213 + clocks = <&upg_clk>; 214 + compatible = "brcm,bcm7038-wdt"; 215 + reg = <0x4066a8 0x14>; 216 + status = "disabled"; 217 + }; 218 + 212 219 aon_pm_l2_intc: interrupt-controller@408440 { 213 220 compatible = "brcm,l2-intc"; 214 221 reg = <0x408440 0x30>; ··· 224 217 interrupt-parent = <&periph_intc>; 225 218 interrupts = <50>; 226 219 brcm,irq-can-wake; 220 + }; 221 + 222 + aon_ctrl: syscon@408000 { 223 + compatible = "brcm,brcmstb-aon-ctrl"; 224 + reg = <0x408000 0x100>, <0x408200 0x200>; 225 + reg-names = "aon-ctrl", "aon-sram"; 226 + }; 227 + 228 + timers: timer@406680 { 229 + compatible = "brcm,brcmstb-timers"; 230 + reg = <0x406680 0x40>; 227 231 }; 228 232 229 233 upg_gio: gpio@406500 { ··· 419 401 interrupt-parent = <&upg_aon_irq0_intc>; 420 402 interrupt-names = "mspi_done"; 421 403 status = "disabled"; 404 + }; 405 + 406 + waketimer: waketimer@408e80 { 407 + compatible = "brcm,brcmstb-waketimer"; 408 + reg = <0x408e80 0x14>; 409 + interrupts = <0x3>; 410 + interrupt-parent = <&aon_pm_l2_intc>; 411 + interrupt-names = "timer"; 412 + clocks = <&upg_clk>; 413 + status = "disabled"; 414 + }; 415 + }; 416 + 417 + memory_controllers { 418 + compatible = "simple-bus"; 419 + ranges = <0x0 0x103b0000 0xa000>; 420 + #address-cells = <1>; 421 + #size-cells = <1>; 422 + 423 + memory-controller@0 { 424 + compatible = "brcm,brcmstb-memc", "simple-bus"; 425 + ranges = <0x0 0x0 0xa000>; 426 + #address-cells = <1>; 427 + #size-cells = <1>; 428 + 429 + memc-arb@1000 { 430 + compatible = "brcm,brcmstb-memc-arb"; 431 + reg = <0x1000 0x248>; 432 + }; 433 + 434 + memc-ddr@2000 { 435 + compatible = "brcm,brcmstb-memc-ddr"; 436 + reg = <0x2000 0x300>; 437 + }; 438 + 439 + ddr-phy@6000 { 440 + compatible = "brcm,brcmstb-ddr-phy"; 441 + reg = <0x6000 0xc8>; 442 + }; 443 + 444 + shimphy@8000 { 445 + compatible = "brcm,brcmstb-ddr-shimphy"; 446 + reg = <0x8000 0x13c>; 447 + }; 422 448 }; 423 449 }; 424 450 };
+62
arch/mips/boot/dts/brcm/bcm7362.dtsi
··· 205 205 status = "disabled"; 206 206 }; 207 207 208 + watchdog: watchdog@4066a8 { 209 + clocks = <&upg_clk>; 210 + compatible = "brcm,bcm7038-wdt"; 211 + reg = <0x4066a8 0x14>; 212 + status = "disabled"; 213 + }; 214 + 208 215 aon_pm_l2_intc: interrupt-controller@408440 { 209 216 compatible = "brcm,l2-intc"; 210 217 reg = <0x408440 0x30>; ··· 220 213 interrupt-parent = <&periph_intc>; 221 214 interrupts = <50>; 222 215 brcm,irq-can-wake; 216 + }; 217 + 218 + aon_ctrl: syscon@408000 { 219 + compatible = "brcm,brcmstb-aon-ctrl"; 220 + reg = <0x408000 0x100>, <0x408200 0x200>; 221 + reg-names = "aon-ctrl", "aon-sram"; 222 + }; 223 + 224 + timers: timer@406680 { 225 + compatible = "brcm,brcmstb-timers"; 226 + reg = <0x406680 0x40>; 223 227 }; 224 228 225 229 upg_gio: gpio@406500 { ··· 415 397 interrupt-parent = <&upg_aon_irq0_intc>; 416 398 interrupt-names = "mspi_done"; 417 399 status = "disabled"; 400 + }; 401 + 402 + waketimer: waketimer@408e80 { 403 + compatible = "brcm,brcmstb-waketimer"; 404 + reg = <0x408e80 0x14>; 405 + interrupts = <0x3>; 406 + interrupt-parent = <&aon_pm_l2_intc>; 407 + interrupt-names = "timer"; 408 + clocks = <&upg_clk>; 409 + status = "disabled"; 410 + }; 411 + }; 412 + 413 + memory_controllers { 414 + compatible = "simple-bus"; 415 + ranges = <0x0 0x103b0000 0xa000>; 416 + #address-cells = <1>; 417 + #size-cells = <1>; 418 + 419 + memory-controller@0 { 420 + compatible = "brcm,brcmstb-memc", "simple-bus"; 421 + ranges = <0x0 0x0 0xa000>; 422 + #address-cells = <1>; 423 + #size-cells = <1>; 424 + 425 + memc-arb@1000 { 426 + compatible = "brcm,brcmstb-memc-arb"; 427 + reg = <0x1000 0x248>; 428 + }; 429 + 430 + memc-ddr@2000 { 431 + compatible = "brcm,brcmstb-memc-ddr"; 432 + reg = <0x2000 0x300>; 433 + }; 434 + 435 + ddr-phy@6000 { 436 + compatible = "brcm,brcmstb-ddr-phy"; 437 + reg = <0x6000 0xc8>; 438 + }; 439 + 440 + shimphy@8000 { 441 + compatible = "brcm,brcmstb-ddr-shimphy"; 442 + reg = <0x8000 0x13c>; 443 + }; 418 444 }; 419 445 }; 420 446 };
+7
arch/mips/boot/dts/brcm/bcm7420.dtsi
··· 214 214 status = "disabled"; 215 215 }; 216 216 217 + watchdog: watchdog@4067e8 { 218 + clocks = <&upg_clk>; 219 + compatible = "brcm,bcm7038-wdt"; 220 + reg = <0x4067e8 0x14>; 221 + status = "disabled"; 222 + }; 223 + 217 224 upg_gio: gpio@406700 { 218 225 compatible = "brcm,brcmstb-gpio"; 219 226 reg = <0x406700 0x80>;
+89
arch/mips/boot/dts/brcm/bcm7425.dtsi
··· 232 232 status = "disabled"; 233 233 }; 234 234 235 + watchdog: watchdog@4067e8 { 236 + clocks = <&upg_clk>; 237 + compatible = "brcm,bcm7038-wdt"; 238 + reg = <0x4067e8 0x14>; 239 + status = "disabled"; 240 + }; 241 + 235 242 aon_pm_l2_intc: interrupt-controller@408440 { 236 243 compatible = "brcm,l2-intc"; 237 244 reg = <0x408440 0x30>; ··· 247 240 interrupt-parent = <&periph_intc>; 248 241 interrupts = <49>; 249 242 brcm,irq-can-wake; 243 + }; 244 + 245 + aon_ctrl: syscon@408000 { 246 + compatible = "brcm,brcmstb-aon-ctrl"; 247 + reg = <0x408000 0x100>, <0x408200 0x200>; 248 + reg-names = "aon-ctrl", "aon-sram"; 249 + }; 250 + 251 + timers: timer@4067c0 { 252 + compatible = "brcm,brcmstb-timers"; 253 + reg = <0x4067c0 0x40>; 250 254 }; 251 255 252 256 upg_gio: gpio@406700 { ··· 511 493 interrupt-parent = <&upg_aon_irq0_intc>; 512 494 interrupt-names = "mspi_done"; 513 495 status = "disabled"; 496 + }; 497 + 498 + waketimer: waketimer@409580 { 499 + compatible = "brcm,brcmstb-waketimer"; 500 + reg = <0x409580 0x14>; 501 + interrupts = <0x3>; 502 + interrupt-parent = <&aon_pm_l2_intc>; 503 + interrupt-names = "timer"; 504 + clocks = <&upg_clk>; 505 + status = "disabled"; 506 + }; 507 + }; 508 + 509 + memory_controllers { 510 + compatible = "simple-bus"; 511 + ranges = <0x0 0x103b0000 0x1a000>; 512 + #address-cells = <1>; 513 + #size-cells = <1>; 514 + 515 + memory-controller@0 { 516 + compatible = "brcm,brcmstb-memc", "simple-bus"; 517 + ranges = <0x0 0x0 0xa000>; 518 + #address-cells = <1>; 519 + #size-cells = <1>; 520 + 521 + memc-arb@1000 { 522 + compatible = "brcm,brcmstb-memc-arb"; 523 + reg = <0x1000 0x248>; 524 + }; 525 + 526 + memc-ddr@2000 { 527 + compatible = "brcm,brcmstb-memc-ddr"; 528 + reg = <0x2000 0x300>; 529 + }; 530 + 531 + ddr-phy@6000 { 532 + compatible = "brcm,brcmstb-ddr-phy"; 533 + reg = <0x6000 0xc8>; 534 + }; 535 + 536 + shimphy@8000 { 537 + compatible = "brcm,brcmstb-ddr-shimphy"; 538 + reg = <0x8000 0x13c>; 539 + }; 540 + }; 541 + 542 + memory-controller@1 { 543 + compatible = "brcm,brcmstb-memc", "simple-bus"; 544 + ranges = <0x0 0x10000 0xa000>; 545 + #address-cells = <1>; 546 + #size-cells = <1>; 547 + 548 + memc-arb@1000 { 549 + compatible = "brcm,brcmstb-memc-arb"; 550 + reg = <0x1000 0x248>; 551 + }; 552 + 553 + memc-ddr@2000 { 554 + compatible = "brcm,brcmstb-memc-ddr"; 555 + reg = <0x2000 0x300>; 556 + }; 557 + 558 + ddr-phy@6000 { 559 + compatible = "brcm,brcmstb-ddr-phy"; 560 + reg = <0x6000 0xc8>; 561 + }; 562 + 563 + shimphy@8000 { 564 + compatible = "brcm,brcmstb-ddr-shimphy"; 565 + reg = <0x8000 0x13c>; 566 + }; 514 567 }; 515 568 }; 516 569 };
+89
arch/mips/boot/dts/brcm/bcm7435.dtsi
··· 247 247 status = "disabled"; 248 248 }; 249 249 250 + watchdog: watchdog@4067e8 { 251 + clocks = <&upg_clk>; 252 + compatible = "brcm,bcm7038-wdt"; 253 + reg = <0x4067e8 0x14>; 254 + status = "disabled"; 255 + }; 256 + 250 257 aon_pm_l2_intc: interrupt-controller@408440 { 251 258 compatible = "brcm,l2-intc"; 252 259 reg = <0x408440 0x30>; ··· 262 255 interrupt-parent = <&periph_intc>; 263 256 interrupts = <54>; 264 257 brcm,irq-can-wake; 258 + }; 259 + 260 + aon_ctrl: syscon@408000 { 261 + compatible = "brcm,brcmstb-aon-ctrl"; 262 + reg = <0x408000 0x100>, <0x408200 0x200>; 263 + reg-names = "aon-ctrl", "aon-sram"; 264 + }; 265 + 266 + timers: timer@4067c0 { 267 + compatible = "brcm,brcmstb-timers"; 268 + reg = <0x4067c0 0x40>; 265 269 }; 266 270 267 271 upg_gio: gpio@406700 { ··· 526 508 interrupt-parent = <&upg_aon_irq0_intc>; 527 509 interrupt-names = "mspi_done"; 528 510 status = "disabled"; 511 + }; 512 + 513 + waketimer: waketimer@409580 { 514 + compatible = "brcm,brcmstb-waketimer"; 515 + reg = <0x409580 0x14>; 516 + interrupts = <0x3>; 517 + interrupt-parent = <&aon_pm_l2_intc>; 518 + interrupt-names = "timer"; 519 + clocks = <&upg_clk>; 520 + status = "disabled"; 521 + }; 522 + }; 523 + 524 + memory_controllers { 525 + compatible = "simple-bus"; 526 + ranges = <0x0 0x103b0000 0x1a000>; 527 + #address-cells = <1>; 528 + #size-cells = <1>; 529 + 530 + memory-controller@0 { 531 + compatible = "brcm,brcmstb-memc", "simple-bus"; 532 + ranges = <0x0 0x0 0xa000>; 533 + #address-cells = <1>; 534 + #size-cells = <1>; 535 + 536 + memc-arb@1000 { 537 + compatible = "brcm,brcmstb-memc-arb"; 538 + reg = <0x1000 0x248>; 539 + }; 540 + 541 + memc-ddr@2000 { 542 + compatible = "brcm,brcmstb-memc-ddr"; 543 + reg = <0x2000 0x300>; 544 + }; 545 + 546 + ddr-phy@6000 { 547 + compatible = "brcm,brcmstb-ddr-phy"; 548 + reg = <0x6000 0xc8>; 549 + }; 550 + 551 + shimphy@8000 { 552 + compatible = "brcm,brcmstb-ddr-shimphy"; 553 + reg = <0x8000 0x13c>; 554 + }; 555 + }; 556 + 557 + memory-controller@1 { 558 + compatible = "brcm,brcmstb-memc", "simple-bus"; 559 + ranges = <0x0 0x10000 0xa000>; 560 + #address-cells = <1>; 561 + #size-cells = <1>; 562 + 563 + memc-arb@1000 { 564 + compatible = "brcm,brcmstb-memc-arb"; 565 + reg = <0x1000 0x248>; 566 + }; 567 + 568 + memc-ddr@2000 { 569 + compatible = "brcm,brcmstb-memc-ddr"; 570 + reg = <0x2000 0x300>; 571 + }; 572 + 573 + ddr-phy@6000 { 574 + compatible = "brcm,brcmstb-ddr-phy"; 575 + reg = <0x6000 0xc8>; 576 + }; 577 + 578 + shimphy@8000 { 579 + compatible = "brcm,brcmstb-ddr-shimphy"; 580 + reg = <0x8000 0x13c>; 581 + }; 529 582 }; 530 583 }; 531 584 };
+4
arch/mips/boot/dts/brcm/bcm97125cbmb.dts
··· 50 50 status = "okay"; 51 51 }; 52 52 53 + &watchdog { 54 + status = "okay"; 55 + }; 56 + 53 57 /* FIXME: USB is wonky; disable it for now */ 54 58 &ehci0 { 55 59 status = "disabled";
+8
arch/mips/boot/dts/brcm/bcm97346dbsmb.dts
··· 59 59 status = "okay"; 60 60 }; 61 61 62 + &watchdog { 63 + status = "okay"; 64 + }; 65 + 62 66 &enet0 { 63 67 status = "okay"; 64 68 }; ··· 116 112 }; 117 113 118 114 &mspi { 115 + status = "okay"; 116 + }; 117 + 118 + &waketimer { 119 119 status = "okay"; 120 120 };
+8
arch/mips/boot/dts/brcm/bcm97358svmb.dts
··· 55 55 status = "okay"; 56 56 }; 57 57 58 + &watchdog { 59 + status = "okay"; 60 + }; 61 + 58 62 &enet0 { 59 63 status = "okay"; 60 64 }; ··· 108 104 }; 109 105 110 106 &mspi { 107 + status = "okay"; 108 + }; 109 + 110 + &waketimer { 111 111 status = "okay"; 112 112 };
+8
arch/mips/boot/dts/brcm/bcm97360svmb.dts
··· 50 50 status = "okay"; 51 51 }; 52 52 53 + &watchdog { 54 + status = "okay"; 55 + }; 56 + 53 57 &enet0 { 54 58 status = "okay"; 55 59 }; ··· 111 107 }; 112 108 113 109 &mspi { 110 + status = "okay"; 111 + }; 112 + 113 + &waketimer { 114 114 status = "okay"; 115 115 };
+8
arch/mips/boot/dts/brcm/bcm97362svmb.dts
··· 47 47 status = "okay"; 48 48 }; 49 49 50 + &watchdog { 51 + status = "okay"; 52 + }; 53 + 50 54 &enet0 { 51 55 status = "okay"; 52 56 }; ··· 80 76 }; 81 77 82 78 &mspi { 79 + status = "okay"; 80 + }; 81 + 82 + &waketimer { 83 83 status = "okay"; 84 84 };
+4
arch/mips/boot/dts/brcm/bcm97420c.dts
··· 60 60 status = "okay"; 61 61 }; 62 62 63 + &watchdog { 64 + status = "okay"; 65 + }; 66 + 63 67 /* FIXME: MAC driver comes up but cannot attach to PHY */ 64 68 &enet0 { 65 69 status = "disabled";
+8
arch/mips/boot/dts/brcm/bcm97425svmb.dts
··· 61 61 status = "okay"; 62 62 }; 63 63 64 + &watchdog { 65 + status = "okay"; 66 + }; 67 + 64 68 &enet0 { 65 69 status = "okay"; 66 70 }; ··· 146 142 }; 147 143 148 144 &mspi { 145 + status = "okay"; 146 + }; 147 + 148 + &waketimer { 149 149 status = "okay"; 150 150 };
+8
arch/mips/boot/dts/brcm/bcm97435svmb.dts
··· 61 61 status = "okay"; 62 62 }; 63 63 64 + &watchdog { 65 + status = "okay"; 66 + }; 67 + 64 68 &enet0 { 65 69 status = "okay"; 66 70 }; ··· 122 118 }; 123 119 124 120 &mspi { 121 + status = "okay"; 122 + }; 123 + 124 + &waketimer { 125 125 status = "okay"; 126 126 };
+1 -1
arch/mips/boot/dts/img/boston.dts
··· 157 157 #address-cells = <1>; 158 158 #size-cells = <0>; 159 159 160 - rtc@0x68 { 160 + rtc@68 { 161 161 compatible = "st,m41t81s"; 162 162 reg = <0x68>; 163 163 };
+4 -4
arch/mips/boot/dts/ingenic/ci20.dts
··· 110 110 reg = <0x0 0x0 0x0 0x800000>; 111 111 }; 112 112 113 - partition@0x800000 { 113 + partition@800000 { 114 114 label = "u-boot"; 115 115 reg = <0x0 0x800000 0x0 0x200000>; 116 116 }; 117 117 118 - partition@0xa00000 { 118 + partition@a00000 { 119 119 label = "u-boot-env"; 120 120 reg = <0x0 0xa00000 0x0 0x200000>; 121 121 }; 122 122 123 - partition@0xc00000 { 123 + partition@c00000 { 124 124 label = "boot"; 125 125 reg = <0x0 0xc00000 0x0 0x4000000>; 126 126 }; 127 127 128 - partition@0x8c00000 { 128 + partition@4c00000 { 129 129 label = "system"; 130 130 reg = <0x0 0x4c00000 0x1 0xfb400000>; 131 131 };
+3
arch/mips/boot/dts/mscc/Makefile
··· 1 + dtb-$(CONFIG_LEGACY_BOARD_OCELOT) += ocelot_pcb123.dtb 2 + 3 + obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+117
arch/mips/boot/dts/mscc/ocelot.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0 OR MIT) 2 + /* Copyright (c) 2017 Microsemi Corporation */ 3 + 4 + / { 5 + #address-cells = <1>; 6 + #size-cells = <1>; 7 + compatible = "mscc,ocelot"; 8 + 9 + cpus { 10 + #address-cells = <1>; 11 + #size-cells = <0>; 12 + 13 + cpu@0 { 14 + compatible = "mips,mips24KEc"; 15 + device_type = "cpu"; 16 + clocks = <&cpu_clk>; 17 + reg = <0>; 18 + }; 19 + }; 20 + 21 + aliases { 22 + serial0 = &uart0; 23 + }; 24 + 25 + cpuintc: interrupt-controller { 26 + #address-cells = <0>; 27 + #interrupt-cells = <1>; 28 + interrupt-controller; 29 + compatible = "mti,cpu-interrupt-controller"; 30 + }; 31 + 32 + cpu_clk: cpu-clock { 33 + compatible = "fixed-clock"; 34 + #clock-cells = <0>; 35 + clock-frequency = <500000000>; 36 + }; 37 + 38 + ahb_clk: ahb-clk { 39 + compatible = "fixed-factor-clock"; 40 + #clock-cells = <0>; 41 + clocks = <&cpu_clk>; 42 + clock-div = <2>; 43 + clock-mult = <1>; 44 + }; 45 + 46 + ahb@70000000 { 47 + compatible = "simple-bus"; 48 + #address-cells = <1>; 49 + #size-cells = <1>; 50 + ranges = <0 0x70000000 0x2000000>; 51 + 52 + interrupt-parent = <&intc>; 53 + 54 + cpu_ctrl: syscon@0 { 55 + compatible = "mscc,ocelot-cpu-syscon", "syscon"; 56 + reg = <0x0 0x2c>; 57 + }; 58 + 59 + intc: interrupt-controller@70 { 60 + compatible = "mscc,ocelot-icpu-intr"; 61 + reg = <0x70 0x70>; 62 + #interrupt-cells = <1>; 63 + interrupt-controller; 64 + interrupt-parent = <&cpuintc>; 65 + interrupts = <2>; 66 + }; 67 + 68 + uart0: serial@100000 { 69 + pinctrl-0 = <&uart_pins>; 70 + pinctrl-names = "default"; 71 + compatible = "ns16550a"; 72 + reg = <0x100000 0x20>; 73 + interrupts = <6>; 74 + clocks = <&ahb_clk>; 75 + reg-io-width = <4>; 76 + reg-shift = <2>; 77 + 78 + status = "disabled"; 79 + }; 80 + 81 + uart2: serial@100800 { 82 + pinctrl-0 = <&uart2_pins>; 83 + pinctrl-names = "default"; 84 + compatible = "ns16550a"; 85 + reg = <0x100800 0x20>; 86 + interrupts = <7>; 87 + clocks = <&ahb_clk>; 88 + reg-io-width = <4>; 89 + reg-shift = <2>; 90 + 91 + status = "disabled"; 92 + }; 93 + 94 + reset@1070008 { 95 + compatible = "mscc,ocelot-chip-reset"; 96 + reg = <0x1070008 0x4>; 97 + }; 98 + 99 + gpio: pinctrl@1070034 { 100 + compatible = "mscc,ocelot-pinctrl"; 101 + reg = <0x1070034 0x68>; 102 + gpio-controller; 103 + #gpio-cells = <2>; 104 + gpio-ranges = <&gpio 0 0 22>; 105 + 106 + uart_pins: uart-pins { 107 + pins = "GPIO_6", "GPIO_7"; 108 + function = "uart"; 109 + }; 110 + 111 + uart2_pins: uart2-pins { 112 + pins = "GPIO_12", "GPIO_13"; 113 + function = "uart2"; 114 + }; 115 + }; 116 + }; 117 + };
+27
arch/mips/boot/dts/mscc/ocelot_pcb123.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0 OR MIT) 2 + /* Copyright (c) 2017 Microsemi Corporation */ 3 + 4 + /dts-v1/; 5 + 6 + #include "ocelot.dtsi" 7 + 8 + / { 9 + compatible = "mscc,ocelot-pcb123", "mscc,ocelot"; 10 + 11 + chosen { 12 + stdout-path = "serial0:115200n8"; 13 + }; 14 + 15 + memory@0 { 16 + device_type = "memory"; 17 + reg = <0x0 0x0e000000>; 18 + }; 19 + }; 20 + 21 + &uart0 { 22 + status = "okay"; 23 + }; 24 + 25 + &uart2 { 26 + status = "okay"; 27 + };
+5 -5
arch/mips/cavium-octeon/octeon-irq.c
··· 2271 2271 2272 2272 parent_irq = irq_of_parse_and_map(ciu_node, 0); 2273 2273 if (!parent_irq) { 2274 - pr_err("ERROR: Couldn't acquire parent_irq for %s\n.", 2274 + pr_err("ERROR: Couldn't acquire parent_irq for %s\n", 2275 2275 ciu_node->name); 2276 2276 return -EINVAL; 2277 2277 } ··· 2283 2283 2284 2284 addr = of_get_address(ciu_node, 0, NULL, NULL); 2285 2285 if (!addr) { 2286 - pr_err("ERROR: Couldn't acquire reg(0) %s\n.", ciu_node->name); 2286 + pr_err("ERROR: Couldn't acquire reg(0) %s\n", ciu_node->name); 2287 2287 return -EINVAL; 2288 2288 } 2289 2289 host_data->raw_reg = (u64)phys_to_virt( ··· 2291 2291 2292 2292 addr = of_get_address(ciu_node, 1, NULL, NULL); 2293 2293 if (!addr) { 2294 - pr_err("ERROR: Couldn't acquire reg(1) %s\n.", ciu_node->name); 2294 + pr_err("ERROR: Couldn't acquire reg(1) %s\n", ciu_node->name); 2295 2295 return -EINVAL; 2296 2296 } 2297 2297 host_data->en_reg = (u64)phys_to_virt( ··· 2299 2299 2300 2300 r = of_property_read_u32(ciu_node, "cavium,max-bits", &val); 2301 2301 if (r) { 2302 - pr_err("ERROR: Couldn't read cavium,max-bits from %s\n.", 2302 + pr_err("ERROR: Couldn't read cavium,max-bits from %s\n", 2303 2303 ciu_node->name); 2304 2304 return r; 2305 2305 } ··· 2309 2309 &octeon_irq_domain_cib_ops, 2310 2310 host_data); 2311 2311 if (!cib_domain) { 2312 - pr_err("ERROR: Couldn't irq_domain_add_linear()\n."); 2312 + pr_err("ERROR: Couldn't irq_domain_add_linear()\n"); 2313 2313 return -ENOMEM; 2314 2314 } 2315 2315
+1
arch/mips/configs/bmips_stb_defconfig
··· 72 72 CONFIG_USB_OHCI_HCD=y 73 73 CONFIG_USB_OHCI_HCD_PLATFORM=y 74 74 CONFIG_USB_STORAGE=y 75 + CONFIG_SOC_BRCMSTB=y 75 76 CONFIG_EXT4_FS=y 76 77 CONFIG_EXT4_FS_POSIX_ACL=y 77 78 CONFIG_EXT4_FS_SECURITY=y
+2
arch/mips/configs/generic/32r6.config
··· 1 1 CONFIG_CPU_MIPS32_R6=y 2 2 CONFIG_HIGHMEM=y 3 + 4 + CONFIG_CRYPTO_CRC32_MIPS=y
+2
arch/mips/configs/generic/64r6.config
··· 2 2 CONFIG_64BIT=y 3 3 CONFIG_MIPS32_O32=y 4 4 CONFIG_MIPS32_N32=y 5 + 6 + CONFIG_CRYPTO_CRC32_MIPS=y
+35
arch/mips/configs/generic/board-ocelot.config
··· 1 + # require CONFIG_CPU_MIPS32_R2=y 2 + 3 + CONFIG_LEGACY_BOARD_OCELOT=y 4 + 5 + CONFIG_MTD=y 6 + CONFIG_MTD_CMDLINE_PARTS=y 7 + CONFIG_MTD_BLOCK=y 8 + CONFIG_MTD_M25P80=y 9 + CONFIG_MTD_NAND=y 10 + CONFIG_MTD_NAND_PLATFORM=y 11 + CONFIG_MTD_SPI_NOR=y 12 + CONFIG_MTD_UBI=y 13 + 14 + CONFIG_BLK_DEV_LOOP=y 15 + CONFIG_BLK_DEV_RAM=y 16 + 17 + CONFIG_SERIAL_8250=y 18 + CONFIG_SERIAL_8250_CONSOLE=y 19 + CONFIG_SERIAL_OF_PLATFORM=y 20 + 21 + CONFIG_GPIO_SYSFS=y 22 + 23 + CONFIG_I2C=y 24 + CONFIG_I2C_CHARDEV=y 25 + CONFIG_I2C_MUX=y 26 + 27 + CONFIG_SPI=y 28 + CONFIG_SPI_BITBANG=y 29 + CONFIG_SPI_DESIGNWARE=y 30 + CONFIG_SPI_SPIDEV=y 31 + 32 + CONFIG_POWER_RESET=y 33 + CONFIG_POWER_RESET_OCELOT_RESET=y 34 + 35 + CONFIG_MAGIC_SYSRQ=y
+6
arch/mips/crypto/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + # 3 + # Makefile for MIPS crypto files.. 4 + # 5 + 6 + obj-$(CONFIG_CRYPTO_CRC32_MIPS) += crc32-mips.o
+348
arch/mips/crypto/crc32-mips.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * crc32-mips.c - CRC32 and CRC32C using optional MIPSr6 instructions 4 + * 5 + * Module based on arm64/crypto/crc32-arm.c 6 + * 7 + * Copyright (C) 2014 Linaro Ltd <yazen.ghannam@linaro.org> 8 + * Copyright (C) 2018 MIPS Tech, LLC 9 + */ 10 + 11 + #include <linux/unaligned/access_ok.h> 12 + #include <linux/cpufeature.h> 13 + #include <linux/init.h> 14 + #include <linux/kernel.h> 15 + #include <linux/module.h> 16 + #include <linux/string.h> 17 + #include <asm/mipsregs.h> 18 + 19 + #include <crypto/internal/hash.h> 20 + 21 + enum crc_op_size { 22 + b, h, w, d, 23 + }; 24 + 25 + enum crc_type { 26 + crc32, 27 + crc32c, 28 + }; 29 + 30 + #ifndef TOOLCHAIN_SUPPORTS_CRC 31 + #define _ASM_MACRO_CRC32(OP, SZ, TYPE) \ 32 + _ASM_MACRO_3R(OP, rt, rs, rt2, \ 33 + ".ifnc \\rt, \\rt2\n\t" \ 34 + ".error \"invalid operands \\\"" #OP " \\rt,\\rs,\\rt2\\\"\"\n\t" \ 35 + ".endif\n\t" \ 36 + _ASM_INSN_IF_MIPS(0x7c00000f | (__rt << 16) | (__rs << 21) | \ 37 + ((SZ) << 6) | ((TYPE) << 8)) \ 38 + _ASM_INSN32_IF_MM(0x00000030 | (__rs << 16) | (__rt << 21) | \ 39 + ((SZ) << 14) | ((TYPE) << 3))) 40 + _ASM_MACRO_CRC32(crc32b, 0, 0); 41 + _ASM_MACRO_CRC32(crc32h, 1, 0); 42 + _ASM_MACRO_CRC32(crc32w, 2, 0); 43 + _ASM_MACRO_CRC32(crc32d, 3, 0); 44 + _ASM_MACRO_CRC32(crc32cb, 0, 1); 45 + _ASM_MACRO_CRC32(crc32ch, 1, 1); 46 + _ASM_MACRO_CRC32(crc32cw, 2, 1); 47 + _ASM_MACRO_CRC32(crc32cd, 3, 1); 48 + #define _ASM_SET_CRC "" 49 + #else /* !TOOLCHAIN_SUPPORTS_CRC */ 50 + #define _ASM_SET_CRC ".set\tcrc\n\t" 51 + #endif 52 + 53 + #define _CRC32(crc, value, size, type) \ 54 + do { \ 55 + __asm__ __volatile__( \ 56 + ".set push\n\t" \ 57 + _ASM_SET_CRC \ 58 + #type #size " %0, %1, %0\n\t" \ 59 + ".set pop" \ 60 + : "+r" (crc) \ 61 + : "r" (value)); \ 62 + } while (0) 63 + 64 + #define CRC32(crc, value, size) \ 65 + _CRC32(crc, value, size, crc32) 66 + 67 + #define CRC32C(crc, value, size) \ 68 + _CRC32(crc, value, size, crc32c) 69 + 70 + static u32 crc32_mips_le_hw(u32 crc_, const u8 *p, unsigned int len) 71 + { 72 + u32 crc = crc_; 73 + 74 + #ifdef CONFIG_64BIT 75 + while (len >= sizeof(u64)) { 76 + u64 value = get_unaligned_le64(p); 77 + 78 + CRC32(crc, value, d); 79 + p += sizeof(u64); 80 + len -= sizeof(u64); 81 + } 82 + 83 + if (len & sizeof(u32)) { 84 + #else /* !CONFIG_64BIT */ 85 + while (len >= sizeof(u32)) { 86 + #endif 87 + u32 value = get_unaligned_le32(p); 88 + 89 + CRC32(crc, value, w); 90 + p += sizeof(u32); 91 + len -= sizeof(u32); 92 + } 93 + 94 + if (len & sizeof(u16)) { 95 + u16 value = get_unaligned_le16(p); 96 + 97 + CRC32(crc, value, h); 98 + p += sizeof(u16); 99 + } 100 + 101 + if (len & sizeof(u8)) { 102 + u8 value = *p++; 103 + 104 + CRC32(crc, value, b); 105 + } 106 + 107 + return crc; 108 + } 109 + 110 + static u32 crc32c_mips_le_hw(u32 crc_, const u8 *p, unsigned int len) 111 + { 112 + u32 crc = crc_; 113 + 114 + #ifdef CONFIG_64BIT 115 + while (len >= sizeof(u64)) { 116 + u64 value = get_unaligned_le64(p); 117 + 118 + CRC32C(crc, value, d); 119 + p += sizeof(u64); 120 + len -= sizeof(u64); 121 + } 122 + 123 + if (len & sizeof(u32)) { 124 + #else /* !CONFIG_64BIT */ 125 + while (len >= sizeof(u32)) { 126 + #endif 127 + u32 value = get_unaligned_le32(p); 128 + 129 + CRC32C(crc, value, w); 130 + p += sizeof(u32); 131 + len -= sizeof(u32); 132 + } 133 + 134 + if (len & sizeof(u16)) { 135 + u16 value = get_unaligned_le16(p); 136 + 137 + CRC32C(crc, value, h); 138 + p += sizeof(u16); 139 + } 140 + 141 + if (len & sizeof(u8)) { 142 + u8 value = *p++; 143 + 144 + CRC32C(crc, value, b); 145 + } 146 + return crc; 147 + } 148 + 149 + #define CHKSUM_BLOCK_SIZE 1 150 + #define CHKSUM_DIGEST_SIZE 4 151 + 152 + struct chksum_ctx { 153 + u32 key; 154 + }; 155 + 156 + struct chksum_desc_ctx { 157 + u32 crc; 158 + }; 159 + 160 + static int chksum_init(struct shash_desc *desc) 161 + { 162 + struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); 163 + struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); 164 + 165 + ctx->crc = mctx->key; 166 + 167 + return 0; 168 + } 169 + 170 + /* 171 + * Setting the seed allows arbitrary accumulators and flexible XOR policy 172 + * If your algorithm starts with ~0, then XOR with ~0 before you set 173 + * the seed. 174 + */ 175 + static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, 176 + unsigned int keylen) 177 + { 178 + struct chksum_ctx *mctx = crypto_shash_ctx(tfm); 179 + 180 + if (keylen != sizeof(mctx->key)) { 181 + crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); 182 + return -EINVAL; 183 + } 184 + mctx->key = get_unaligned_le32(key); 185 + return 0; 186 + } 187 + 188 + static int chksum_update(struct shash_desc *desc, const u8 *data, 189 + unsigned int length) 190 + { 191 + struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); 192 + 193 + ctx->crc = crc32_mips_le_hw(ctx->crc, data, length); 194 + return 0; 195 + } 196 + 197 + static int chksumc_update(struct shash_desc *desc, const u8 *data, 198 + unsigned int length) 199 + { 200 + struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); 201 + 202 + ctx->crc = crc32c_mips_le_hw(ctx->crc, data, length); 203 + return 0; 204 + } 205 + 206 + static int chksum_final(struct shash_desc *desc, u8 *out) 207 + { 208 + struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); 209 + 210 + put_unaligned_le32(ctx->crc, out); 211 + return 0; 212 + } 213 + 214 + static int chksumc_final(struct shash_desc *desc, u8 *out) 215 + { 216 + struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); 217 + 218 + put_unaligned_le32(~ctx->crc, out); 219 + return 0; 220 + } 221 + 222 + static int __chksum_finup(u32 crc, const u8 *data, unsigned int len, u8 *out) 223 + { 224 + put_unaligned_le32(crc32_mips_le_hw(crc, data, len), out); 225 + return 0; 226 + } 227 + 228 + static int __chksumc_finup(u32 crc, const u8 *data, unsigned int len, u8 *out) 229 + { 230 + put_unaligned_le32(~crc32c_mips_le_hw(crc, data, len), out); 231 + return 0; 232 + } 233 + 234 + static int chksum_finup(struct shash_desc *desc, const u8 *data, 235 + unsigned int len, u8 *out) 236 + { 237 + struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); 238 + 239 + return __chksum_finup(ctx->crc, data, len, out); 240 + } 241 + 242 + static int chksumc_finup(struct shash_desc *desc, const u8 *data, 243 + unsigned int len, u8 *out) 244 + { 245 + struct chksum_desc_ctx *ctx = shash_desc_ctx(desc); 246 + 247 + return __chksumc_finup(ctx->crc, data, len, out); 248 + } 249 + 250 + static int chksum_digest(struct shash_desc *desc, const u8 *data, 251 + unsigned int length, u8 *out) 252 + { 253 + struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); 254 + 255 + return __chksum_finup(mctx->key, data, length, out); 256 + } 257 + 258 + static int chksumc_digest(struct shash_desc *desc, const u8 *data, 259 + unsigned int length, u8 *out) 260 + { 261 + struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); 262 + 263 + return __chksumc_finup(mctx->key, data, length, out); 264 + } 265 + 266 + static int chksum_cra_init(struct crypto_tfm *tfm) 267 + { 268 + struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); 269 + 270 + mctx->key = ~0; 271 + return 0; 272 + } 273 + 274 + static struct shash_alg crc32_alg = { 275 + .digestsize = CHKSUM_DIGEST_SIZE, 276 + .setkey = chksum_setkey, 277 + .init = chksum_init, 278 + .update = chksum_update, 279 + .final = chksum_final, 280 + .finup = chksum_finup, 281 + .digest = chksum_digest, 282 + .descsize = sizeof(struct chksum_desc_ctx), 283 + .base = { 284 + .cra_name = "crc32", 285 + .cra_driver_name = "crc32-mips-hw", 286 + .cra_priority = 300, 287 + .cra_flags = CRYPTO_ALG_OPTIONAL_KEY, 288 + .cra_blocksize = CHKSUM_BLOCK_SIZE, 289 + .cra_alignmask = 0, 290 + .cra_ctxsize = sizeof(struct chksum_ctx), 291 + .cra_module = THIS_MODULE, 292 + .cra_init = chksum_cra_init, 293 + } 294 + }; 295 + 296 + static struct shash_alg crc32c_alg = { 297 + .digestsize = CHKSUM_DIGEST_SIZE, 298 + .setkey = chksum_setkey, 299 + .init = chksum_init, 300 + .update = chksumc_update, 301 + .final = chksumc_final, 302 + .finup = chksumc_finup, 303 + .digest = chksumc_digest, 304 + .descsize = sizeof(struct chksum_desc_ctx), 305 + .base = { 306 + .cra_name = "crc32c", 307 + .cra_driver_name = "crc32c-mips-hw", 308 + .cra_priority = 300, 309 + .cra_flags = CRYPTO_ALG_OPTIONAL_KEY, 310 + .cra_blocksize = CHKSUM_BLOCK_SIZE, 311 + .cra_alignmask = 0, 312 + .cra_ctxsize = sizeof(struct chksum_ctx), 313 + .cra_module = THIS_MODULE, 314 + .cra_init = chksum_cra_init, 315 + } 316 + }; 317 + 318 + static int __init crc32_mod_init(void) 319 + { 320 + int err; 321 + 322 + err = crypto_register_shash(&crc32_alg); 323 + 324 + if (err) 325 + return err; 326 + 327 + err = crypto_register_shash(&crc32c_alg); 328 + 329 + if (err) { 330 + crypto_unregister_shash(&crc32_alg); 331 + return err; 332 + } 333 + 334 + return 0; 335 + } 336 + 337 + static void __exit crc32_mod_exit(void) 338 + { 339 + crypto_unregister_shash(&crc32_alg); 340 + crypto_unregister_shash(&crc32c_alg); 341 + } 342 + 343 + MODULE_AUTHOR("Marcin Nowakowski <marcin.nowakowski@mips.com"); 344 + MODULE_DESCRIPTION("CRC32 and CRC32C using optional MIPS instructions"); 345 + MODULE_LICENSE("GPL v2"); 346 + 347 + module_cpu_feature_match(MIPS_CRC32, crc32_mod_init); 348 + module_exit(crc32_mod_exit);
+16
arch/mips/generic/Kconfig
··· 27 27 Enable this to include support for booting on MIPS SEAD-3 FPGA-based 28 28 development boards, which boot using a legacy boot protocol. 29 29 30 + comment "MSCC Ocelot doesn't work with SEAD3 enabled" 31 + depends on LEGACY_BOARD_SEAD3 32 + 33 + config LEGACY_BOARD_OCELOT 34 + bool "Support MSCC Ocelot boards" 35 + depends on LEGACY_BOARD_SEAD3=n 36 + select LEGACY_BOARDS 37 + select MSCC_OCELOT 38 + 39 + config MSCC_OCELOT 40 + bool 41 + select GPIOLIB 42 + select MSCC_OCELOT_IRQ 43 + select SYS_HAS_EARLY_PRINTK 44 + select USE_GENERIC_EARLY_PRINTK_8250 45 + 30 46 comment "FIT/UHI Boards" 31 47 32 48 config FIT_IMAGE_FDT_BOSTON
+1
arch/mips/generic/Makefile
··· 14 14 15 15 obj-$(CONFIG_YAMON_DT_SHIM) += yamon-dt.o 16 16 obj-$(CONFIG_LEGACY_BOARD_SEAD3) += board-sead3.o 17 + obj-$(CONFIG_LEGACY_BOARD_OCELOT) += board-ocelot.o 17 18 obj-$(CONFIG_KEXEC) += kexec.o 18 19 obj-$(CONFIG_VIRT_BOARD_RANCHU) += board-ranchu.o
+78
arch/mips/generic/board-ocelot.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0 OR MIT) 2 + /* 3 + * Microsemi MIPS SoC support 4 + * 5 + * Copyright (c) 2017 Microsemi Corporation 6 + */ 7 + #include <asm/machine.h> 8 + #include <asm/prom.h> 9 + 10 + #define DEVCPU_GCB_CHIP_REGS_CHIP_ID 0x71070000 11 + #define CHIP_ID_PART_ID GENMASK(27, 12) 12 + 13 + #define OCELOT_PART_ID (0x7514 << 12) 14 + 15 + #define UART_UART 0x70100000 16 + 17 + static __init bool ocelot_detect(void) 18 + { 19 + u32 rev; 20 + int idx; 21 + 22 + /* Look for the TLB entry set up by redboot before trying to use it */ 23 + write_c0_entryhi(DEVCPU_GCB_CHIP_REGS_CHIP_ID); 24 + mtc0_tlbw_hazard(); 25 + tlb_probe(); 26 + tlb_probe_hazard(); 27 + idx = read_c0_index(); 28 + if (idx < 0) 29 + return 0; 30 + 31 + /* A TLB entry exists, lets assume its usable and check the CHIP ID */ 32 + rev = __raw_readl((void __iomem *)DEVCPU_GCB_CHIP_REGS_CHIP_ID); 33 + 34 + if ((rev & CHIP_ID_PART_ID) != OCELOT_PART_ID) 35 + return 0; 36 + 37 + /* Copy command line from bootloader early for Initrd detection */ 38 + if (fw_arg0 < 10 && (fw_arg1 & 0xFFF00000) == 0x80000000) { 39 + unsigned int prom_argc = fw_arg0; 40 + const char **prom_argv = (const char **)fw_arg1; 41 + 42 + if (prom_argc > 1 && strlen(prom_argv[1]) > 0) 43 + /* ignore all built-in args if any f/w args given */ 44 + strcpy(arcs_cmdline, prom_argv[1]); 45 + } 46 + 47 + return 1; 48 + } 49 + 50 + static void __init ocelot_earlyprintk_init(void) 51 + { 52 + void __iomem *uart_base; 53 + 54 + uart_base = ioremap_nocache(UART_UART, 0x20); 55 + setup_8250_early_printk_port((unsigned long)uart_base, 2, 50000); 56 + } 57 + 58 + static void __init ocelot_late_init(void) 59 + { 60 + ocelot_earlyprintk_init(); 61 + } 62 + 63 + static __init const void *ocelot_fixup_fdt(const void *fdt, 64 + const void *match_data) 65 + { 66 + /* This has to be done so late because ioremap needs to work */ 67 + late_time_init = ocelot_late_init; 68 + 69 + return fdt; 70 + } 71 + 72 + extern char __dtb_ocelot_pcb123_begin[]; 73 + 74 + MIPS_MACHINE(ocelot) = { 75 + .fdt = __dtb_ocelot_pcb123_begin, 76 + .fixup_fdt = ocelot_fixup_fdt, 77 + .detect = ocelot_detect, 78 + };
+3 -2
arch/mips/include/asm/cpu-features.h
··· 11 11 12 12 #include <asm/cpu.h> 13 13 #include <asm/cpu-info.h> 14 + #include <asm/isa-rev.h> 14 15 #include <cpu-feature-overrides.h> 15 16 16 17 /* ··· 494 493 # define cpu_has_perf (cpu_data[0].options & MIPS_CPU_PERF) 495 494 #endif 496 495 497 - #if defined(CONFIG_SMP) && defined(__mips_isa_rev) && (__mips_isa_rev >= 6) 496 + #if defined(CONFIG_SMP) && (MIPS_ISA_REV >= 6) 498 497 /* 499 498 * Some systems share FTLB RAMs between threads within a core (siblings in 500 499 * kernel parlance). This means that FTLB entries may become invalid at almost ··· 526 525 # define cpu_has_shared_ftlb_entries \ 527 526 (current_cpu_data.options & MIPS_CPU_SHARED_FTLB_ENTRIES) 528 527 # endif 529 - #endif /* SMP && __mips_isa_rev >= 6 */ 528 + #endif /* SMP && MIPS_ISA_REV >= 6 */ 530 529 531 530 #ifndef cpu_has_shared_ftlb_ram 532 531 # define cpu_has_shared_ftlb_ram 0
+24
arch/mips/include/asm/isa-rev.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright (C) 2018 MIPS Tech, LLC 4 + * Author: Matt Redfearn <matt.redfearn@mips.com> 5 + */ 6 + 7 + #ifndef __MIPS_ASM_ISA_REV_H__ 8 + #define __MIPS_ASM_ISA_REV_H__ 9 + 10 + /* 11 + * The ISA revision level. This is 0 for MIPS I to V and N for 12 + * MIPS{32,64}rN. 13 + */ 14 + 15 + /* If the compiler has defined __mips_isa_rev, believe it. */ 16 + #ifdef __mips_isa_rev 17 + #define MIPS_ISA_REV __mips_isa_rev 18 + #else 19 + /* The compiler hasn't defined the isa rev so assume it's MIPS I - V (0) */ 20 + #define MIPS_ISA_REV 0 21 + #endif 22 + 23 + 24 + #endif /* __MIPS_ASM_ISA_REV_H__ */
+1 -1
arch/mips/include/asm/mach-ath79/ar71xx_regs.h
··· 167 167 #define AR71XX_AHB_DIV_MASK 0x7 168 168 169 169 #define AR724X_PLL_REG_CPU_CONFIG 0x00 170 - #define AR724X_PLL_REG_PCIE_CONFIG 0x18 170 + #define AR724X_PLL_REG_PCIE_CONFIG 0x10 171 171 172 172 #define AR724X_PLL_FB_SHIFT 0 173 173 #define AR724X_PLL_FB_MASK 0x3ff
+1
arch/mips/include/asm/mipsregs.h
··· 664 664 #define MIPS_CONF5_FRE (_ULCAST_(1) << 8) 665 665 #define MIPS_CONF5_UFE (_ULCAST_(1) << 9) 666 666 #define MIPS_CONF5_CA2 (_ULCAST_(1) << 14) 667 + #define MIPS_CONF5_CRCP (_ULCAST_(1) << 18) 667 668 #define MIPS_CONF5_MSAEN (_ULCAST_(1) << 27) 668 669 #define MIPS_CONF5_EVA (_ULCAST_(1) << 28) 669 670 #define MIPS_CONF5_CV (_ULCAST_(1) << 29)
+1
arch/mips/include/uapi/asm/hwcap.h
··· 5 5 /* HWCAP flags */ 6 6 #define HWCAP_MIPS_R6 (1 << 0) 7 7 #define HWCAP_MIPS_MSA (1 << 1) 8 + #define HWCAP_MIPS_CRC32 (1 << 2) 8 9 9 10 #endif /* _UAPI_ASM_HWCAP_H */
+3
arch/mips/kernel/cpu-probe.c
··· 848 848 if (config5 & MIPS_CONF5_CA2) 849 849 c->ases |= MIPS_ASE_MIPS16E2; 850 850 851 + if (config5 & MIPS_CONF5_CRCP) 852 + elf_hwcap |= HWCAP_MIPS_CRC32; 853 + 851 854 return config5 & MIPS_CONF_M; 852 855 } 853 856
+31
arch/mips/kernel/pm-cps.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/percpu.h> 14 14 #include <linux/slab.h> 15 + #include <linux/suspend.h> 15 16 16 17 #include <asm/asm-offsets.h> 17 18 #include <asm/cacheflush.h> ··· 671 670 return 0; 672 671 } 673 672 673 + static int cps_pm_power_notifier(struct notifier_block *this, 674 + unsigned long event, void *ptr) 675 + { 676 + unsigned int stat; 677 + 678 + switch (event) { 679 + case PM_SUSPEND_PREPARE: 680 + stat = read_cpc_cl_stat_conf(); 681 + /* 682 + * If we're attempting to suspend the system and power down all 683 + * of the cores, the JTAG detect bit indicates that the CPC will 684 + * instead put the cores into clock-off state. In this state 685 + * a connected debugger can cause the CPU to attempt 686 + * interactions with the powered down system. At best this will 687 + * fail. At worst, it can hang the NoC, requiring a hard reset. 688 + * To avoid this, just block system suspend if a JTAG probe 689 + * is detected. 690 + */ 691 + if (stat & CPC_Cx_STAT_CONF_EJTAG_PROBE) { 692 + pr_warn("JTAG probe is connected - abort suspend\n"); 693 + return NOTIFY_BAD; 694 + } 695 + return NOTIFY_DONE; 696 + default: 697 + return NOTIFY_DONE; 698 + } 699 + } 700 + 674 701 static int __init cps_pm_init(void) 675 702 { 676 703 /* A CM is required for all non-coherent states */ ··· 733 704 } else { 734 705 pr_warn("pm-cps: no CPC, clock & power gating unavailable\n"); 735 706 } 707 + 708 + pm_notifier(cps_pm_power_notifier, 0); 736 709 737 710 return cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "mips/cps_pm:online", 738 711 cps_pm_online_cpu, NULL);
+62 -6
arch/mips/kernel/reset.c
··· 13 13 #include <linux/reboot.h> 14 14 #include <linux/delay.h> 15 15 16 + #include <asm/compiler.h> 17 + #include <asm/idle.h> 18 + #include <asm/mipsregs.h> 16 19 #include <asm/reboot.h> 17 20 18 21 /* ··· 29 26 30 27 EXPORT_SYMBOL(pm_power_off); 31 28 29 + static void machine_hang(void) 30 + { 31 + /* 32 + * We're hanging the system so we don't want to be interrupted anymore. 33 + * Any interrupt handlers that ran would at best be useless & at worst 34 + * go awry because the system isn't in a functional state. 35 + */ 36 + local_irq_disable(); 37 + 38 + /* 39 + * Mask all interrupts, giving us a better chance of remaining in the 40 + * low power wait state. 41 + */ 42 + clear_c0_status(ST0_IM); 43 + 44 + while (true) { 45 + if (cpu_has_mips_r) { 46 + /* 47 + * We know that the wait instruction is supported so 48 + * make use of it directly, leaving interrupts 49 + * disabled. 50 + */ 51 + asm volatile( 52 + ".set push\n\t" 53 + ".set " MIPS_ISA_ARCH_LEVEL "\n\t" 54 + "wait\n\t" 55 + ".set pop"); 56 + } else if (cpu_wait) { 57 + /* 58 + * Try the cpu_wait() callback. This isn't ideal since 59 + * it'll re-enable interrupts, but that ought to be 60 + * harmless given that they're all masked. 61 + */ 62 + cpu_wait(); 63 + local_irq_disable(); 64 + } else { 65 + /* 66 + * We're going to burn some power running round the 67 + * loop, but we don't really have a choice. This isn't 68 + * a path we should expect to run for long during 69 + * typical use anyway. 70 + */ 71 + } 72 + 73 + /* 74 + * In most modern MIPS CPUs interrupts will cause the wait 75 + * instruction to graduate even when disabled, and in some 76 + * cases even when masked. In order to prevent a timer 77 + * interrupt from continuously taking us out of the low power 78 + * wait state, we clear any pending timer interrupt here. 79 + */ 80 + if (cpu_has_counter) 81 + write_c0_compare(0); 82 + } 83 + } 84 + 32 85 void machine_restart(char *command) 33 86 { 34 87 if (_machine_restart) ··· 97 38 do_kernel_restart(command); 98 39 mdelay(1000); 99 40 pr_emerg("Reboot failed -- System halted\n"); 100 - local_irq_disable(); 101 - while (1); 41 + machine_hang(); 102 42 } 103 43 104 44 void machine_halt(void) ··· 109 51 preempt_disable(); 110 52 smp_send_stop(); 111 53 #endif 112 - local_irq_disable(); 113 - while (1); 54 + machine_hang(); 114 55 } 115 56 116 57 void machine_power_off(void) ··· 121 64 preempt_disable(); 122 65 smp_send_stop(); 123 66 #endif 124 - local_irq_disable(); 125 - while (1); 67 + machine_hang(); 126 68 }
+3 -2
arch/mips/kernel/setup.c
··· 155 155 add_memory_region(start, size, BOOT_MEM_RAM); 156 156 } 157 157 158 - bool __init memory_region_available(phys_addr_t start, phys_addr_t size) 158 + static bool __init __maybe_unused memory_region_available(phys_addr_t start, 159 + phys_addr_t size) 159 160 { 160 161 int i; 161 162 bool in_ram = false, free = true; ··· 454 453 pr_info("Wasting %lu bytes for tracking %lu unused pages\n", 455 454 (min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page), 456 455 min_low_pfn - ARCH_PFN_OFFSET); 457 - } else if (min_low_pfn < ARCH_PFN_OFFSET) { 456 + } else if (ARCH_PFN_OFFSET - min_low_pfn > 0UL) { 458 457 pr_info("%lu free pages won't be used\n", 459 458 ARCH_PFN_OFFSET - min_low_pfn); 460 459 }
-2
arch/mips/mm/init.c
··· 30 30 #include <linux/hardirq.h> 31 31 #include <linux/gfp.h> 32 32 #include <linux/kcore.h> 33 - #include <linux/export.h> 34 33 #include <linux/initrd.h> 35 34 36 35 #include <asm/asm-offsets.h> ··· 45 46 #include <asm/pgalloc.h> 46 47 #include <asm/tlb.h> 47 48 #include <asm/fixmap.h> 48 - #include <asm/maar.h> 49 49 50 50 /* 51 51 * We have up to 8 empty zeroed pages so we can map one of the right colour
+5 -4
arch/mips/net/bpf_jit_asm.S
··· 11 11 */ 12 12 13 13 #include <asm/asm.h> 14 + #include <asm/isa-rev.h> 14 15 #include <asm/regdef.h> 15 16 #include "bpf_jit.h" 16 17 ··· 66 65 lw $r_A, 0(t1) 67 66 .set noreorder 68 67 #ifdef CONFIG_CPU_LITTLE_ENDIAN 69 - # if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) 68 + # if MIPS_ISA_REV >= 2 70 69 wsbh t0, $r_A 71 70 rotr $r_A, t0, 16 72 71 # else ··· 93 92 PTR_ADDU t1, $r_skb_data, offset 94 93 lhu $r_A, 0(t1) 95 94 #ifdef CONFIG_CPU_LITTLE_ENDIAN 96 - # if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) 95 + # if MIPS_ISA_REV >= 2 97 96 wsbh $r_A, $r_A 98 97 # else 99 98 sll t0, $r_A, 8 ··· 171 170 NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp) 172 171 bpf_slow_path_common(4) 173 172 #ifdef CONFIG_CPU_LITTLE_ENDIAN 174 - # if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) 173 + # if MIPS_ISA_REV >= 2 175 174 wsbh t0, $r_s0 176 175 jr $r_ra 177 176 rotr $r_A, t0, 16 ··· 197 196 NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp) 198 197 bpf_slow_path_common(2) 199 198 #ifdef CONFIG_CPU_LITTLE_ENDIAN 200 - # if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) 199 + # if MIPS_ISA_REV >= 2 201 200 jr $r_ra 202 201 wsbh $r_A, $r_s0 203 202 # else
+1
arch/mips/pci/pci-mt7620.c
··· 315 315 break; 316 316 317 317 case MT762X_SOC_MT7628AN: 318 + case MT762X_SOC_MT7688: 318 319 if (mt7628_pci_hw_init(pdev)) 319 320 return -1; 320 321 break;
+1 -1
arch/mips/txx9/rbtx4927/setup.c
··· 319 319 320 320 static void __init rbtx4927_gpioled_init(void) 321 321 { 322 - static struct gpio_led leds[] = { 322 + static const struct gpio_led leds[] = { 323 323 { .name = "gpioled:green:0", .gpio = 0, .active_low = 1, }, 324 324 { .name = "gpioled:green:1", .gpio = 1, .active_low = 1, }, 325 325 };
+4 -6
arch/mips/vdso/elf.S
··· 10 10 11 11 #include "vdso.h" 12 12 13 + #include <asm/isa-rev.h> 14 + 13 15 #include <linux/elfnote.h> 14 16 #include <linux/version.h> 15 17 ··· 42 40 .byte __mips /* isa_level */ 43 41 44 42 /* isa_rev */ 45 - #ifdef __mips_isa_rev 46 - .byte __mips_isa_rev 47 - #else 48 - .byte 0 49 - #endif 43 + .byte MIPS_ISA_REV 50 44 51 45 /* gpr_size */ 52 46 #ifdef __mips64 ··· 52 54 #endif 53 55 54 56 /* cpr1_size */ 55 - #if (defined(__mips_isa_rev) && __mips_isa_rev >= 6) || defined(__mips64) 57 + #if (MIPS_ISA_REV >= 6) || defined(__mips64) 56 58 .byte 2 /* AFL_REG_64 */ 57 59 #else 58 60 .byte 1 /* AFL_REG_32 */
+9
crypto/Kconfig
··· 500 500 which will enable any routine to use the CRC-32-IEEE 802.3 checksum 501 501 and gain better performance as compared with the table implementation. 502 502 503 + config CRYPTO_CRC32_MIPS 504 + tristate "CRC32c and CRC32 CRC algorithm (MIPS)" 505 + depends on MIPS_CRC_SUPPORT 506 + select CRYPTO_HASH 507 + help 508 + CRC32c and CRC32 CRC algorithms implemented using mips crypto 509 + instructions, when available. 510 + 511 + 503 512 config CRYPTO_CRCT10DIF 504 513 tristate "CRCT10DIF algorithm" 505 514 select CRYPTO_HASH
+1
drivers/firmware/broadcom/Kconfig
··· 13 13 config BCM47XX_SPROM 14 14 bool "Broadcom SPROM driver" 15 15 depends on BCM47XX_NVRAM 16 + select GENERIC_NET_UTILS 16 17 help 17 18 Broadcom devices store configuration data in SPROM. Accessing it is 18 19 specific to the bus host type, e.g. PCI(e) devices have it mapped in
+3 -15
drivers/firmware/broadcom/bcm47xx_sprom.c
··· 137 137 *leddc_off_time = (val >> 16) & 0xff; 138 138 } 139 139 140 - static void bcm47xx_nvram_parse_macaddr(char *buf, u8 macaddr[6]) 141 - { 142 - if (strchr(buf, ':')) 143 - sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0], 144 - &macaddr[1], &macaddr[2], &macaddr[3], &macaddr[4], 145 - &macaddr[5]); 146 - else if (strchr(buf, '-')) 147 - sscanf(buf, "%hhx-%hhx-%hhx-%hhx-%hhx-%hhx", &macaddr[0], 148 - &macaddr[1], &macaddr[2], &macaddr[3], &macaddr[4], 149 - &macaddr[5]); 150 - else 151 - pr_warn("Can not parse mac address: %s\n", buf); 152 - } 153 - 154 140 static void nvram_read_macaddr(const char *prefix, const char *name, 155 141 u8 val[6], bool fallback) 156 142 { ··· 147 161 if (err < 0) 148 162 return; 149 163 150 - bcm47xx_nvram_parse_macaddr(buf, val); 164 + strreplace(buf, '-', ':'); 165 + if (!mac_pton(buf, val)) 166 + pr_warn("Can not parse mac address: %s\n", buf); 151 167 } 152 168 153 169 static void nvram_read_alpha2(const char *prefix, const char *name,