Skip to content

Commit 948869f

Browse files
committed
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 ...
2 parents 2a56bb5 + a5075e6 commit 948869f

59 files changed

Lines changed: 1381 additions & 84 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
};

‎Documentation/devicetree/bindings/vendor-prefixes.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ motorola Motorola, Inc.
225225
moxa Moxa Inc.
226226
mpl MPL AG
227227
mqmaker mqmaker Inc.
228+
mscc Microsemi Corporation
228229
msi Micro-Star International Co. Ltd.
229230
mti Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
230231
multi-inno Multi-Inno Technology Co.,Ltd

‎MAINTAINERS‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9230,6 +9230,15 @@ S: Maintained
92309230
F: drivers/usb/misc/usb251xb.c
92319231
F: Documentation/devicetree/bindings/usb/usb251xb.txt
92329232

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+
92339242
MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi)
92349243
M: Don Brace <don.brace@microsemi.com>
92359244
L: esc.storagedev@microsemi.com

‎arch/mips/Kconfig‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,6 +2029,7 @@ config CPU_MIPSR6
20292029
select CPU_HAS_RIXI
20302030
select HAVE_ARCH_BITREVERSE
20312031
select MIPS_ASID_BITS_VARIABLE
2032+
select MIPS_CRC_SUPPORT
20322033
select MIPS_SPRAM
20332034

20342035
config EVA
@@ -2502,6 +2503,9 @@ config MIPS_ASID_BITS
25022503
config MIPS_ASID_BITS_VARIABLE
25032504
bool
25042505

2506+
config MIPS_CRC_SUPPORT
2507+
bool
2508+
25052509
#
25062510
# - Highmem only makes sense for the 32-bit kernel.
25072511
# - The current highmem code will only work properly on physically indexed
@@ -2850,8 +2854,7 @@ config CRASH_DUMP
28502854

28512855
config PHYSICAL_START
28522856
hex "Physical address where the kernel is loaded"
2853-
default "0xffffffff84000000" if 64BIT
2854-
default "0x84000000" if 32BIT
2857+
default "0xffffffff84000000"
28552858
depends on CRASH_DUMP
28562859
help
28572860
This gives the CKSEG0 or KSEG0 address where the kernel is loaded.

‎arch/mips/Makefile‎

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ xpa-cflags-y := $(mips-cflags)
222222
xpa-cflags-$(micromips-ase) += -mmicromips -Wa$(comma)-fatal-warnings
223223
toolchain-xpa := $(call cc-option-yn,$(xpa-cflags-y) -mxpa)
224224
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
225227

226228
#
227229
# Firmware support
@@ -249,20 +251,12 @@ ifdef CONFIG_PHYSICAL_START
249251
load-y = $(CONFIG_PHYSICAL_START)
250252
endif
251253

252-
entry-noisa-y = 0x$(shell $(NM) vmlinux 2>/dev/null \
253-
| grep "\bkernel_entry\b" | cut -f1 -d \ )
254-
ifdef CONFIG_CPU_MICROMIPS
255-
#
256-
# Set the ISA bit, since the kernel_entry symbol in the ELF will have it
257-
# clear which would lead to images containing addresses which bootloaders may
258-
# jump to as MIPS32 code.
259-
#
260-
entry-y = $(patsubst %0,%1,$(patsubst %2,%3,$(patsubst %4,%5, \
261-
$(patsubst %6,%7,$(patsubst %8,%9,$(patsubst %a,%b, \
262-
$(patsubst %c,%d,$(patsubst %e,%f,$(entry-noisa-y)))))))))
263-
else
264-
entry-y = $(entry-noisa-y)
265-
endif
254+
# Sign-extend the entry point to 64 bits if retrieved as a 32-bit number.
255+
entry-y = $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \
256+
| sed -n '/^start address / { \
257+
s/^.* //; \
258+
s/0x\([0-7].......\)$$/0x00000000\1/; \
259+
s/0x\(........\)$$/0xffffffff\1/; p }')
266260

267261
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
268262
drivers-$(CONFIG_PCI) += arch/mips/pci/
@@ -330,6 +324,7 @@ libs-y += arch/mips/math-emu/
330324
# See arch/mips/Kbuild for content of core part of the kernel
331325
core-y += arch/mips/
332326

327+
drivers-$(CONFIG_MIPS_CRC_SUPPORT) += arch/mips/crypto/
333328
drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
334329

335330
# suspend and hibernation support
@@ -473,6 +468,21 @@ define archhelp
473468
echo
474469
echo ' {micro32,32,64}{r1,r2,r6}{el,}_defconfig <BOARDS="list of boards">'
475470
echo
471+
echo ' Where BOARDS is some subset of the following:'
472+
for board in $(sort $(BOARDS)); do echo " $${board}"; done
473+
echo
474+
echo ' Specifically the following generic default configurations are'
475+
echo ' supported:'
476+
echo
477+
$(foreach cfg,$(generic_defconfigs),
478+
printf " %-24s - Build generic kernel for $(call describe_generic_defconfig,$(cfg))\n" $(cfg);)
479+
echo
480+
echo ' The following legacy default configurations have been converted to'
481+
echo ' generic and can still be used:'
482+
echo
483+
$(foreach cfg,$(sort $(legacy_defconfigs)),
484+
printf " %-24s - Build $($(cfg)-y)\n" $(cfg);)
485+
echo
476486
echo ' Otherwise, the following default configurations are available:'
477487
endef
478488

@@ -507,6 +517,10 @@ endef
507517
$(eval $(call gen_generic_defconfigs,32 64,r1 r2 r6,eb el))
508518
$(eval $(call gen_generic_defconfigs,micro32,r2,eb el))
509519

520+
define describe_generic_defconfig
521+
$(subst 32r,MIPS32 r,$(subst 64r,MIPS64 r,$(subst el, little endian,$(patsubst %_defconfig,%,$(1)))))
522+
endef
523+
510524
.PHONY: $(generic_defconfigs)
511525
$(generic_defconfigs):
512526
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
@@ -543,14 +557,18 @@ generic_defconfig:
543557
# now that the boards have been converted to use the generic kernel they are
544558
# wrappers around the generic rules above.
545559
#
546-
.PHONY: sead3_defconfig
547-
sead3_defconfig:
548-
$(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=sead-3
560+
legacy_defconfigs += ocelot_defconfig
561+
ocelot_defconfig-y := 32r2el_defconfig BOARDS=ocelot
562+
563+
legacy_defconfigs += sead3_defconfig
564+
sead3_defconfig-y := 32r2el_defconfig BOARDS=sead-3
565+
566+
legacy_defconfigs += sead3micro_defconfig
567+
sead3micro_defconfig-y := micro32r2el_defconfig BOARDS=sead-3
549568

550-
.PHONY: sead3micro_defconfig
551-
sead3micro_defconfig:
552-
$(Q)$(MAKE) -f $(srctree)/Makefile micro32r2el_defconfig BOARDS=sead-3
569+
legacy_defconfigs += xilfpga_defconfig
570+
xilfpga_defconfig-y := 32r2el_defconfig BOARDS=xilfpga
553571

554-
.PHONY: xilfpga_defconfig
555-
xilfpga_defconfig:
556-
$(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=xilfpga
572+
.PHONY: $(legacy_defconfigs)
573+
$(legacy_defconfigs):
574+
$(Q)$(MAKE) -f $(srctree)/Makefile $($@-y)

‎arch/mips/alchemy/board-gpr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static struct platform_device gpr_mtd_device = {
190190
/*
191191
* LEDs
192192
*/
193-
static struct gpio_led gpr_gpio_leds[] = {
193+
static const struct gpio_led gpr_gpio_leds[] = {
194194
{ /* green */
195195
.name = "gpr:green",
196196
.gpio = 4,

‎arch/mips/alchemy/board-mtx1.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static struct platform_device mtx1_wdt = {
145145
.resource = mtx1_wdt_res,
146146
};
147147

148-
static struct gpio_led default_leds[] = {
148+
static const struct gpio_led default_leds[] = {
149149
{
150150
.name = "mtx1:green",
151151
.gpio = 211,

‎arch/mips/ar7/platform.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -346,20 +346,20 @@ static struct platform_device ar7_udc = {
346346
/*****************************************************************************
347347
* LEDs
348348
****************************************************************************/
349-
static struct gpio_led default_leds[] = {
349+
static const struct gpio_led default_leds[] = {
350350
{
351351
.name = "status",
352352
.gpio = 8,
353353
.active_low = 1,
354354
},
355355
};
356356

357-
static struct gpio_led titan_leds[] = {
357+
static const struct gpio_led titan_leds[] = {
358358
{ .name = "status", .gpio = 8, .active_low = 1, },
359359
{ .name = "wifi", .gpio = 13, .active_low = 1, },
360360
};
361361

362-
static struct gpio_led dsl502t_leds[] = {
362+
static const struct gpio_led dsl502t_leds[] = {
363363
{
364364
.name = "status",
365365
.gpio = 9,
@@ -377,7 +377,7 @@ static struct gpio_led dsl502t_leds[] = {
377377
},
378378
};
379379

380-
static struct gpio_led dg834g_leds[] = {
380+
static const struct gpio_led dg834g_leds[] = {
381381
{
382382
.name = "ppp",
383383
.gpio = 6,
@@ -406,7 +406,7 @@ static struct gpio_led dg834g_leds[] = {
406406
},
407407
};
408408

409-
static struct gpio_led fb_sl_leds[] = {
409+
static const struct gpio_led fb_sl_leds[] = {
410410
{
411411
.name = "1",
412412
.gpio = 7,
@@ -433,7 +433,7 @@ static struct gpio_led fb_sl_leds[] = {
433433
},
434434
};
435435

436-
static struct gpio_led fb_fon_leds[] = {
436+
static const struct gpio_led fb_fon_leds[] = {
437437
{
438438
.name = "1",
439439
.gpio = 8,
@@ -459,7 +459,7 @@ static struct gpio_led fb_fon_leds[] = {
459459
},
460460
};
461461

462-
static struct gpio_led gt701_leds[] = {
462+
static const struct gpio_led gt701_leds[] = {
463463
{
464464
.name = "inet:green",
465465
.gpio = 13,

‎arch/mips/bcm47xx/buttons.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ bcm47xx_buttons_luxul_xwr_600_v1[] = {
355355

356356
static const struct gpio_keys_button
357357
bcm47xx_buttons_luxul_xwr_1750_v1[] = {
358-
BCM47XX_GPIO_KEY(14, BTN_TASK),
358+
BCM47XX_GPIO_KEY(14, KEY_RESTART),
359359
};
360360

361361
/* Microsoft */

‎arch/mips/bcm47xx/leds.c‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,12 @@ bcm47xx_leds_luxul_xap_1500_v1[] __initconst = {
408408
BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 1, "timer"),
409409
};
410410

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+
411417
static const struct gpio_led
412418
bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = {
413419
BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
@@ -435,6 +441,11 @@ bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
435441
BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
436442
};
437443

444+
static const struct gpio_led
445+
bcm47xx_leds_luxul_xwr1750_v1_extra[] __initconst = {
446+
BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
447+
};
448+
438449
/* Microsoft */
439450

440451
static const struct gpio_led
@@ -528,6 +539,12 @@ static struct gpio_led_platform_data bcm47xx_leds_pdata;
528539
bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \
529540
} while (0)
530541

542+
static struct gpio_led_platform_data bcm47xx_leds_pdata_extra __initdata = {};
543+
#define bcm47xx_set_pdata_extra(dev_leds) do { \
544+
bcm47xx_leds_pdata_extra.leds = dev_leds; \
545+
bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds); \
546+
} while (0)
547+
531548
void __init bcm47xx_leds_register(void)
532549
{
533550
enum bcm47xx_board board = bcm47xx_board_get();
@@ -705,6 +722,7 @@ void __init bcm47xx_leds_register(void)
705722
break;
706723
case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
707724
bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1);
725+
bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xap1500_v1_extra);
708726
break;
709727
case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
710728
bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1);
@@ -717,6 +735,7 @@ void __init bcm47xx_leds_register(void)
717735
break;
718736
case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
719737
bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
738+
bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xwr1750_v1_extra);
720739
break;
721740

722741
case BCM47XX_BOARD_MICROSOFT_MN700:
@@ -760,4 +779,6 @@ void __init bcm47xx_leds_register(void)
760779
}
761780

762781
gpio_led_register_device(-1, &bcm47xx_leds_pdata);
782+
if (bcm47xx_leds_pdata_extra.num_leds)
783+
gpio_led_register_device(0, &bcm47xx_leds_pdata_extra);
763784
}

0 commit comments

Comments
 (0)