Skip to content

Commit 67faad7

Browse files
committed
Merge tag 'mips_6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS updates from Thomas Bogendoerfer: - Added support for EcoNet platform - Added support for parallel CPU bring up on EyeQ - Other cleanups and fixes * tag 'mips_6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (23 commits) MIPS: loongson2ef: lemote-2f: add missing function prototypes MIPS: loongson2ef: cs5536: add missing function prototypes MIPS: SMP: Move the AP sync point before the calibration delay mips: econet: Fix incorrect Kconfig dependencies MAINTAINERS: Add entry for newly added EcoNet platform. mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board dt-bindings: vendor-prefixes: Add SmartFiber mips: Add EcoNet MIPS platform support dt-bindings: mips: Add EcoNet platform binding MIPS: bcm63xx: nvram: avoid inefficient use of crc32_le_combine() mips: dts: pic32: pic32mzda: Rename the sdhci nodename to match with common mmc-controller binding MIPS: SMP: Move the AP sync point before the non-parallel aware functions MIPS: Replace strcpy() with strscpy() in vpe_elfload() MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init() mips: ptrace: Improve code formatting and indentation MIPS: SMP: Implement parallel CPU bring up for EyeQ mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS MIPS: Loongson64: Add missing '#interrupt-cells' for loongson64c_ls7a mips: dts: realtek: Add MDIO controller MIPS: txx9: gpio: use new line value setter callbacks ...
2 parents e271ed5 + 5a0c749 commit 67faad7

File tree

32 files changed

+434
-43
lines changed

32 files changed

+434
-43
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mips/econet.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: EcoNet MIPS SoCs
8+
9+
maintainers:
10+
- Caleb James DeLisle <[email protected]>
11+
12+
properties:
13+
$nodename:
14+
const: '/'
15+
16+
compatible:
17+
oneOf:
18+
- description: Boards with EcoNet EN751221 family SoC
19+
items:
20+
- enum:
21+
- smartfiber,xp8421-b
22+
- const: econet,en751221
23+
24+
additionalProperties: true
25+
26+
...

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,8 @@ patternProperties:
14061406
description: SKOV A/S
14071407
"^skyworks,.*":
14081408
description: Skyworks Solutions, Inc.
1409+
"^smartfiber,.*":
1410+
description: ShenZhen Smartfiber Technology Co, Ltd.
14091411
"^smartlabs,.*":
14101412
description: SmartLabs LLC
14111413
"^smartrg,.*":

MAINTAINERS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8477,6 +8477,18 @@ W: https://linuxtv.org
84778477
Q: http://patchwork.linuxtv.org/project/linux-media/list/
84788478
F: drivers/media/dvb-frontends/ec100*
84798479

8480+
ECONET MIPS PLATFORM
8481+
M: Caleb James DeLisle <[email protected]>
8482+
8483+
S: Maintained
8484+
F: Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml
8485+
F: Documentation/devicetree/bindings/mips/econet.yaml
8486+
F: Documentation/devicetree/bindings/timer/econet,en751221-timer.yaml
8487+
F: arch/mips/boot/dts/econet/
8488+
F: arch/mips/econet/
8489+
F: drivers/clocksource/timer-econet-en751221.c
8490+
F: drivers/irqchip/irq-econet-en751221.c
8491+
84808492
ECRYPT FILE SYSTEM
84818493
M: Tyler Hicks <[email protected]>
84828494

arch/mips/Kbuild.platforms

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ platform-$(CONFIG_CAVIUM_OCTEON_SOC) += cavium-octeon/
1111
platform-$(CONFIG_EYEQ) += mobileye/
1212
platform-$(CONFIG_MIPS_COBALT) += cobalt/
1313
platform-$(CONFIG_MACH_DECSTATION) += dec/
14+
platform-$(CONFIG_ECONET) += econet/
1415
platform-$(CONFIG_MIPS_GENERIC) += generic/
1516
platform-$(CONFIG_MACH_JAZZ) += jazz/
1617
platform-$(CONFIG_LANTIQ) += lantiq/

arch/mips/Kconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,31 @@ config MACH_DECSTATION
391391

392392
otherwise choose R3000.
393393

394+
config ECONET
395+
bool "EcoNet MIPS family"
396+
select BOOT_RAW
397+
select CPU_BIG_ENDIAN
398+
select DEBUG_ZBOOT if DEBUG_KERNEL
399+
select EARLY_PRINTK_8250
400+
select ECONET_EN751221_TIMER
401+
select SERIAL_8250
402+
select SERIAL_OF_PLATFORM
403+
select SYS_SUPPORTS_BIG_ENDIAN
404+
select SYS_HAS_CPU_MIPS32_R1
405+
select SYS_HAS_CPU_MIPS32_R2
406+
select SYS_HAS_EARLY_PRINTK
407+
select SYS_SUPPORTS_32BIT_KERNEL
408+
select SYS_SUPPORTS_MIPS16
409+
select SYS_SUPPORTS_ZBOOT_UART16550
410+
select USE_GENERIC_EARLY_PRINTK_8250
411+
select USE_OF
412+
help
413+
EcoNet EN75xx MIPS devices are big endian MIPS machines used
414+
in XPON (fiber) and DSL applications. They have SPI, PCI, USB,
415+
GPIO, and Ethernet, with optional XPON, DSL, and VoIP DSP cores.
416+
Don't confuse these with the Airoha ARM devices sometimes referred
417+
to as "EcoNet", this family is for MIPS based devices only.
418+
394419
config MACH_JAZZ
395420
bool "Jazz family of machines"
396421
select ARC_MEMORY
@@ -617,6 +642,7 @@ config EYEQ
617642
select USB_UHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
618643
select USB_UHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
619644
select USE_OF
645+
select HOTPLUG_PARALLEL if SMP
620646
help
621647
Select this to build a kernel supporting EyeQ SoC from Mobileye.
622648

@@ -1020,6 +1046,7 @@ source "arch/mips/ath79/Kconfig"
10201046
source "arch/mips/bcm47xx/Kconfig"
10211047
source "arch/mips/bcm63xx/Kconfig"
10221048
source "arch/mips/bmips/Kconfig"
1049+
source "arch/mips/econet/Kconfig"
10231050
source "arch/mips/generic/Kconfig"
10241051
source "arch/mips/ingenic/Kconfig"
10251052
source "arch/mips/jazz/Kconfig"
@@ -2287,6 +2314,7 @@ config MIPS_CPS
22872314
select MIPS_CM
22882315
select MIPS_CPS_PM if HOTPLUG_CPU
22892316
select SMP
2317+
select HOTPLUG_SMT if HOTPLUG_PARALLEL
22902318
select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
22912319
select SYNC_R4K if (CEVT_R4K || CSRC_R4K)
22922320
select SYS_SUPPORTS_HOTPLUG_CPU

arch/mips/alchemy/common/gpiolib.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ static int alchemy_gpic_get(struct gpio_chip *chip, unsigned int off)
119119
return !!au1300_gpio_get_value(off + AU1300_GPIO_BASE);
120120
}
121121

122-
static void alchemy_gpic_set(struct gpio_chip *chip, unsigned int off, int v)
122+
static int alchemy_gpic_set(struct gpio_chip *chip, unsigned int off, int v)
123123
{
124124
au1300_gpio_set_value(off + AU1300_GPIO_BASE, v);
125+
126+
return 0;
125127
}
126128

127129
static int alchemy_gpic_dir_input(struct gpio_chip *chip, unsigned int off)
@@ -145,7 +147,7 @@ static struct gpio_chip au1300_gpiochip = {
145147
.direction_input = alchemy_gpic_dir_input,
146148
.direction_output = alchemy_gpic_dir_output,
147149
.get = alchemy_gpic_get,
148-
.set = alchemy_gpic_set,
150+
.set_rv = alchemy_gpic_set,
149151
.to_irq = alchemy_gpic_gpio_to_irq,
150152
.base = AU1300_GPIO_BASE,
151153
.ngpio = AU1300_GPIO_NUM,

arch/mips/bcm63xx/boards/board_bcm963xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ void __init board_prom_init(void)
764764
snprintf(cfe_version, 12, "%s", (char *) &cfe[4]);
765765
}
766766
} else {
767-
strcpy(cfe_version, "unknown");
767+
strscpy(cfe_version, "unknown");
768768
}
769769
pr_info("CFE version: %s\n", cfe_version);
770770

arch/mips/bcm63xx/gpio.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ static void bcm63xx_gpio_out_low_reg_init(void)
3535
static DEFINE_SPINLOCK(bcm63xx_gpio_lock);
3636
static u32 gpio_out_low, gpio_out_high;
3737

38-
static void bcm63xx_gpio_set(struct gpio_chip *chip,
39-
unsigned gpio, int val)
38+
static int bcm63xx_gpio_set(struct gpio_chip *chip, unsigned int gpio, int val)
4039
{
4140
u32 reg;
4241
u32 mask;
@@ -62,6 +61,8 @@ static void bcm63xx_gpio_set(struct gpio_chip *chip,
6261
*v &= ~mask;
6362
bcm_gpio_writel(*v, reg);
6463
spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags);
64+
65+
return 0;
6566
}
6667

6768
static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio)
@@ -130,7 +131,7 @@ static struct gpio_chip bcm63xx_gpio_chip = {
130131
.direction_input = bcm63xx_gpio_direction_input,
131132
.direction_output = bcm63xx_gpio_direction_output,
132133
.get = bcm63xx_gpio_get,
133-
.set = bcm63xx_gpio_set,
134+
.set_rv = bcm63xx_gpio_set,
134135
.base = 0,
135136
};
136137

arch/mips/boot/compressed/uart-16550.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
#define PORT(offset) (CKSEG1ADDR(INGENIC_UART_BASE_ADDR) + (4 * offset))
2121
#endif
2222

23+
#ifdef CONFIG_ECONET
24+
#define EN75_UART_BASE 0x1fbf0003
25+
#define PORT(offset) (CKSEG1ADDR(EN75_UART_BASE) + (4 * (offset)))
26+
#endif
27+
2328
#ifndef IOTYPE
2429
#define IOTYPE char
2530
#endif

arch/mips/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
subdir-$(CONFIG_BMIPS_GENERIC) += brcm
33
subdir-$(CONFIG_CAVIUM_OCTEON_SOC) += cavium-octeon
4+
subdir-$(CONFIG_ECONET) += econet
45
subdir-$(CONFIG_EYEQ) += mobileye
56
subdir-$(CONFIG_FIT_IMAGE_FDT_MARDUK) += img
67
subdir-$(CONFIG_FIT_IMAGE_FDT_BOSTON) += img

0 commit comments

Comments
 (0)