Skip to content

Commit 6a74422

Browse files
committed
Merge tag 'mips_6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS updates from Thomas Bogendoerfer: - switch longson32 platform to DT and use MIPS_GENERIC framework - cleanups/fixes for lantiq DTs - other cleanups and fixes * tag 'mips_6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (30 commits) mips: math-emu: replace deprecated strcpy() in me-debugfs MIPS: configs: Consolidate Loongson1 defconfigs MIPS: Unify Loongson1 PRID_REV MIPS: loongson32: Switch to generic core MIPS: loongson: Add built-in DTB support MIPS: dts: loongson: Add CQ-T300B board MIPS: dts: loongson: Add Smartloong-1C board MIPS: dts: loongson: Add LSGZ_1B_DEV board MIPS: dts: loongson: Add LS1B-DEMO board dt-bindings: mips: loongson: Add LS1B-DEMO and CQ-T300B mips: lantiq: danube: rename stp node on EASY50712 reference board mips: lantiq: xway: sysctrl: rename stp clock MIPS: RB532: Replace deprecated strcpy() with memcpy() and strscpy() MIPS: Loongson64: Replace deprecated strcpy() with strscpy_pad() MIPS: generic: Replace deprecated strcpy() in ocelot_detect() MIPS: octeon: Replace deprecated strcpy() in octeon_model_get_string_buffer() MIPS: octeon: Replace memset(0) + deprecated strcpy() with strscpy_pad() MIPS: arc: Replace deprecated strcpy() with memcpy() MIPS: txx9: Replace deprecated strcpy() with strscpy() MIPS: sni: Replace deprecated strcpy() in sni_console_setup() ...
2 parents 742adaa + c662a6f commit 6a74422

Some content is hidden

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

108 files changed

+1355
-1405
lines changed

Documentation/devicetree/bindings/mips/cpus.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ properties:
3333
- mips,mips1004Kc
3434
- mips,mips24KEc
3535
- mips,mips24Kc
36+
- mips,mips34Kc
3637
- mips,mips4KEc
3738
- mips,mips4Kc
3839
- mips,mips74Kc

Documentation/devicetree/bindings/mips/loongson/devices.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,15 @@ properties:
4040
- description: LS1B based boards
4141
items:
4242
- enum:
43+
- loongson,ls1b-demo
4344
- loongson,lsgz-1b-dev
4445
- const: loongson,ls1b
4546

4647
- description: LS1C based boards
4748
items:
4849
- enum:
4950
- loongmasses,smartloong-1c
51+
- loongson,cq-t300b
5052
- const: loongson,ls1c
5153

5254
additionalProperties: true

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17267,7 +17267,8 @@ M: Keguang Zhang <[email protected]>
1726717267
1726817268
S: Maintained
1726917269
F: Documentation/devicetree/bindings/*/loongson,ls1*.yaml
17270-
F: arch/mips/include/asm/mach-loongson32/
17270+
F: arch/mips/boot/dts/loongson/loongson1*
17271+
F: arch/mips/configs/loongson1_defconfig
1727117272
F: arch/mips/loongson32/
1727217273
F: drivers/*/*loongson1*
1727317274
F: drivers/mtd/nand/raw/loongson-nand-controller.c

arch/mips/Kconfig

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,23 @@ config LANTIQ
479479

480480
config MACH_LOONGSON32
481481
bool "Loongson 32-bit family of machines"
482+
select MACH_GENERIC_CORE
483+
select USE_OF
484+
select BUILTIN_DTB
485+
select BOOT_ELF32
486+
select CEVT_R4K
487+
select CSRC_R4K
488+
select COMMON_CLK
489+
select DMA_NONCOHERENT
490+
select GENERIC_IRQ_SHOW_LEVEL
491+
select IRQ_MIPS_CPU
492+
select LS1X_IRQ
493+
select SYS_HAS_CPU_LOONGSON32
494+
select SYS_HAS_EARLY_PRINTK
495+
select USE_GENERIC_EARLY_PRINTK_8250
496+
select SYS_SUPPORTS_32BIT_KERNEL
497+
select SYS_SUPPORTS_LITTLE_ENDIAN
498+
select SYS_SUPPORTS_HIGHMEM
482499
select SYS_SUPPORTS_ZBOOT
483500
help
484501
This enables support for the Loongson-1 family of machines.
@@ -1385,25 +1402,20 @@ config CPU_LOONGSON2F
13851402
have a similar programming interface with FPGA northbridge used in
13861403
Loongson2E.
13871404

1388-
config CPU_LOONGSON1B
1389-
bool "Loongson 1B"
1390-
depends on SYS_HAS_CPU_LOONGSON1B
1391-
select CPU_LOONGSON32
1392-
select LEDS_GPIO_REGISTER
1393-
help
1394-
The Loongson 1B is a 32-bit SoC, which implements the MIPS32
1395-
Release 1 instruction set and part of the MIPS32 Release 2
1396-
instruction set.
1397-
1398-
config CPU_LOONGSON1C
1399-
bool "Loongson 1C"
1400-
depends on SYS_HAS_CPU_LOONGSON1C
1401-
select CPU_LOONGSON32
1405+
config CPU_LOONGSON32
1406+
bool "Loongson 32-bit CPU"
1407+
depends on SYS_HAS_CPU_LOONGSON32
1408+
select CPU_MIPS32
1409+
select CPU_MIPSR2
1410+
select CPU_HAS_PREFETCH
1411+
select CPU_HAS_LOAD_STORE_LR
1412+
select CPU_SUPPORTS_32BIT_KERNEL
1413+
select CPU_SUPPORTS_HIGHMEM
1414+
select CPU_SUPPORTS_CPUFREQ
14021415
select LEDS_GPIO_REGISTER
14031416
help
1404-
The Loongson 1C is a 32-bit SoC, which implements the MIPS32
1405-
Release 1 instruction set and part of the MIPS32 Release 2
1406-
instruction set.
1417+
The Loongson GS232 microarchitecture implements the MIPS32 Release 1
1418+
instruction set and part of the MIPS32 Release 2 instruction set.
14071419

14081420
config CPU_MIPS32_R1
14091421
bool "MIPS32 Release 1"
@@ -1838,15 +1850,6 @@ config CPU_LOONGSON2EF
18381850
select CPU_SUPPORTS_HUGEPAGES
18391851
select RTC_MC146818_LIB
18401852

1841-
config CPU_LOONGSON32
1842-
bool
1843-
select CPU_MIPS32
1844-
select CPU_MIPSR2
1845-
select CPU_HAS_PREFETCH
1846-
select CPU_SUPPORTS_32BIT_KERNEL
1847-
select CPU_SUPPORTS_HIGHMEM
1848-
select CPU_SUPPORTS_CPUFREQ
1849-
18501853
config CPU_BMIPS32_3300
18511854
select SMP_UP if SMP
18521855
bool
@@ -1884,10 +1887,7 @@ config SYS_HAS_CPU_LOONGSON2F
18841887
select CPU_SUPPORTS_CPUFREQ
18851888
select CPU_SUPPORTS_ADDRWINCFG if 64BIT
18861889

1887-
config SYS_HAS_CPU_LOONGSON1B
1888-
bool
1889-
1890-
config SYS_HAS_CPU_LOONGSON1C
1890+
config SYS_HAS_CPU_LOONGSON32
18911891
bool
18921892

18931893
config SYS_HAS_CPU_MIPS32_R1
@@ -2986,8 +2986,8 @@ choice
29862986
prompt "Kernel command line type"
29872987
depends on !CMDLINE_OVERRIDE
29882988
default MIPS_CMDLINE_FROM_DTB if USE_OF && !ATH79 && !MACH_INGENIC && \
2989-
!MACH_LOONGSON64 && !MIPS_MALTA && \
2990-
!CAVIUM_OCTEON_SOC
2989+
!MACH_LOONGSON64 && !MACH_LOONGSON32 && \
2990+
!MIPS_MALTA && !CAVIUM_OCTEON_SOC
29912991
default MIPS_CMDLINE_FROM_BOOTLOADER
29922992

29932993
config MIPS_CMDLINE_FROM_DTB

arch/mips/alchemy/common/clock.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,30 +211,34 @@ static int alchemy_clk_aux_setr(struct clk_hw *hw,
211211
return 0;
212212
}
213213

214-
static long alchemy_clk_aux_roundr(struct clk_hw *hw,
215-
unsigned long rate,
216-
unsigned long *parent_rate)
214+
static int alchemy_clk_aux_determine_rate(struct clk_hw *hw,
215+
struct clk_rate_request *req)
217216
{
218217
struct alchemy_auxpll_clk *a = to_auxpll_clk(hw);
219218
unsigned long mult;
220219

221-
if (!rate || !*parent_rate)
220+
if (!req->rate || !req->best_parent_rate) {
221+
req->rate = 0;
222+
222223
return 0;
224+
}
223225

224-
mult = rate / (*parent_rate);
226+
mult = req->rate / req->best_parent_rate;
225227

226228
if (mult && (mult < 7))
227229
mult = 7;
228230
if (mult > a->maxmult)
229231
mult = a->maxmult;
230232

231-
return (*parent_rate) * mult;
233+
req->rate = req->best_parent_rate * mult;
234+
235+
return 0;
232236
}
233237

234238
static const struct clk_ops alchemy_clkops_aux = {
235239
.recalc_rate = alchemy_clk_aux_recalc,
236240
.set_rate = alchemy_clk_aux_setr,
237-
.round_rate = alchemy_clk_aux_roundr,
241+
.determine_rate = alchemy_clk_aux_determine_rate,
238242
};
239243

240244
static struct clk __init *alchemy_clk_setup_aux(const char *parent_name,

arch/mips/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ subdir-$(CONFIG_FIT_IMAGE_FDT_BOSTON) += img
88
subdir-$(CONFIG_MACH_INGENIC) += ingenic
99
subdir-$(CONFIG_LANTIQ) += lantiq
1010
subdir-$(CONFIG_MACH_LOONGSON64) += loongson
11+
subdir-$(CONFIG_MACH_LOONGSON32) += loongson
1112
subdir-$(CONFIG_SOC_VCOREIII) += mscc
1213
subdir-$(CONFIG_MIPS_MALTA) += mti
1314
subdir-$(CONFIG_LEGACY_BOARD_SEAD3) += mti

arch/mips/boot/dts/brcm/bcm7346.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,8 @@
531531
};
532532

533533
memc-ddr@2000 {
534-
compatible = "brcm,brcmstb-memc-ddr";
534+
compatible = "brcm,brcmstb-memc-ddr-rev-a.0.0",
535+
"brcm,brcmstb-memc-ddr";
535536
reg = <0x2000 0x300>;
536537
};
537538

arch/mips/boot/dts/brcm/bcm7360.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,8 @@
450450
};
451451

452452
memc-ddr@2000 {
453-
compatible = "brcm,brcmstb-memc-ddr";
453+
compatible = "brcm,brcmstb-memc-ddr-rev-a.0.0",
454+
"brcm,brcmstb-memc-ddr";
454455
reg = <0x2000 0x300>;
455456
};
456457

arch/mips/boot/dts/brcm/bcm7362.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@
446446
};
447447

448448
memc-ddr@2000 {
449-
compatible = "brcm,brcmstb-memc-ddr";
449+
compatible = "brcm,brcmstb-memc-ddr-rev-a.0.0",
450+
"brcm,brcmstb-memc-ddr";
450451
reg = <0x2000 0x300>;
451452
};
452453

arch/mips/boot/dts/brcm/bcm7425.dtsi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@
542542
};
543543

544544
memc-ddr@2000 {
545-
compatible = "brcm,brcmstb-memc-ddr";
545+
compatible = "brcm,brcmstb-memc-ddr-rev-a.0.0",
546+
"brcm,brcmstb-memc-ddr";
546547
reg = <0x2000 0x300>;
547548
};
548549

@@ -569,7 +570,8 @@
569570
};
570571

571572
memc-ddr@2000 {
572-
compatible = "brcm,brcmstb-memc-ddr";
573+
compatible = "brcm,brcmstb-memc-ddr-rev-a.0.0",
574+
"brcm,brcmstb-memc-ddr";
573575
reg = <0x2000 0x300>;
574576
};
575577

0 commit comments

Comments
 (0)