Skip to content

Commit 3fb561b

Browse files
committed
Merge tag 'mips_5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS updates from Thomas Bogendoerfer: - add support for more BCM47XX based devices - add MIPS support for brcmstb PCIe controller - add Loongson 2K1000 reset driver - remove board support for rbtx4938/rbtx4939 - remove support for TX4939 SoCs - fixes and cleanups * tag 'mips_5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (59 commits) MIPS: ath79: drop _machine_restart again PCI: brcmstb: Augment driver for MIPs SOCs MIPS: bmips: Remove obsolete DMA mapping support MIPS: bmips: Add support PCIe controller device nodes dt-bindings: PCI: Add compatible string for Brcmstb 74[23]5 MIPs SOCs MIPS: compressed: Fix build with ZSTD compression MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2 MIPS: BCM47XX: Add support for Netgear R6300 v1 MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U MIPS: BCM47XX: Add board entry for Linksys WRT320N v1 MIPS: BCM47XX: Define Linksys WRT310N V2 buttons MIPS: Remove duplicated include in local.h MIPS: retire "asm/llsc.h" MIPS: rework local_t operation on MIPS64 MIPS: fix local_{add,sub}_return on MIPS64 mips/pci: remove redundant ret variable MIPS: Loongson64: Add missing of_node_put() in ls2k_reset_init() MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS MIPS: enable both vmlinux.gz.itb and vmlinuz for generic MIPS: signal: Return immediately if call fails ...
2 parents 3ceff4e + d311512 commit 3fb561b

Some content is hidden

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

91 files changed

+614
-4005
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: "http://devicetree.org/schemas/mips/loongson/ls2k-reset.yaml#"
5+
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6+
7+
title: Loongson 2K1000 PM Controller
8+
9+
maintainers:
10+
- Qing Zhang <[email protected]>
11+
12+
description: |
13+
This controller can be found in Loongson-2K1000 Soc systems.
14+
15+
properties:
16+
compatible:
17+
const: loongson,ls2k-pm
18+
19+
reg:
20+
maxItems: 1
21+
22+
required:
23+
- compatible
24+
- reg
25+
26+
additionalProperties: false
27+
28+
examples:
29+
- |
30+
bus {
31+
#address-cells = <2>;
32+
#size-cells = <2>;
33+
pm: reset-controller@1fe07000 {
34+
compatible = "loongson,ls2k-pm";
35+
reg = <0 0x1fe07000 0 0x422>;
36+
};
37+
};
38+
...

Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ properties:
1919
- brcm,bcm7278-pcie # Broadcom 7278 Arm
2020
- brcm,bcm7216-pcie # Broadcom 7216 Arm
2121
- brcm,bcm7445-pcie # Broadcom 7445 Arm
22+
- brcm,bcm7425-pcie # Broadcom 7425 MIPs
23+
- brcm,bcm7435-pcie # Broadcom 7435 MIPs
2224

2325
reg:
2426
maxItems: 1

arch/mips/Kconfig

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ config BMIPS_GENERIC
264264
bool "Broadcom Generic BMIPS kernel"
265265
select ARCH_HAS_RESET_CONTROLLER
266266
select ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
267-
select ARCH_HAS_PHYS_TO_DMA
268267
select BOOT_RAW
269268
select NO_EXCEPT_FILL
270269
select USE_OF
@@ -640,9 +639,6 @@ config MACH_REALTEK_RTL
640639
select SYS_SUPPORTS_MIPS16
641640
select SYS_SUPPORTS_MULTITHREADING
642641
select SYS_SUPPORTS_VPE_LOADER
643-
select SYS_HAS_EARLY_PRINTK
644-
select SYS_HAS_EARLY_PRINTK_8250
645-
select USE_GENERIC_EARLY_PRINTK_8250
646642
select BOOT_RAW
647643
select PINCTRL
648644
select USE_OF
@@ -765,7 +761,6 @@ config SGI_IP30
765761
select HAVE_PCI
766762
select IRQ_MIPS_CPU
767763
select IRQ_DOMAIN_HIERARCHY
768-
select NR_CPUS_DEFAULT_2
769764
select PCI_DRIVERS_GENERIC
770765
select PCI_XTALK_BRIDGE
771766
select SYS_HAS_EARLY_PRINTK
@@ -1611,7 +1606,6 @@ config CPU_R4300
16111606
depends on SYS_HAS_CPU_R4300
16121607
select CPU_SUPPORTS_32BIT_KERNEL
16131608
select CPU_SUPPORTS_64BIT_KERNEL
1614-
select CPU_HAS_LOAD_STORE_LR
16151609
help
16161610
MIPS Technologies R4300-series processors.
16171611

@@ -1907,6 +1901,10 @@ config SYS_HAS_CPU_MIPS64_R1
19071901
config SYS_HAS_CPU_MIPS64_R2
19081902
bool
19091903

1904+
config SYS_HAS_CPU_MIPS64_R5
1905+
bool
1906+
select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT
1907+
19101908
config SYS_HAS_CPU_MIPS64_R6
19111909
bool
19121910
select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT
@@ -2065,7 +2063,7 @@ config CPU_SUPPORTS_ADDRWINCFG
20652063
bool
20662064
config CPU_SUPPORTS_HUGEPAGES
20672065
bool
2068-
depends on !(32BIT && (ARCH_PHYS_ADDR_T_64BIT || EVA))
2066+
depends on !(32BIT && (PHYS_ADDR_T_64BIT || EVA))
20692067
config MIPS_PGD_C0_CONTEXT
20702068
bool
20712069
depends on 64BIT
@@ -2116,6 +2114,16 @@ config MIPS_VA_BITS_48
21162114

21172115
If unsure, say N.
21182116

2117+
config ZBOOT_LOAD_ADDRESS
2118+
hex "Compressed kernel load address"
2119+
default 0xffffffff80400000 if BCM47XX
2120+
default 0x0
2121+
depends on SYS_SUPPORTS_ZBOOT
2122+
help
2123+
The address to load compressed kernel, aka vmlinuz.
2124+
2125+
This is only used if non-zero.
2126+
21192127
choice
21202128
prompt "Kernel page size"
21212129
default PAGE_SIZE_4KB

arch/mips/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ endif
253253
#
254254
# Board-dependent options and extra files
255255
#
256-
ifdef need-compiler
257256
include $(srctree)/arch/mips/Kbuild.platforms
258-
endif
259257

260258
ifdef CONFIG_PHYSICAL_START
261259
load-y = $(CONFIG_PHYSICAL_START)

arch/mips/alchemy/common/gpiolib.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
* 675 Mass Ave, Cambridge, MA 02139, USA.
2424
*
2525
* Notes :
26-
* This file must ONLY be built when CONFIG_GPIOLIB=y and
27-
* CONFIG_ALCHEMY_GPIO_INDIRECT=n, otherwise compilation will fail!
2826
* au1000 SoC have only one GPIO block : GPIO1
2927
* Au1100, Au15x0, Au12x0 have a second one : GPIO2
3028
* Au1300 is totally different: 1 block with up to 128 GPIOs

arch/mips/ath79/setup.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@
3434

3535
static char ath79_sys_type[ATH79_SYS_TYPE_LEN];
3636

37-
static void ath79_restart(char *command)
38-
{
39-
local_irq_disable();
40-
ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
41-
for (;;)
42-
if (cpu_wait)
43-
cpu_wait();
44-
}
45-
4637
static void ath79_halt(void)
4738
{
4839
while (1)
@@ -234,7 +225,6 @@ void __init plat_mem_setup(void)
234225

235226
detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
236227

237-
_machine_restart = ath79_restart;
238228
_machine_halt = ath79_halt;
239229
pm_power_off = ath79_halt;
240230
}

arch/mips/bcm47xx/Platform

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
cflags-$(CONFIG_BCM47XX) += \
55
-I$(srctree)/arch/mips/include/asm/mach-bcm47xx
66
load-$(CONFIG_BCM47XX) := 0xffffffff80001000
7-
zload-$(CONFIG_BCM47XX) += 0xffffffff80400000

arch/mips/bcm47xx/board.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = {
141141
{{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
142142
{{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
143143
{{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
144+
{{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
144145
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
145146
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
146147
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
@@ -161,9 +162,12 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
161162
{{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
162163
{{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
163164
{{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"},
165+
{{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
164166
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
165167
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
166168
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
169+
{{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
170+
{{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
167171
{{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
168172
{{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
169173
{{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
@@ -345,7 +349,7 @@ void __init bcm47xx_board_detect(void)
345349

346350
board_detected = bcm47xx_board_get_nvram();
347351
bcm47xx_board.board = board_detected->board;
348-
strlcpy(bcm47xx_board.name, board_detected->name,
352+
strscpy(bcm47xx_board.name, board_detected->name,
349353
BCM47XX_BOARD_MAX_NAME);
350354
}
351355

arch/mips/bcm47xx/buttons.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626

2727
/* Asus */
2828

29+
static const struct gpio_keys_button
30+
bcm47xx_buttons_asus_rtn10u[] __initconst = {
31+
BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
32+
BCM47XX_GPIO_KEY(21, KEY_RESTART),
33+
};
34+
2935
static const struct gpio_keys_button
3036
bcm47xx_buttons_asus_rtn12[] __initconst = {
3137
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
@@ -276,6 +282,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __initconst = {
276282
BCM47XX_GPIO_KEY(8, KEY_UNKNOWN),
277283
};
278284

285+
static const struct gpio_keys_button
286+
bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
287+
BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
288+
BCM47XX_GPIO_KEY(6, KEY_RESTART),
289+
};
290+
291+
static const struct gpio_keys_button
292+
bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
293+
BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
294+
BCM47XX_GPIO_KEY(8, KEY_RESTART),
295+
};
296+
279297
static const struct gpio_keys_button
280298
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
281299
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
@@ -391,6 +409,17 @@ bcm47xx_buttons_netgear_r6200_v1[] __initconst = {
391409
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
392410
};
393411

412+
static const struct gpio_keys_button
413+
bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
414+
BCM47XX_GPIO_KEY(6, KEY_RESTART),
415+
};
416+
417+
static const struct gpio_keys_button
418+
bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
419+
BCM47XX_GPIO_KEY(12, KEY_RESTART),
420+
BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
421+
};
422+
394423
static const struct gpio_keys_button
395424
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
396425
BCM47XX_GPIO_KEY(4, KEY_RESTART),
@@ -478,6 +507,9 @@ int __init bcm47xx_buttons_register(void)
478507
int err;
479508

480509
switch (board) {
510+
case BCM47XX_BOARD_ASUS_RTN10U:
511+
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
512+
break;
481513
case BCM47XX_BOARD_ASUS_RTN12:
482514
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
483515
break;
@@ -608,6 +640,12 @@ int __init bcm47xx_buttons_register(void)
608640
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
609641
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
610642
break;
643+
case BCM47XX_BOARD_LINKSYS_WRT310NV2:
644+
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
645+
break;
646+
case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
647+
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
648+
break;
611649
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
612650
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
613651
break;
@@ -674,6 +712,12 @@ int __init bcm47xx_buttons_register(void)
674712
case BCM47XX_BOARD_NETGEAR_R6200_V1:
675713
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
676714
break;
715+
case BCM47XX_BOARD_NETGEAR_R6300_V1:
716+
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
717+
break;
718+
case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
719+
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
720+
break;
677721
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
678722
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
679723
break;

arch/mips/bcm47xx/leds.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929

3030
/* Asus */
3131

32+
static const struct gpio_led
33+
bcm47xx_leds_asus_rtn10u[] __initconst = {
34+
BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
35+
BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
36+
BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
37+
BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
38+
};
39+
3240
static const struct gpio_led
3341
bcm47xx_leds_asus_rtn12[] __initconst = {
3442
BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
@@ -313,6 +321,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
313321
BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
314322
};
315323

324+
static const struct gpio_led
325+
bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
326+
BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
327+
BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
328+
BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
329+
};
330+
316331
static const struct gpio_led
317332
bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
318333
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
@@ -556,6 +571,9 @@ void __init bcm47xx_leds_register(void)
556571
enum bcm47xx_board board = bcm47xx_board_get();
557572

558573
switch (board) {
574+
case BCM47XX_BOARD_ASUS_RTN10U:
575+
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
576+
break;
559577
case BCM47XX_BOARD_ASUS_RTN12:
560578
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
561579
break;
@@ -689,6 +707,9 @@ void __init bcm47xx_leds_register(void)
689707
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
690708
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
691709
break;
710+
case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
711+
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
712+
break;
692713
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
693714
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
694715
break;

0 commit comments

Comments
 (0)