Commit 5977aa66 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MIPS updates from Thomas Bogendoerfer:

 - DT cleanups

 - fix for early use of kzalloc on mt7621 platform

 - cleanups and fixes

* tag 'mips_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (21 commits)
  MIPS: OCTEON: warn only once if deprecated link status is being used
  MIPS: BCM63xx: Add check for NULL for clk in clk_enable
  platform/mips: Adjust Kconfig to keep consistency
  MIPS: OCTEON: cvmx-bootmem: use strscpy() to instead of strncpy()
  MIPS: mscc: jaguar2: Fix pca9545 i2c-mux node names
  mips/pci: use devm_platform_ioremap_resource()
  mips: ralink: mt7621: do not use kzalloc too early
  mips: ralink: mt7621: soc queries and tests as functions
  mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomem
  MIPS: Restore symbol versions for copy_page_cpu and clear_page_cpu
  mips: dts: remove label = "cpu" from DSA dt-binding
  mips: ralink: mt7621: change DSA port labels to generic naming
  mips: ralink: mt7621: fix phy-mode of external phy on GB-PC2
  MIPS: vpe-cmp: fix possible memory leak while module exiting
  MIPS: vpe-mt: fix possible memory leak while module exiting
  dt-bindings: mips: brcm: add Broadcom SoCs bindings
  dt-bindings: mips: add CPU bindings for MIPS architecture
  mips: dts: brcm: bcm7435: add "interrupt-names" for NAND controller
  mips: dts: bcm63268: add TWD block timer
  MIPS: Use "grep -E" instead of "egrep"
  ...
parents e6b160bc 4c587a98
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
* Broadcom MIPS (BMIPS) CPUs

Required properties:
- compatible: "brcm,bmips3300", "brcm,bmips4350", "brcm,bmips4380",
  "brcm,bmips5000"

- mips-hpt-frequency: This is common to all CPUs in the system so it lives
  under the "cpus" node.
+96 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mips/brcm/soc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom cable/DSL/settop platforms

maintainers:
  - Florian Fainelli <f.fainelli@gmail.com>

description: |
    Boards Broadcom cable/DSL/settop SoC shall have the following properties.
    The experimental -viper variants are for running Linux on the 3384's
    BMIPS4355 cable modem CPU instead of the BMIPS5000 application processor.

properties:
  $nodename:
    const: '/'

  compatible:
    enum:
      - brcm,bcm3368
      - brcm,bcm3384
      - brcm,bcm33843
      - brcm,bcm3384-viper
      - brcm,bcm33843-viper
      - brcm,bcm6328
      - brcm,bcm6358
      - brcm,bcm6362
      - brcm,bcm6368
      - brcm,bcm63168
      - brcm,bcm63268
      - brcm,bcm7125
      - brcm,bcm7346
      - brcm,bcm7358
      - brcm,bcm7360
      - brcm,bcm7362
      - brcm,bcm7420
      - brcm,bcm7425

  cpus:
    type: object
    additionalProperties: false
    properties:
      '#address-cells':
        const: 1

      '#size-cells':
        const: 0

      mips-hpt-frequency:
        description: MIPS counter high precision timer frequency.
         This is common to all CPUs in the system so it lives
         under the "cpus" node.
        $ref: /schemas/types.yaml#/definitions/uint32

    patternProperties:
      "^cpu@[0-9]$":
        type: object
        $ref: /schemas/mips/cpus.yaml#
        unevaluatedProperties: false

    required:
      - mips-hpt-frequency

additionalProperties: true

examples:
  - |
     / {
         compatible = "brcm,bcm3368";
         #address-cells = <1>;
         #size-cells = <1>;
         model = "Broadcom 3368";

         cpus {
           #address-cells = <1>;
           #size-cells = <0>;

           mips-hpt-frequency = <150000000>;

           cpu@0 {
             compatible = "brcm,bmips4350";
             device_type = "cpu";
             reg = <0>;
           };

           cpu@1 {
             compatible = "brcm,bmips4350";
             device_type = "cpu";
             reg = <1>;
           };
         };
       };
...
+115 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mips/cpus.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MIPS CPUs bindings

maintainers:
  - Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  - 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>

description: |
  The device tree allows to describe the layout of CPUs in a system through
  the "cpus" node, which in turn contains a number of subnodes (ie "cpu")
  defining properties for every CPU.

properties:
  compatible:
    enum:
      - brcm,bmips3300
      - brcm,bmips4350
      - brcm,bmips4380
      - brcm,bmips5000
      - brcm,bmips5200
      - ingenic,xburst-mxu1.0
      - ingenic,xburst-fpu1.0-mxu1.1
      - ingenic,xburst-fpu2.0-mxu2.0
      - ingenic,xburst2-fpu2.1-mxu2.1-smt
      - loongson,gs264
      - mips,m14Kc
      - mips,mips4Kc
      - mips,mips4KEc
      - mips,mips24Kc
      - mips,mips24KEc
      - mips,mips74Kc
      - mips,mips1004Kc
      - mti,interaptiv
      - mti,mips24KEc
      - mti,mips14KEc
      - mti,mips14Kc

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  device_type: true

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - ingenic,xburst-mxu1.0
              - ingenic,xburst-fpu1.0-mxu1.1
              - ingenic,xburst-fpu2.0-mxu2.0
              - ingenic,xburst2-fpu2.1-mxu2.1-smt
    then:
      required:
        - device_type
        - clocks

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    cpus {
      #size-cells = <0>;
      #address-cells = <1>;

      cpu@0 {
        compatible = "mips,mips1004Kc";
        device_type = "cpu";
        reg = <0>;
      };

      cpu@1 {
        compatible = "mips,mips1004Kc";
        device_type = "cpu";
        reg = <1>;
      };
    };

  - |
    // Example 2 (Ingenic CPU)
    #include <dt-bindings/clock/ingenic,jz4780-cgu.h>

    cpus {
      #address-cells = <1>;
      #size-cells = <0>;

      cpu@0 {
        compatible = "ingenic,xburst-fpu1.0-mxu1.1";
        device_type = "cpu";
        reg = <0>;

        clocks = <&cgu JZ4780_CLK_CPU>;
      };

      cpu@1 {
        compatible = "ingenic,xburst-fpu1.0-mxu1.1";
        device_type = "cpu";
        reg = <1>;

        clocks = <&cgu JZ4780_CLK_CORE1>;
      };
    };
...
+0 −69
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mips/ingenic/ingenic,cpu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Bindings for Ingenic XBurst family CPUs

maintainers:
  - 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>

description:
  Ingenic XBurst family CPUs shall have the following properties.

properties:
  compatible:
    oneOf:

      - description: Ingenic XBurst®1 CPU Cores
        enum:
          - ingenic,xburst-mxu1.0
          - ingenic,xburst-fpu1.0-mxu1.1
          - ingenic,xburst-fpu2.0-mxu2.0

      - description: Ingenic XBurst®2 CPU Cores
        enum:
          - ingenic,xburst2-fpu2.1-mxu2.1-smt

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  device_type: true

required:
  - device_type
  - compatible
  - reg
  - clocks

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/ingenic,jz4780-cgu.h>

    cpus {
        #address-cells = <1>;
        #size-cells = <0>;

        cpu0: cpu@0 {
                device_type = "cpu";
                compatible = "ingenic,xburst-fpu1.0-mxu1.1";
                reg = <0>;

                clocks = <&cgu JZ4780_CLK_CPU>;
        };

        cpu1: cpu@1 {
                device_type = "cpu";
                compatible = "ingenic,xburst-fpu1.0-mxu1.1";
                reg = <1>;

                clocks = <&cgu JZ4780_CLK_CORE1>;
        };
    };
...
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ KBUILD_LDFLAGS += -m $(ld-emul)

ifdef CONFIG_MIPS
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
	egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
	grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
	sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
endif

Loading