mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-21 11:09:26 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-7.2-rc2). No conflicts. Adjacent changes: MAINTAINERS:56114690ff("MAINTAINERS: Update Marvell octeontx2 driver maintainers")eb56577ae9("ehea: remove the ehea driver") net/core/netpoll.c:45f1458a85("netpoll: fix a use-after-free on shutdown path")84c0ff1efb("netpoll: do not warn when the best-effort pool refill fails") Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
1
.mailmap
1
.mailmap
@@ -373,6 +373,7 @@ Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@opinsys.com>
|
||||
Jason Gunthorpe <jgg@ziepe.ca> <jgg@mellanox.com>
|
||||
Jason Gunthorpe <jgg@ziepe.ca> <jgg@nvidia.com>
|
||||
Jason Gunthorpe <jgg@ziepe.ca> <jgunthorpe@obsidianresearch.com>
|
||||
Jason Wang <jasowangio@gmail.com> <jasowang@redhat.com>
|
||||
Jason Xing <kerneljasonxing@gmail.com> <kernelxing@tencent.com>
|
||||
<javier@osg.samsung.com> <javier.martinez@collabora.co.uk>
|
||||
Javi Merino <javi.merino@kernel.org> <javi.merino@arm.com>
|
||||
|
||||
@@ -24,7 +24,7 @@ properties:
|
||||
const: 1
|
||||
|
||||
clocks:
|
||||
minItems: 14
|
||||
minItems: 15
|
||||
items:
|
||||
- description: input oscillator
|
||||
- description: input sys clk
|
||||
@@ -40,12 +40,13 @@ properties:
|
||||
- description: input gp1 pll
|
||||
- description: input mpll1
|
||||
- description: input mpll2
|
||||
- description: input mpll3
|
||||
- description: external input rmii oscillator (optional)
|
||||
- description: input video pll0 (optional)
|
||||
- description: external pad input for rtc (optional)
|
||||
|
||||
clock-names:
|
||||
minItems: 14
|
||||
minItems: 15
|
||||
items:
|
||||
- const: xtal
|
||||
- const: sys
|
||||
@@ -61,6 +62,7 @@ properties:
|
||||
- const: gp1
|
||||
- const: mpll1
|
||||
- const: mpll2
|
||||
- const: mpll3
|
||||
- const: ext_rmii
|
||||
- const: vid_pll0
|
||||
- const: ext_rtc
|
||||
@@ -97,7 +99,8 @@ examples:
|
||||
<&gp0 1>,
|
||||
<&gp1 1>,
|
||||
<&mpll 4>,
|
||||
<&mpll 6>;
|
||||
<&mpll 6>,
|
||||
<&mpll 8>;
|
||||
clock-names = "xtal",
|
||||
"sys",
|
||||
"fix",
|
||||
@@ -111,6 +114,7 @@ examples:
|
||||
"gp0",
|
||||
"gp1",
|
||||
"mpll1",
|
||||
"mpll2";
|
||||
"mpll2",
|
||||
"mpll3";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ allOf:
|
||||
contains:
|
||||
enum:
|
||||
- amlogic,t7-gp0-pll
|
||||
- amlogic,t7-gp1--pll
|
||||
- amlogic,t7-gp1-pll
|
||||
- amlogic,t7-hifi-pll
|
||||
- amlogic,t7-pcie-pll
|
||||
- amlogic,t7-mpll
|
||||
|
||||
59
Documentation/devicetree/bindings/clock/canaan,k230-clk.yaml
Normal file
59
Documentation/devicetree/bindings/clock/canaan,k230-clk.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/canaan,k230-clk.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Canaan Kendryte K230 Clock
|
||||
|
||||
maintainers:
|
||||
- Xukai Wang <kingxukai@zohomail.com>
|
||||
|
||||
description:
|
||||
The Canaan K230 clock controller generates various clocks for SoC
|
||||
peripherals. See include/dt-bindings/clock/canaan,k230-clk.h for
|
||||
valid clock IDs.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: canaan,k230-clk
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: PLL control registers
|
||||
- description: Sysclk control registers
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Main external reference clock
|
||||
- description:
|
||||
External clock which used as the pulse input
|
||||
for the timer to provide timing signals.
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: osc24m
|
||||
- const: timer-pulse-in
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- '#clock-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
clock-controller@91102000 {
|
||||
compatible = "canaan,k230-clk";
|
||||
reg = <0x91102000 0x40>,
|
||||
<0x91100000 0x108>;
|
||||
clocks = <&osc24m>, <&timerx_pulse_in>;
|
||||
clock-names = "osc24m", "timer-pulse-in";
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
@@ -37,6 +37,9 @@ properties:
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
@@ -44,16 +47,27 @@ required:
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
if:
|
||||
not:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: marvell,pxa1908-apmu
|
||||
|
||||
then:
|
||||
properties:
|
||||
'#power-domain-cells': false
|
||||
allOf:
|
||||
- if:
|
||||
not:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: marvell,pxa1908-apmu
|
||||
then:
|
||||
properties:
|
||||
'#power-domain-cells': false
|
||||
- if:
|
||||
not:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- marvell,pxa1908-apbc
|
||||
- marvell,pxa1908-apbcp
|
||||
then:
|
||||
properties:
|
||||
'#reset-cells': false
|
||||
|
||||
examples:
|
||||
# APMU block:
|
||||
|
||||
@@ -42,12 +42,6 @@ properties:
|
||||
- const: cfg_ahb_clk
|
||||
- const: gcc_disp_gpll0_div_clk_src
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
power-domains:
|
||||
description:
|
||||
A phandle and PM domain specifier for the CX power domain.
|
||||
@@ -58,18 +52,16 @@ properties:
|
||||
A phandle to an OPP node describing the power domain's performance point.
|
||||
maxItems: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- '#clock-cells'
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
@@ -101,6 +93,7 @@ examples:
|
||||
power-domains = <&rpmpd SM6125_VDDCX>;
|
||||
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
...
|
||||
|
||||
63
Documentation/devicetree/bindings/clock/qcom,hawi-gcc.yaml
Normal file
63
Documentation/devicetree/bindings/clock/qcom,hawi-gcc.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,hawi-gcc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Global Clock & Reset Controller on Hawi
|
||||
|
||||
maintainers:
|
||||
- Vivek Aknurwar <vivek.aknurwar@oss.qualcomm.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
domains on Hawi.
|
||||
|
||||
See also: include/dt-bindings/clock/qcom,hawi-gcc.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,hawi-gcc
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Board XO source
|
||||
- description: Board Always On XO source
|
||||
- description: Sleep clock source
|
||||
- description: PCIE 0 Pipe clock source
|
||||
- description: PCIE 1 Pipe clock source
|
||||
- description: UFS PHY RX symbol 0 clock
|
||||
- description: UFS PHY RX symbol 1 clock
|
||||
- description: UFS PHY TX symbol 0 clock
|
||||
- description: USB3 PHY wrapper pipe clock
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- '#power-domain-cells'
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,gcc.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
clock-controller@100000 {
|
||||
compatible = "qcom,hawi-gcc";
|
||||
reg = <0x00100000 0x1f4200>;
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK_A>,
|
||||
<&sleep_clk>,
|
||||
<&pcie0_phy>,
|
||||
<&pcie1_phy>,
|
||||
<&ufs_mem_phy 0>,
|
||||
<&ufs_mem_phy 1>,
|
||||
<&ufs_mem_phy 2>,
|
||||
<&usb_1_qmpphy>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
...
|
||||
@@ -25,6 +25,7 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq5018-cmn-pll
|
||||
- qcom,ipq5332-cmn-pll
|
||||
- qcom,ipq5424-cmn-pll
|
||||
- qcom,ipq6018-cmn-pll
|
||||
- qcom,ipq8074-cmn-pll
|
||||
|
||||
@@ -44,7 +44,7 @@ required:
|
||||
- power-domains
|
||||
- '#power-domain-cells'
|
||||
|
||||
unevaluatedProperties: false
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
@@ -25,6 +25,10 @@ properties:
|
||||
- description: Sleep clock source
|
||||
- description: Camera AHB clock from GCC
|
||||
|
||||
interconnects:
|
||||
items:
|
||||
- description: Interconnect path to enable the MultiMedia NoC
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
@@ -37,12 +41,16 @@ unevaluatedProperties: false
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,milos-gcc.h>
|
||||
#include <dt-bindings/interconnect/qcom,icc.h>
|
||||
#include <dt-bindings/interconnect/qcom,milos-rpmh.h>
|
||||
clock-controller@adb0000 {
|
||||
compatible = "qcom,milos-camcc";
|
||||
reg = <0x0adb0000 0x40000>;
|
||||
clocks = <&bi_tcxo_div2>,
|
||||
<&sleep_clk>,
|
||||
<&gcc GCC_CAMERA_AHB_CLK>;
|
||||
interconnects = <&mmss_noc MASTER_CAMNOC_HF QCOM_ICC_TAG_ALWAYS
|
||||
&mmss_noc SLAVE_MNOC_HF_MEM_NOC QCOM_ICC_TAG_ALWAYS>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
#power-domain-cells = <1>;
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/clock/qcom,milos-gxclkctl.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Graphics Power Domain Controller on Milos
|
||||
|
||||
maintainers:
|
||||
- Luca Weiss <luca.weiss@fairphone.com>
|
||||
|
||||
description: |
|
||||
Qualcomm GX(graphics) is a clock controller which has PLLs, clocks and
|
||||
Power domains (GDSC). This module provides the power domains control
|
||||
of gxclkctl on Qualcomm SoCs which helps the recovery of Graphics subsystem.
|
||||
|
||||
See also:
|
||||
include/dt-bindings/clock/qcom,kaanapali-gxclkctl.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,milos-gxclkctl
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
power-domains:
|
||||
description:
|
||||
Power domains required for the clock controller to operate
|
||||
items:
|
||||
- description: GFX power domain
|
||||
- description: GPUCC(CX) power domain
|
||||
|
||||
'#power-domain-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- power-domains
|
||||
- '#power-domain-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/power/qcom,rpmhpd.h>
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
clock-controller@3d64000 {
|
||||
compatible = "qcom,milos-gxclkctl";
|
||||
reg = <0x0 0x03d64000 0x0 0x6000>;
|
||||
power-domains = <&rpmhpd RPMHPD_GFX>,
|
||||
<&gpucc 0>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -19,6 +19,7 @@ properties:
|
||||
enum:
|
||||
- qcom,eliza-rpmh-clk
|
||||
- qcom,glymur-rpmh-clk
|
||||
- qcom,hawi-rpmh-clk
|
||||
- qcom,kaanapali-rpmh-clk
|
||||
- qcom,milos-rpmh-clk
|
||||
- qcom,nord-rpmh-clk
|
||||
|
||||
@@ -20,6 +20,7 @@ description: |
|
||||
include/dt-bindings/clock/qcom,sm8450-videocc.h
|
||||
include/dt-bindings/clock/qcom,sm8650-videocc.h
|
||||
include/dt-bindings/clock/qcom,sm8750-videocc.h
|
||||
include/dt-bindings/clock/qcom,x1p42100-videocc.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
@@ -32,6 +33,7 @@ properties:
|
||||
- qcom,sm8650-videocc
|
||||
- qcom,sm8750-videocc
|
||||
- qcom,x1e80100-videocc
|
||||
- qcom,x1p42100-videocc
|
||||
|
||||
clocks:
|
||||
items:
|
||||
@@ -70,6 +72,7 @@ allOf:
|
||||
- qcom,sm8450-videocc
|
||||
- qcom,sm8550-videocc
|
||||
- qcom,sm8750-videocc
|
||||
- qcom,x1p42100-videocc
|
||||
then:
|
||||
required:
|
||||
- required-opps
|
||||
|
||||
@@ -17,6 +17,7 @@ description: |
|
||||
See also:
|
||||
- include/dt-bindings/clock/qcom,eliza-tcsr.h
|
||||
- include/dt-bindings/clock/qcom,glymur-tcsr.h
|
||||
- include/dt-bindings/clock/qcom,hawi-tcsrcc.h
|
||||
- include/dt-bindings/clock/qcom,nord-tcsrcc.h
|
||||
- include/dt-bindings/clock/qcom,sm8550-tcsr.h
|
||||
- include/dt-bindings/clock/qcom,sm8650-tcsr.h
|
||||
@@ -28,6 +29,7 @@ properties:
|
||||
- enum:
|
||||
- qcom,eliza-tcsr
|
||||
- qcom,glymur-tcsr
|
||||
- qcom,hawi-tcsrcc
|
||||
- qcom,kaanapali-tcsr
|
||||
- qcom,milos-tcsr
|
||||
- qcom,nord-tcsrcc
|
||||
|
||||
@@ -23,6 +23,7 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,x1e80100-camcc
|
||||
- qcom,x1p42100-camcc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@@ -60,7 +60,7 @@ examples:
|
||||
clock-output-names = "main", "pll0", "pll1", "pll2",
|
||||
"pll2s", "pll2h", "z", "z2",
|
||||
"i", "m3", "b", "m1", "m2",
|
||||
"zx", "zs", "hp";
|
||||
"zx", "zs", "hp", "ztr", "zt";
|
||||
};
|
||||
|
||||
sdhi2_clk: sdhi2_clk@e615007c {
|
||||
|
||||
@@ -28,7 +28,6 @@ properties:
|
||||
|
||||
fan-supply:
|
||||
description: Phandle to the regulator that powers the fan.
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/regulator/sprd,sc2730-regulator.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Unisoc SC2730 Power Management IC regulators
|
||||
|
||||
maintainers:
|
||||
- Otto Pflüger <otto.pflueger@abscue.de>
|
||||
|
||||
patternProperties:
|
||||
"^dcdc-(core|cpu|gen[0-1]|gpu|mem|memq|modem|sram)$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
"^ldo-avdd(12|18)$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
"^ldo-vdd(18-dcxo|28)$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
"^ldo-vdd(emmccore|kpled|ldo[0-2]|sd(core|io)|sim[0-2]|usb33|wcn|wifipa)$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
"^ldo-vddcam(a0|a1|d0|d1|io|mot)$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
"^ldo-vddrf(1v25|18)$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
additionalProperties: false
|
||||
...
|
||||
@@ -1,39 +0,0 @@
|
||||
Epson RX6110 Real Time Clock
|
||||
============================
|
||||
|
||||
The Epson RX6110 can be used with SPI or I2C busses. The kind of
|
||||
bus depends on the SPISEL pin and can not be configured via software.
|
||||
|
||||
I2C mode
|
||||
--------
|
||||
|
||||
Required properties:
|
||||
- compatible: should be: "epson,rx6110"
|
||||
- reg : the I2C address of the device for I2C
|
||||
|
||||
Example:
|
||||
|
||||
rtc: rtc@32 {
|
||||
compatible = "epson,rx6110"
|
||||
reg = <0x32>;
|
||||
};
|
||||
|
||||
SPI mode
|
||||
--------
|
||||
|
||||
Required properties:
|
||||
- compatible: should be: "epson,rx6110"
|
||||
- reg: chip select number
|
||||
- spi-cs-high: RX6110 needs chipselect high
|
||||
- spi-cpha: RX6110 works with SPI shifted clock phase
|
||||
- spi-cpol: RX6110 works with SPI inverse clock polarity
|
||||
|
||||
Example:
|
||||
|
||||
rtc: rtc@3 {
|
||||
compatible = "epson,rx6110"
|
||||
reg = <3>
|
||||
spi-cs-high;
|
||||
spi-cpha;
|
||||
spi-cpol;
|
||||
};
|
||||
68
Documentation/devicetree/bindings/rtc/epson,rx6110.yaml
Normal file
68
Documentation/devicetree/bindings/rtc/epson,rx6110.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/rtc/epson,rx6110.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Epson RX6110 Real Time Clock
|
||||
|
||||
description:
|
||||
The Epson RX6110 can be used with SPI or I2C busses. The kind of bus depends
|
||||
on the SPISEL pin and cannot be configured via software.
|
||||
|
||||
maintainers:
|
||||
- Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
|
||||
allOf:
|
||||
- $ref: rtc.yaml#
|
||||
- $ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: epson,rx6110
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
spi-cs-high: true
|
||||
spi-cpha: true
|
||||
spi-cpol: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
dependencies:
|
||||
spi-cs-high: [ spi-cpha, spi-cpol ]
|
||||
spi-cpha: [ spi-cs-high, spi-cpol ]
|
||||
spi-cpol: [ spi-cs-high, spi-cpha ]
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
# I2C mode
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rtc@32 {
|
||||
compatible = "epson,rx6110";
|
||||
reg = <0x32>;
|
||||
};
|
||||
};
|
||||
|
||||
# SPI mode
|
||||
- |
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rtc@3 {
|
||||
compatible = "epson,rx6110";
|
||||
reg = <3>;
|
||||
spi-cs-high;
|
||||
spi-cpha;
|
||||
spi-cpol;
|
||||
};
|
||||
};
|
||||
@@ -31,6 +31,7 @@ properties:
|
||||
- epson,rx8025
|
||||
- isil,isl12057
|
||||
- epson,rx8130
|
||||
- epson,rx8901
|
||||
|
||||
- items:
|
||||
- enum:
|
||||
|
||||
50
Documentation/devicetree/bindings/rtc/st,m41t93.yaml
Normal file
50
Documentation/devicetree/bindings/rtc/st,m41t93.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/rtc/st,m41t93.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: ST M41T93 RTC and compatible
|
||||
|
||||
maintainers:
|
||||
- Akhilesh Patil <akhilesh@ee.iitb.ac.in>
|
||||
|
||||
description:
|
||||
ST M41T93 is spi based Real Time Clock (RTC) with time, date,
|
||||
alarm, watchdog, square wave clock output, 8 bit timer and
|
||||
7 bytes of user SRAM.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- st,m41t93
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
"#clock-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: rtc.yaml
|
||||
- $ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
rtc@0 {
|
||||
compatible = "st,m41t93";
|
||||
reg = <0>;
|
||||
#clock-cells = <0>;
|
||||
spi-max-frequency = <2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -30,6 +30,8 @@ properties:
|
||||
- aspeed,ast2500-rtc
|
||||
# ASPEED BMC ast2600 Real-time Clock
|
||||
- aspeed,ast2600-rtc
|
||||
# ASPEED BMC ast2700 Real-time Clock
|
||||
- aspeed,ast2700-rtc
|
||||
# Conexant Digicolor Real Time Clock Controller
|
||||
- cnxt,cx92755-rtc
|
||||
# I2C, 32-Bit Binary Counter Watchdog RTC with Trickle Charger and Reset Input/Output
|
||||
|
||||
@@ -54,6 +54,12 @@ properties:
|
||||
- sophgo,sg2042-spi
|
||||
- thead,th1520-spi
|
||||
- const: snps,dw-apb-ssi
|
||||
- description: Vendor controllers which use snps,dwc-ssi-2.00a as fallback
|
||||
items:
|
||||
- enum:
|
||||
- starfive,jhb100-spi
|
||||
- const: snps,dwc-ssi-2.00a
|
||||
- const: snps,dwc-ssi-1.01a
|
||||
- description: Intel Keem Bay SPI Controller
|
||||
const: intel,keembay-ssi
|
||||
- description: Intel Mount Evans Integrated Management Complex SPI Controller
|
||||
|
||||
@@ -25,6 +25,7 @@ properties:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,hawi-spmi-pmic-arb
|
||||
- qcom,kaanapali-spmi-pmic-arb
|
||||
- const: qcom,glymur-spmi-pmic-arb
|
||||
- enum:
|
||||
|
||||
@@ -87,9 +87,12 @@ examples:
|
||||
amlogic,ao-secure = <&sec_AO>;
|
||||
};
|
||||
- |
|
||||
#include <dt-bindings/clock/amlogic,t7-peripherals-clkc.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
temperature-sensor@20000 {
|
||||
compatible = "amlogic,t7-thermal";
|
||||
reg = <0x0 0x20000 0x0 0x50>;
|
||||
reg = <0x20000 0x50>;
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clkc_periphs CLKID_TS>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
| arm64: | ok |
|
||||
| csky: | TODO |
|
||||
| hexagon: | TODO |
|
||||
| loongarch: | TODO |
|
||||
| loongarch: | ok |
|
||||
| m68k: | TODO |
|
||||
| microblaze: | TODO |
|
||||
| mips: | TODO |
|
||||
|
||||
@@ -256,7 +256,7 @@ these logs can be cleared by writing in the proper reset_history attribute.
|
||||
``/sys/kernel/debug/i2c/i2c-[X]/[X]-addr/``
|
||||
contains the following attributes:
|
||||
|
||||
======================= ==========================================
|
||||
============================== ==========================================================
|
||||
power1_failed_fault_log Set to 1 by a power1 fault occurring.
|
||||
power1_good_input_fault_log Set to 1 by a power1 good input fault occurring at PGIO3.
|
||||
in11_fet_short_fault_log Set to 1 when a FET-short fault occurs.
|
||||
@@ -264,4 +264,4 @@ in11_fet_bad_fault_log Set to 1 when a FET-BAD fault occurs.
|
||||
in0_lcrit_fault_log Set to 1 by a VIN undervoltage fault occurring.
|
||||
in0_crit_fault_log Set to 1 by a VIN overvoltage fault occurring.
|
||||
curr1_crit_fault_log Set to 1 by an overcurrent fault occurring.
|
||||
======================= ==========================================
|
||||
============================== ==========================================================
|
||||
|
||||
20
MAINTAINERS
20
MAINTAINERS
@@ -15733,8 +15733,8 @@ F: drivers/net/ethernet/marvell/octeon_ep_vf
|
||||
MARVELL OCTEONTX2 PHYSICAL FUNCTION DRIVER
|
||||
M: Sunil Goutham <sgoutham@marvell.com>
|
||||
M: Geetha sowjanya <gakula@marvell.com>
|
||||
M: Ratheesh Kannoth <rkannoth@marvell.com>
|
||||
M: Subbaraya Sundeep <sbhatta@marvell.com>
|
||||
M: hariprasad <hkelam@marvell.com>
|
||||
M: Bharat Bhushan <bbhushan2@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
@@ -15743,9 +15743,8 @@ F: include/linux/soc/marvell/octeontx2/
|
||||
|
||||
MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER
|
||||
M: Sunil Goutham <sgoutham@marvell.com>
|
||||
M: Linu Cherian <lcherian@marvell.com>
|
||||
M: Ratheesh Kannoth <rkannoth@marvell.com>
|
||||
M: Geetha sowjanya <gakula@marvell.com>
|
||||
M: hariprasad <hkelam@marvell.com>
|
||||
M: Subbaraya Sundeep <sbhatta@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
@@ -15753,8 +15752,8 @@ F: Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
|
||||
F: drivers/net/ethernet/marvell/octeontx2/af/
|
||||
|
||||
MARVELL PEM PMU DRIVER
|
||||
M: Linu Cherian <lcherian@marvell.com>
|
||||
M: Gowthami Thiagarajan <gthiagarajan@marvell.com>
|
||||
M: Geetha sowjanya <gakula@marvell.com>
|
||||
S: Supported
|
||||
F: drivers/perf/marvell_pem_pmu.c
|
||||
|
||||
@@ -18437,6 +18436,7 @@ F: drivers/net/ethernet/mucse/
|
||||
|
||||
MULTIFUNCTION DEVICES (MFD)
|
||||
M: Lee Jones <lee@kernel.org>
|
||||
L: mfd@lists.linux.dev
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
|
||||
F: Documentation/devicetree/bindings/mfd/
|
||||
@@ -27515,7 +27515,7 @@ F: drivers/net/ethernet/dec/tulip/
|
||||
|
||||
TUN/TAP DRIVER
|
||||
M: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
S: Maintained
|
||||
W: http://vtun.sourceforge.net/tun
|
||||
F: Documentation/networking/tuntap.rst
|
||||
@@ -28507,7 +28507,7 @@ F: include/uapi/linux/virtio_balloon.h
|
||||
|
||||
VIRTIO BLOCK AND SCSI DRIVERS
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
R: Paolo Bonzini <pbonzini@redhat.com>
|
||||
R: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
R: Eugenio Pérez <eperezma@redhat.com>
|
||||
@@ -28536,7 +28536,7 @@ F: include/uapi/linux/virtio_console.h
|
||||
|
||||
VIRTIO CORE
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
R: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
|
||||
R: Eugenio Pérez <eperezma@redhat.com>
|
||||
L: virtualization@lists.linux.dev
|
||||
@@ -28614,7 +28614,7 @@ F: include/uapi/linux/virtio_gpu.h
|
||||
|
||||
VIRTIO HOST (VHOST)
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
R: Eugenio Pérez <eperezma@redhat.com>
|
||||
L: kvm@vger.kernel.org
|
||||
L: virtualization@lists.linux.dev
|
||||
@@ -28629,7 +28629,7 @@ F: kernel/vhost_task.c
|
||||
|
||||
VIRTIO HOST (VHOST-SCSI)
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
M: Mike Christie <michael.christie@oracle.com>
|
||||
R: Paolo Bonzini <pbonzini@redhat.com>
|
||||
R: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
@@ -28669,7 +28669,7 @@ F: include/uapi/linux/virtio_mem.h
|
||||
|
||||
VIRTIO NET DRIVER
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: Jason Wang <jasowang@redhat.com>
|
||||
M: Jason Wang <jasowangio@gmail.com>
|
||||
R: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
|
||||
R: Eugenio Pérez <eperezma@redhat.com>
|
||||
L: netdev@vger.kernel.org
|
||||
|
||||
4
Makefile
4
Makefile
@@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 7
|
||||
PATCHLEVEL = 1
|
||||
PATCHLEVEL = 2
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION =
|
||||
EXTRAVERSION = -rc1
|
||||
NAME = Baby Opossum Posse
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@@ -559,6 +559,15 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,
|
||||
else
|
||||
alignment_mask = 0x7;
|
||||
offset = hw->address & alignment_mask;
|
||||
|
||||
/*
|
||||
* BAS is an 8-bit field in WCR/BCR; the shift below would
|
||||
* silently drop the high bits of ctrl.len when offset + len
|
||||
* exceeds 8, programming hardware to watch fewer bytes than
|
||||
* the user requested.
|
||||
*/
|
||||
if (((u32)hw->ctrl.len << offset) > ARM_BREAKPOINT_LEN_8)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hw->address &= ~alignment_mask;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <linux/static_call.h>
|
||||
#include <linux/memory.h>
|
||||
#include <asm/text-patching.h>
|
||||
#include <asm/insn.h>
|
||||
|
||||
void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
|
||||
{
|
||||
|
||||
@@ -1198,11 +1198,6 @@ static void __init map_mem(void)
|
||||
__map_memblock(start, end, pgprot_tagged(PAGE_KERNEL),
|
||||
flags);
|
||||
}
|
||||
|
||||
/* Map the kernel data/bss read-only in the linear map */
|
||||
__map_memblock(init_end, kernel_end, PAGE_KERNEL_RO, flags);
|
||||
flush_tlb_kernel_range((unsigned long)lm_alias(__init_end),
|
||||
(unsigned long)lm_alias(__bss_stop));
|
||||
}
|
||||
|
||||
void mark_rodata_ro(void)
|
||||
@@ -1221,6 +1216,12 @@ void mark_rodata_ro(void)
|
||||
update_mapping_prot(__pa_symbol(_text), (unsigned long)_text,
|
||||
(unsigned long)_stext - (unsigned long)_text,
|
||||
PAGE_KERNEL_RO);
|
||||
|
||||
/* Map the kernel data/bss read-only in the linear map */
|
||||
update_mapping_prot(__pa_symbol(__init_end),
|
||||
(unsigned long)lm_alias(__init_end),
|
||||
(unsigned long)__bss_stop - (unsigned long)__init_end,
|
||||
PAGE_KERNEL_RO);
|
||||
}
|
||||
|
||||
static void __init declare_vma(struct vm_struct *vma,
|
||||
|
||||
@@ -209,6 +209,7 @@ config LOONGARCH
|
||||
select SYSCTL_ARCH_UNALIGN_NO_WARN
|
||||
select SYSCTL_EXCEPTION_TRACE
|
||||
select SWIOTLB if 64BIT
|
||||
select THREAD_INFO_IN_TASK
|
||||
select TRACE_IRQFLAGS_SUPPORT
|
||||
select USE_PERCPU_NUMA_NODE_ID
|
||||
select USER_STACKTRACE_SUPPORT
|
||||
|
||||
@@ -405,6 +405,8 @@ uart0: serial@1ff40800 {
|
||||
i2c0: i2c@1ff48000 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1ff48000 0x0 0x0800>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
interrupt-parent = <&eiointc>;
|
||||
interrupts = <14>;
|
||||
status = "disabled";
|
||||
@@ -413,6 +415,8 @@ i2c0: i2c@1ff48000 {
|
||||
i2c@1ff48800 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1ff48800 0x0 0x0800>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
interrupt-parent = <&eiointc>;
|
||||
interrupts = <15>;
|
||||
status = "disabled";
|
||||
@@ -421,6 +425,8 @@ i2c@1ff48800 {
|
||||
i2c@1ff49000 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1ff49000 0x0 0x0800>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
interrupt-parent = <&eiointc>;
|
||||
interrupts = <16>;
|
||||
status = "disabled";
|
||||
@@ -429,6 +435,8 @@ i2c@1ff49000 {
|
||||
i2c@1ff49800 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1ff49800 0x0 0x0800>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
interrupt-parent = <&eiointc>;
|
||||
interrupts = <17>;
|
||||
status = "disabled";
|
||||
@@ -437,6 +445,8 @@ i2c@1ff49800 {
|
||||
i2c@1ff4a000 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1ff4a000 0x0 0x0800>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
interrupt-parent = <&eiointc>;
|
||||
interrupts = <18>;
|
||||
status = "disabled";
|
||||
@@ -445,6 +455,8 @@ i2c@1ff4a000 {
|
||||
i2c@1ff4a800 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1ff4a800 0x0 0x0800>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
interrupt-parent = <&eiointc>;
|
||||
interrupts = <19>;
|
||||
status = "disabled";
|
||||
|
||||
@@ -311,6 +311,8 @@ uart0: serial@1fe20000 {
|
||||
i2c2: i2c@1fe21000 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1fe21000 0x0 0x8>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
@@ -319,6 +321,8 @@ i2c2: i2c@1fe21000 {
|
||||
i2c3: i2c@1fe21800 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1fe21800 0x0 0x8>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
|
||||
@@ -239,6 +239,8 @@ rtc0: rtc@100d0100 {
|
||||
i2c@1fe00120 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1fe00120 0x0 0x8>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_MISC_CLK>;
|
||||
interrupt-parent = <&liointc>;
|
||||
interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
@@ -247,6 +249,8 @@ i2c@1fe00120 {
|
||||
i2c@1fe00130 {
|
||||
compatible = "loongson,ls2k-i2c";
|
||||
reg = <0x0 0x1fe00130 0x0 0x8>;
|
||||
clock-frequency = <100000>;
|
||||
clocks = <&clk LOONGSON2_MISC_CLK>;
|
||||
interrupt-parent = <&liointc>;
|
||||
interrupts = <9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
|
||||
@@ -38,6 +38,8 @@ static inline bool acpi_has_cpu_in_madt(void)
|
||||
extern struct list_head acpi_wakeup_device_list;
|
||||
extern struct acpi_madt_core_pic acpi_core_pic[MAX_CORE_PIC];
|
||||
|
||||
extern void acpi_add_early_pio(void);
|
||||
extern void acpi_remove_early_pio(void);
|
||||
extern int __init parse_acpi_topology(void);
|
||||
|
||||
#endif /* !CONFIG_ACPI */
|
||||
|
||||
31
arch/loongarch/include/asm/current.h
Normal file
31
arch/loongarch/include/asm/current.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __ASM_LOONGARCH_CURRENT_H
|
||||
#define __ASM_LOONGARCH_CURRENT_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <asm/percpu.h>
|
||||
|
||||
struct task_struct;
|
||||
|
||||
DECLARE_PER_CPU(struct task_struct *, cpu_tasks);
|
||||
|
||||
register struct task_struct *current_thread_pointer __asm__("$tp");
|
||||
|
||||
static __always_inline struct task_struct *get_current(void)
|
||||
{
|
||||
return current_thread_pointer;
|
||||
}
|
||||
|
||||
#define current get_current()
|
||||
|
||||
static __always_inline void set_current(struct task_struct *task)
|
||||
{
|
||||
__this_cpu_write(cpu_tasks, task);
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* __ASM_LOONGARCH_CURRENT_H */
|
||||
@@ -41,6 +41,8 @@ struct kimage_arch {
|
||||
unsigned long systable_ptr;
|
||||
};
|
||||
|
||||
struct kimage;
|
||||
|
||||
#ifdef CONFIG_KEXEC_FILE
|
||||
extern const struct kexec_file_ops kexec_efi_ops;
|
||||
extern const struct kexec_file_ops kexec_elf_ops;
|
||||
@@ -59,7 +61,6 @@ typedef void (*do_kexec_t)(unsigned long efi_boot,
|
||||
unsigned long start_addr,
|
||||
unsigned long first_ind_entry);
|
||||
|
||||
struct kimage;
|
||||
extern const unsigned char relocate_new_kernel[];
|
||||
extern const size_t relocate_new_kernel_size;
|
||||
extern void kexec_reboot(void);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#ifndef __ASM_PERCPU_H
|
||||
#define __ASM_PERCPU_H
|
||||
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm/loongarch.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -429,6 +429,8 @@ static inline pte_t pte_mkwrite_novma(pte_t pte)
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
if (pte_val(pte) & _PAGE_DIRTY)
|
||||
pte_val(pte) |= _PAGE_MODIFIED;
|
||||
pte_val(pte) &= ~(_PAGE_WRITE | _PAGE_DIRTY);
|
||||
return pte;
|
||||
}
|
||||
@@ -535,6 +537,8 @@ static inline pmd_t pmd_mkwrite_novma(pmd_t pmd)
|
||||
|
||||
static inline pmd_t pmd_wrprotect(pmd_t pmd)
|
||||
{
|
||||
if (pmd_val(pmd) & _PAGE_DIRTY)
|
||||
pmd_val(pmd) |= _PAGE_MODIFIED;
|
||||
pmd_val(pmd) &= ~(_PAGE_WRITE | _PAGE_DIRTY);
|
||||
return pmd;
|
||||
}
|
||||
|
||||
@@ -81,8 +81,9 @@ extern int __cpu_logical_map[NR_CPUS];
|
||||
struct seq_file;
|
||||
|
||||
struct secondary_data {
|
||||
unsigned long task;
|
||||
unsigned long stack;
|
||||
unsigned long thread_info;
|
||||
unsigned long offset;
|
||||
};
|
||||
extern struct secondary_data cpuboot_data;
|
||||
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
.cfi_rel_offset ra, PT_ERA
|
||||
.endif
|
||||
cfi_st tp, PT_R2, \docfi
|
||||
cfi_st u0, PT_R21, \docfi
|
||||
cfi_st fp, PT_R22, \docfi
|
||||
|
||||
/* Set thread_info if we're coming from user mode */
|
||||
@@ -191,10 +192,13 @@
|
||||
andi t0, t0, 0x3 /* extract pplv bit */
|
||||
beqz t0, 9f
|
||||
|
||||
LONG_LI tp, ~_THREAD_MASK
|
||||
and tp, tp, sp
|
||||
cfi_st u0, PT_R21, \docfi
|
||||
csrrd u0, PERCPU_BASE_KS
|
||||
|
||||
la_abs t1, cpu_tasks
|
||||
#ifdef CONFIG_SMP
|
||||
LONG_ADD t1, t1, u0
|
||||
#endif
|
||||
LONG_L tp, t1, 0
|
||||
9:
|
||||
#ifdef CONFIG_KGDB
|
||||
li.w t0, CSR_CRMD_WE
|
||||
|
||||
@@ -15,7 +15,6 @@ struct task_struct;
|
||||
* __switch_to - switch execution of a task
|
||||
* @prev: The task previously executed.
|
||||
* @next: The task to begin executing.
|
||||
* @next_ti: task_thread_info(next).
|
||||
* @sched_ra: __schedule return address.
|
||||
* @sched_cfa: __schedule call frame address.
|
||||
*
|
||||
@@ -23,8 +22,7 @@ struct task_struct;
|
||||
* the context of next. Returns prev.
|
||||
*/
|
||||
extern asmlinkage struct task_struct *__switch_to(struct task_struct *prev,
|
||||
struct task_struct *next, struct thread_info *next_ti,
|
||||
void *sched_ra, void *sched_cfa);
|
||||
struct task_struct *next, void *sched_ra, void *sched_cfa);
|
||||
|
||||
/*
|
||||
* For newly created kernel threads switch_to() will return to
|
||||
@@ -37,7 +35,8 @@ do { \
|
||||
lose_fpu_inatomic(1, prev); \
|
||||
lose_lbt_inatomic(1, prev); \
|
||||
hw_breakpoint_thread_switch(next); \
|
||||
(last) = __switch_to(prev, next, task_thread_info(next), \
|
||||
set_current(next); \
|
||||
(last) = __switch_to(prev, next, \
|
||||
__builtin_return_address(0), __builtin_frame_address(0)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
* must also be changed
|
||||
*/
|
||||
struct thread_info {
|
||||
struct task_struct *task; /* main task structure */
|
||||
unsigned long flags; /* low level flags */
|
||||
unsigned long tp_value; /* thread pointer */
|
||||
__u32 cpu; /* current CPU */
|
||||
@@ -37,20 +36,11 @@ struct thread_info {
|
||||
*/
|
||||
#define INIT_THREAD_INFO(tsk) \
|
||||
{ \
|
||||
.task = &tsk, \
|
||||
.flags = _TIF_FIXADE, \
|
||||
.cpu = 0, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
}
|
||||
|
||||
/* How to get the thread information struct from C. */
|
||||
register struct thread_info *__current_thread_info __asm__("$tp");
|
||||
|
||||
static inline struct thread_info *current_thread_info(void)
|
||||
{
|
||||
return __current_thread_info;
|
||||
}
|
||||
|
||||
register unsigned long current_stack_pointer __asm__("$sp");
|
||||
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/numa.h>
|
||||
#include <asm/loongson.h>
|
||||
@@ -59,6 +60,33 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
|
||||
return ioremap_cache(phys, size);
|
||||
}
|
||||
|
||||
#define PIO_BASE (unsigned long)PCI_IOBASE
|
||||
#define PIO_SIZE ALIGN(ISA_IOSIZE, PAGE_SIZE)
|
||||
|
||||
static bool acpi_pio;
|
||||
|
||||
/* Add PIO for early access */
|
||||
void acpi_add_early_pio(void)
|
||||
{
|
||||
if (!acpi_disabled) {
|
||||
acpi_pio = true;
|
||||
vmap_page_range(PIO_BASE, PIO_BASE + PIO_SIZE,
|
||||
LOONGSON_LIO_BASE, pgprot_device(PAGE_KERNEL));
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove PIO for PCI register */
|
||||
void acpi_remove_early_pio(void)
|
||||
{
|
||||
if (!acpi_pio)
|
||||
return;
|
||||
|
||||
if (!acpi_disabled) {
|
||||
acpi_pio = false;
|
||||
vunmap_range(PIO_BASE, PIO_BASE + PIO_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static int set_processor_mask(u32 id, u32 pass)
|
||||
{
|
||||
|
||||
@@ -70,7 +70,7 @@ static void __used output_task_defines(void)
|
||||
{
|
||||
COMMENT("LoongArch task_struct offsets.");
|
||||
OFFSET(TASK_STATE, task_struct, __state);
|
||||
OFFSET(TASK_THREAD_INFO, task_struct, stack);
|
||||
OFFSET(TASK_STACK, task_struct, stack);
|
||||
OFFSET(TASK_FLAGS, task_struct, flags);
|
||||
OFFSET(TASK_MM, task_struct, mm);
|
||||
OFFSET(TASK_PID, task_struct, pid);
|
||||
@@ -84,7 +84,6 @@ static void __used output_task_defines(void)
|
||||
static void __used output_thread_info_defines(void)
|
||||
{
|
||||
COMMENT("LoongArch thread_info offsets.");
|
||||
OFFSET(TI_TASK, thread_info, task);
|
||||
OFFSET(TI_FLAGS, thread_info, flags);
|
||||
OFFSET(TI_TP_VALUE, thread_info, tp_value);
|
||||
OFFSET(TI_CPU, thread_info, cpu);
|
||||
@@ -266,8 +265,9 @@ static void __used output_signal_defines(void)
|
||||
static void __used output_smpboot_defines(void)
|
||||
{
|
||||
COMMENT("Linux smp cpu boot offsets.");
|
||||
OFFSET(CPU_BOOT_TASK, secondary_data, task);
|
||||
OFFSET(CPU_BOOT_STACK, secondary_data, stack);
|
||||
OFFSET(CPU_BOOT_TINFO, secondary_data, thread_info);
|
||||
OFFSET(CPU_BOOT_OFFSET, secondary_data, offset);
|
||||
BLANK();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -67,8 +67,11 @@ SYM_CODE_START(handle_syscall)
|
||||
#endif
|
||||
|
||||
move u0, t0
|
||||
LONG_LI tp, ~_THREAD_MASK
|
||||
and tp, tp, sp
|
||||
la_abs t1, cpu_tasks
|
||||
#ifdef CONFIG_SMP
|
||||
LONG_ADD t1, t1, u0
|
||||
#endif
|
||||
LONG_L tp, t1, 0
|
||||
|
||||
move a0, sp
|
||||
bl do_syscall
|
||||
|
||||
@@ -74,10 +74,11 @@ SYM_CODE_START(kernel_entry) # kernel entry point
|
||||
/* GPR21 used for percpu base (runtime), initialized as 0 */
|
||||
move u0, zero
|
||||
|
||||
la.pcrel tp, init_thread_union
|
||||
/* Set the SP after an empty pt_regs. */
|
||||
PTR_LI sp, (_THREAD_SIZE - PT_SIZE)
|
||||
PTR_ADD sp, sp, tp
|
||||
la.pcrel tp, init_task
|
||||
la.pcrel t0, init_stack
|
||||
PTR_LI t1, _THREAD_SIZE
|
||||
PTR_ADD t0, t0, t1
|
||||
PTR_ADDI sp, t0, -PT_SIZE
|
||||
set_saved_sp sp, t0, t1
|
||||
|
||||
#ifdef CONFIG_RELOCATABLE
|
||||
@@ -86,8 +87,10 @@ SYM_CODE_START(kernel_entry) # kernel entry point
|
||||
|
||||
#ifdef CONFIG_RANDOMIZE_BASE
|
||||
/* Repoint the sp into the new kernel */
|
||||
PTR_LI sp, (_THREAD_SIZE - PT_SIZE)
|
||||
PTR_ADD sp, sp, tp
|
||||
LONG_LPTR t0, tp, TASK_STACK
|
||||
PTR_LI t1, _THREAD_SIZE
|
||||
PTR_ADD t0, t0, t1
|
||||
PTR_ADDI sp, t0, -PT_SIZE
|
||||
set_saved_sp sp, t0, t1
|
||||
|
||||
/* Jump to the new kernel: new_pc = current_pc + random_offset */
|
||||
@@ -127,8 +130,9 @@ SYM_CODE_START(smpboot_entry)
|
||||
csrxchg t0, t1, LOONGARCH_CSR_IMPCTL1
|
||||
#endif
|
||||
la.pcrel t0, cpuboot_data
|
||||
ld.d tp, t0, CPU_BOOT_TASK
|
||||
ld.d sp, t0, CPU_BOOT_STACK
|
||||
ld.d tp, t0, CPU_BOOT_TINFO
|
||||
ld.d u0, t0, CPU_BOOT_OFFSET
|
||||
|
||||
bl start_secondary
|
||||
ASM_BUG()
|
||||
|
||||
@@ -60,6 +60,8 @@ unsigned long __stack_chk_guard __read_mostly;
|
||||
EXPORT_SYMBOL(__stack_chk_guard);
|
||||
#endif
|
||||
|
||||
DEFINE_PER_CPU(struct task_struct *, cpu_tasks);
|
||||
|
||||
/*
|
||||
* Idle related variables and functions
|
||||
*/
|
||||
|
||||
@@ -313,7 +313,7 @@ unsigned long __init relocate_kernel(void)
|
||||
reloc_offset += random_offset;
|
||||
|
||||
/* The current thread is now within the relocated kernel */
|
||||
__current_thread_info = RELOCATED_KASLR(__current_thread_info);
|
||||
current_thread_pointer = RELOCATED_KASLR(current_thread_pointer);
|
||||
|
||||
update_reloc_offset(&reloc_offset, random_offset);
|
||||
}
|
||||
|
||||
@@ -502,6 +502,8 @@ static __init int arch_reserve_pio_range(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
|
||||
acpi_add_early_pio();
|
||||
|
||||
for_each_node_by_name(np, "isa") {
|
||||
struct of_range range;
|
||||
struct of_range_parser parser;
|
||||
@@ -593,6 +595,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
cpu_probe();
|
||||
unwind_init();
|
||||
set_current(current);
|
||||
|
||||
init_environ();
|
||||
efi_init();
|
||||
|
||||
@@ -400,8 +400,9 @@ void loongson_boot_secondary(int cpu, struct task_struct *idle)
|
||||
pr_info("Booting CPU#%d...\n", cpu);
|
||||
|
||||
entry = __pa_symbol((unsigned long)&smpboot_entry);
|
||||
cpuboot_data.stack = (unsigned long)__KSTK_TOS(idle);
|
||||
cpuboot_data.thread_info = (unsigned long)task_thread_info(idle);
|
||||
cpuboot_data.task = (unsigned long)idle;
|
||||
cpuboot_data.stack = (unsigned long)task_pt_regs(idle);
|
||||
cpuboot_data.offset = per_cpu_offset(cpu);
|
||||
|
||||
csr_mail_send(entry, cpu_logical_map(cpu), 0);
|
||||
|
||||
@@ -663,6 +664,7 @@ asmlinkage void start_secondary(void)
|
||||
set_my_cpu_offset(per_cpu_offset(cpu));
|
||||
|
||||
cpu_probe();
|
||||
set_current(current);
|
||||
constant_clockevent_init();
|
||||
loongson_init_secondary();
|
||||
|
||||
@@ -705,6 +707,7 @@ static void stop_this_cpu(void *dummy)
|
||||
set_cpu_online(smp_processor_id(), false);
|
||||
calculate_cpu_foreign_map();
|
||||
local_irq_disable();
|
||||
rcutree_report_cpu_dead();
|
||||
while (true);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/*
|
||||
* task_struct *__switch_to(task_struct *prev, task_struct *next,
|
||||
* struct thread_info *next_ti, void *sched_ra, void *sched_cfa)
|
||||
* void *sched_ra, void *sched_cfa)
|
||||
*/
|
||||
.align 5
|
||||
SYM_FUNC_START(__switch_to)
|
||||
@@ -24,8 +24,8 @@ SYM_FUNC_START(__switch_to)
|
||||
LONG_SPTR t1, a0, (THREAD_CSRPRMD - TASK_STRUCT_OFFSET)
|
||||
|
||||
cpu_save_nonscratch a0
|
||||
LONG_SPTR a3, a0, (THREAD_SCHED_RA - TASK_STRUCT_OFFSET)
|
||||
LONG_SPTR a4, a0, (THREAD_SCHED_CFA - TASK_STRUCT_OFFSET)
|
||||
LONG_SPTR a2, a0, (THREAD_SCHED_RA - TASK_STRUCT_OFFSET)
|
||||
LONG_SPTR a3, a0, (THREAD_SCHED_CFA - TASK_STRUCT_OFFSET)
|
||||
|
||||
#if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_SMP)
|
||||
la t7, __stack_chk_guard
|
||||
@@ -33,11 +33,12 @@ SYM_FUNC_START(__switch_to)
|
||||
LONG_SPTR t8, t7, 0
|
||||
#endif
|
||||
|
||||
move tp, a2
|
||||
move tp, a1
|
||||
cpu_restore_nonscratch a1
|
||||
|
||||
li.w t0, _THREAD_SIZE
|
||||
PTR_ADD t0, t0, tp
|
||||
LONG_LPTR t0, a1, (TASK_STACK - TASK_STRUCT_OFFSET)
|
||||
PTR_LI t1, _THREAD_SIZE
|
||||
PTR_ADD t0, t0, t1
|
||||
set_saved_sp t0, t1, t2
|
||||
|
||||
LONG_LPTR t1, a1, (THREAD_CSRPRMD - TASK_STRUCT_OFFSET)
|
||||
@@ -45,6 +46,7 @@ SYM_FUNC_START(__switch_to)
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
PTR_ADDI a0, a0, -TASK_STRUCT_OFFSET
|
||||
PTR_ADDI tp, tp, -TASK_STRUCT_OFFSET
|
||||
#endif
|
||||
jr ra
|
||||
SYM_FUNC_END(__switch_to)
|
||||
|
||||
@@ -107,6 +107,12 @@ static void show_stacktrace(struct task_struct *task,
|
||||
unsigned long stackdata;
|
||||
unsigned long *sp = (unsigned long *)regs->regs[3];
|
||||
|
||||
if (!task)
|
||||
task = current;
|
||||
|
||||
if (!try_get_task_stack(task))
|
||||
return;
|
||||
|
||||
printk("%sStack :", loglvl);
|
||||
i = 0;
|
||||
while ((unsigned long) sp & (PAGE_SIZE - 1)) {
|
||||
@@ -129,6 +135,8 @@ static void show_stacktrace(struct task_struct *task,
|
||||
}
|
||||
pr_cont("\n");
|
||||
show_backtrace(task, regs, loglvl, user);
|
||||
|
||||
put_task_stack(task);
|
||||
}
|
||||
|
||||
void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
|
||||
|
||||
@@ -234,5 +234,5 @@ int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid)
|
||||
clear = __pgprot(_PAGE_PRESENT | _PAGE_VALID);
|
||||
}
|
||||
|
||||
return __set_memory(addr, 1, set, clear);
|
||||
return __set_memory(addr, nr, set, clear);
|
||||
}
|
||||
|
||||
@@ -5,11 +5,18 @@
|
||||
* Copyright (C) 2022 Loongson Technology Corporation Limited
|
||||
*/
|
||||
#include <linux/memory.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include "bpf_jit.h"
|
||||
|
||||
#define LOONGARCH_MAX_REG_ARGS 8
|
||||
|
||||
#define LOONGARCH_SAVE_RA_NINSNS 1
|
||||
#define LOONGARCH_LONG_JUMP_NINSNS 5
|
||||
#define LOONGARCH_TCC_SLOT_NINSNS 1
|
||||
|
||||
#define LOONGARCH_PROLOGUE_SKIP_INSNS \
|
||||
(LOONGARCH_SAVE_RA_NINSNS + LOONGARCH_LONG_JUMP_NINSNS + LOONGARCH_TCC_SLOT_NINSNS)
|
||||
|
||||
#define LOONGARCH_LONG_JUMP_NBYTES (LOONGARCH_LONG_JUMP_NINSNS * 4)
|
||||
|
||||
#define LOONGARCH_FENTRY_NINSNS 2
|
||||
@@ -143,8 +150,13 @@ static void build_prologue(struct jit_ctx *ctx)
|
||||
stack_adjust = round_up(stack_adjust, 16);
|
||||
stack_adjust += bpf_stack_adjust;
|
||||
|
||||
/*
|
||||
* Save the original return address to a temporary register to prevent
|
||||
* it from being overwritten, then reserve space for the long jump and
|
||||
* fentry trampoline slot for dynamically patching by ftrace at runtime.
|
||||
* These instructions are bypassed during a tail call invocation.
|
||||
*/
|
||||
move_reg(ctx, LOONGARCH_GPR_T0, LOONGARCH_GPR_RA);
|
||||
/* Reserve space for the move_imm + jirl instruction */
|
||||
for (i = 0; i < LOONGARCH_LONG_JUMP_NINSNS; i++)
|
||||
emit_insn(ctx, nop);
|
||||
|
||||
@@ -253,10 +265,11 @@ static void __build_epilogue(struct jit_ctx *ctx, bool is_tail_call)
|
||||
emit_insn(ctx, jirl, LOONGARCH_GPR_ZERO, LOONGARCH_GPR_RA, 0);
|
||||
} else {
|
||||
/*
|
||||
* Call the next bpf prog and skip the first instruction
|
||||
* of TCC initialization.
|
||||
* Tail call to the next BPF program, passing offset in number
|
||||
* of instructions to jirl to bypass the initial setup slots.
|
||||
*/
|
||||
emit_insn(ctx, jirl, LOONGARCH_GPR_ZERO, LOONGARCH_GPR_T3, 7);
|
||||
emit_insn(ctx, jirl, LOONGARCH_GPR_ZERO,
|
||||
LOONGARCH_GPR_T3, LOONGARCH_PROLOGUE_SKIP_INSNS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,12 +325,12 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx, int insn)
|
||||
*/
|
||||
emit_insn(ctx, ldd, REG_TCC, LOONGARCH_GPR_SP, tcc_ptr_off);
|
||||
emit_insn(ctx, ldd, t3, REG_TCC, 0);
|
||||
emit_insn(ctx, addid, t3, t3, 1);
|
||||
emit_insn(ctx, std, t3, REG_TCC, 0);
|
||||
emit_insn(ctx, addid, t2, LOONGARCH_GPR_ZERO, MAX_TAIL_CALL_CNT);
|
||||
if (emit_tailcall_jmp(ctx, BPF_JSGT, t3, t2, jmp_offset) < 0)
|
||||
if (emit_tailcall_jmp(ctx, BPF_JSGE, t3, t2, jmp_offset) < 0)
|
||||
goto toofar;
|
||||
|
||||
emit_insn(ctx, addid, t3, t3, 1);
|
||||
|
||||
/*
|
||||
* prog = array->ptrs[index];
|
||||
* if (!prog)
|
||||
@@ -330,6 +343,8 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx, int insn)
|
||||
if (emit_tailcall_jmp(ctx, BPF_JEQ, t2, LOONGARCH_GPR_ZERO, jmp_offset) < 0)
|
||||
goto toofar;
|
||||
|
||||
emit_insn(ctx, std, t3, REG_TCC, 0);
|
||||
|
||||
/* goto *(prog->bpf_func + 4); */
|
||||
off = offsetof(struct bpf_prog, bpf_func);
|
||||
emit_insn(ctx, ldd, t3, t2, off);
|
||||
@@ -1147,6 +1162,19 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext
|
||||
|
||||
/* function call */
|
||||
case BPF_JMP | BPF_CALL:
|
||||
/* Implement helper call to bpf_get_current_task/_btf() inline */
|
||||
if (insn->src_reg == 0 && (insn->imm == BPF_FUNC_get_current_task ||
|
||||
insn->imm == BPF_FUNC_get_current_task_btf)) {
|
||||
move_reg(ctx, regmap[BPF_REG_0], LOONGARCH_GPR_TP);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Implement helper call to bpf_get_smp_processor_id() inline */
|
||||
if (insn->src_reg == 0 && insn->imm == BPF_FUNC_get_smp_processor_id) {
|
||||
emit_insn(ctx, ldwu, regmap[BPF_REG_0], LOONGARCH_GPR_TP, TI_CPU);
|
||||
break;
|
||||
}
|
||||
|
||||
ret = bpf_jit_get_func_addr(ctx->prog, insn, extra_pass,
|
||||
&func_addr, &func_addr_fixed);
|
||||
if (ret < 0)
|
||||
@@ -2367,3 +2395,15 @@ bool bpf_jit_supports_subprog_tailcalls(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool bpf_jit_inlines_helper_call(s32 imm)
|
||||
{
|
||||
switch (imm) {
|
||||
case BPF_FUNC_get_current_task:
|
||||
case BPF_FUNC_get_current_task_btf:
|
||||
case BPF_FUNC_get_smp_processor_id:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,8 @@ static int acpi_prepare_root_resources(struct acpi_pci_root_info *ci)
|
||||
struct resource_entry *entry, *tmp;
|
||||
struct acpi_device *device = ci->bridge;
|
||||
|
||||
acpi_remove_early_pio();
|
||||
|
||||
status = acpi_pci_probe_root_resources(ci);
|
||||
if (status > 0) {
|
||||
acpi_evaluate_integer(device->handle, "PCIH", NULL, &pci_h);
|
||||
|
||||
@@ -7,9 +7,12 @@
|
||||
|
||||
#include <asm/vdso/vdso.h>
|
||||
|
||||
#include <linux/build-salt.h>
|
||||
#include <linux/elfnote.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
ELFNOTE_START(Linux, 0, "a")
|
||||
.long LINUX_VERSION_CODE
|
||||
ELFNOTE_END
|
||||
|
||||
BUILD_SALT
|
||||
|
||||
@@ -1300,7 +1300,7 @@ int amdxdna_drm_sync_bo_ioctl(struct drm_device *dev,
|
||||
args->handle, args->offset, args->size);
|
||||
|
||||
if (args->direction == SYNC_DIRECT_FROM_DEVICE)
|
||||
ret = amdxdna_hwctx_sync_debug_bo(abo->client, args->handle);
|
||||
ret = amdxdna_hwctx_sync_debug_bo(client, args->handle);
|
||||
|
||||
put_obj:
|
||||
drm_gem_object_put(gobj);
|
||||
|
||||
@@ -208,9 +208,9 @@ static int ivpu_hws_cmdq_init(struct ivpu_file_priv *file_priv, struct ivpu_cmdq
|
||||
ret = ivpu_jsm_hws_set_context_sched_properties(vdev, file_priv->ctx.id, cmdq->id,
|
||||
priority);
|
||||
if (ret)
|
||||
return ret;
|
||||
ivpu_jsm_hws_destroy_cmdq(vdev, file_priv->ctx.id, cmdq->id);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ivpu_register_db(struct ivpu_file_priv *file_priv, struct ivpu_cmdq *cmdq)
|
||||
@@ -281,10 +281,10 @@ static int ivpu_cmdq_register(struct ivpu_file_priv *file_priv, struct ivpu_cmdq
|
||||
}
|
||||
|
||||
ret = ivpu_register_db(file_priv, cmdq);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (ret && vdev->fw->sched_mode == VPU_SCHEDULING_MODE_HW)
|
||||
ivpu_jsm_hws_destroy_cmdq(vdev, file_priv->ctx.id, cmdq->id);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ivpu_cmdq_unregister(struct ivpu_file_priv *file_priv, struct ivpu_cmdq *cmdq)
|
||||
|
||||
@@ -490,7 +490,7 @@ static void ipmi_bmc_gone(int iface)
|
||||
mutex_lock(&driver_data.ipmi_lock);
|
||||
list_for_each_entry_safe(iter, temp,
|
||||
&driver_data.ipmi_devices, head) {
|
||||
if (iter->ipmi_ifnum != iface) {
|
||||
if (iter->ipmi_ifnum == iface) {
|
||||
ipmi_device = iter;
|
||||
__ipmi_dev_kill(iter);
|
||||
break;
|
||||
|
||||
@@ -168,7 +168,16 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size)
|
||||
{
|
||||
/* Always terminate destination string */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
strscpy_pad(dest, source, dest_size);
|
||||
#else
|
||||
/*
|
||||
* strscpy_pad() is not defined in ACPICA tools builds, so use strncpy()
|
||||
* and directly NUL-terminate the destination string in that case.
|
||||
*/
|
||||
strncpy(dest, source, dest_size);
|
||||
dest[dest_size - 1] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1143,7 +1143,7 @@ static int acpi_processor_get_lpi_info(struct acpi_processor *pr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
|
||||
int __weak __cpuidle acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -1156,7 +1156,7 @@ int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
|
||||
*
|
||||
* Return: 0 for success or negative value for error
|
||||
*/
|
||||
static int acpi_idle_lpi_enter(struct cpuidle_device *dev,
|
||||
static int __cpuidle acpi_idle_lpi_enter(struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv, int index)
|
||||
{
|
||||
struct acpi_processor *pr;
|
||||
|
||||
@@ -871,7 +871,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index,
|
||||
EXPORT_SYMBOL_GPL(acpi_dev_resource_interrupt);
|
||||
|
||||
/**
|
||||
* acpi_dev_free_resource_list - Free resource from %acpi_dev_get_resources().
|
||||
* acpi_dev_free_resource_list - Free resource from acpi_dev_get_resources().
|
||||
* @list: The head of the resource list to free.
|
||||
*/
|
||||
void acpi_dev_free_resource_list(struct list_head *list)
|
||||
@@ -991,7 +991,7 @@ static int __acpi_dev_get_resources(struct acpi_device *adev,
|
||||
*
|
||||
* The resultant struct resource objects are put on the list pointed to by
|
||||
* @list, that must be empty initially, as members of struct resource_entry
|
||||
* objects. Callers of this routine should use %acpi_dev_free_resource_list() to
|
||||
* objects. Callers of this routine should use acpi_dev_free_resource_list() to
|
||||
* free that list.
|
||||
*
|
||||
* The number of resources in the output list is returned on success, an error
|
||||
@@ -1032,7 +1032,7 @@ static int is_memory(struct acpi_resource *ares, void *not_used)
|
||||
* The resultant struct resource objects are put on the list pointed to
|
||||
* by @list, that must be empty initially, as members of struct
|
||||
* resource_entry objects. Callers of this routine should use
|
||||
* %acpi_dev_free_resource_list() to free that list.
|
||||
* acpi_dev_free_resource_list() to free that list.
|
||||
*
|
||||
* The number of resources in the output list is returned on success,
|
||||
* an error code reflecting the error condition is returned otherwise.
|
||||
|
||||
@@ -66,7 +66,7 @@ int acpi_processor_ffh_lpi_probe(unsigned int cpu)
|
||||
return acpi_cpu_init_idle(cpu);
|
||||
}
|
||||
|
||||
int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
|
||||
int __cpuidle acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
|
||||
{
|
||||
u32 state = lpi->address;
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
#ifdef CONFIG_ACPI_DEBUG
|
||||
/*
|
||||
* ACPI debug sysfs I/F, including:
|
||||
* /sys/modules/acpi/parameters/debug_layer
|
||||
* /sys/modules/acpi/parameters/debug_level
|
||||
* /sys/modules/acpi/parameters/trace_method_name
|
||||
* /sys/modules/acpi/parameters/trace_state
|
||||
* /sys/modules/acpi/parameters/trace_debug_layer
|
||||
* /sys/modules/acpi/parameters/trace_debug_level
|
||||
* /sys/module/acpi/parameters/debug_layer
|
||||
* /sys/module/acpi/parameters/debug_level
|
||||
* /sys/module/acpi/parameters/trace_method_name
|
||||
* /sys/module/acpi/parameters/trace_state
|
||||
* /sys/module/acpi/parameters/trace_debug_layer
|
||||
* /sys/module/acpi/parameters/trace_debug_level
|
||||
*/
|
||||
|
||||
struct acpi_dlayer {
|
||||
@@ -269,7 +269,7 @@ module_param_call(trace_state, param_set_trace_state, param_get_trace_state,
|
||||
#endif /* CONFIG_ACPI_DEBUG */
|
||||
|
||||
|
||||
/* /sys/modules/acpi/parameters/aml_debug_output */
|
||||
/* /sys/module/acpi/parameters/aml_debug_output */
|
||||
|
||||
module_param_named(aml_debug_output, acpi_gbl_enable_aml_debug_object,
|
||||
byte, 0644);
|
||||
|
||||
@@ -245,7 +245,7 @@ int regcache_init(struct regmap *map, const struct regmap_config *config)
|
||||
if (map->cache_ops->exit) {
|
||||
dev_dbg(map->dev, "Destroying %s cache\n", map->cache_ops->name);
|
||||
map->lock(map->lock_arg);
|
||||
ret = map->cache_ops->exit(map);
|
||||
map->cache_ops->exit(map);
|
||||
map->unlock(map->lock_arg);
|
||||
}
|
||||
err_free_reg_defaults:
|
||||
|
||||
@@ -580,14 +580,7 @@ static const struct bus_type rbd_bus_type = {
|
||||
.bus_groups = rbd_bus_groups,
|
||||
};
|
||||
|
||||
static void rbd_root_dev_release(struct device *dev)
|
||||
{
|
||||
}
|
||||
|
||||
static struct device rbd_root_dev = {
|
||||
.init_name = "rbd",
|
||||
.release = rbd_root_dev_release,
|
||||
};
|
||||
static struct device *rbd_root_dev;
|
||||
|
||||
static __printf(2, 3)
|
||||
void rbd_warn(struct rbd_device *rbd_dev, const char *fmt, ...)
|
||||
@@ -5378,7 +5371,7 @@ static struct rbd_device *__rbd_dev_create(struct rbd_spec *spec)
|
||||
|
||||
rbd_dev->dev.bus = &rbd_bus_type;
|
||||
rbd_dev->dev.type = &rbd_device_type;
|
||||
rbd_dev->dev.parent = &rbd_root_dev;
|
||||
rbd_dev->dev.parent = rbd_root_dev;
|
||||
device_initialize(&rbd_dev->dev);
|
||||
|
||||
return rbd_dev;
|
||||
@@ -7324,15 +7317,13 @@ static int __init rbd_sysfs_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = device_register(&rbd_root_dev);
|
||||
if (ret < 0) {
|
||||
put_device(&rbd_root_dev);
|
||||
return ret;
|
||||
}
|
||||
rbd_root_dev = root_device_register("rbd");
|
||||
if (IS_ERR(rbd_root_dev))
|
||||
return PTR_ERR(rbd_root_dev);
|
||||
|
||||
ret = bus_register(&rbd_bus_type);
|
||||
if (ret < 0)
|
||||
device_unregister(&rbd_root_dev);
|
||||
root_device_unregister(rbd_root_dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -7340,7 +7331,7 @@ static int __init rbd_sysfs_init(void)
|
||||
static void __exit rbd_sysfs_cleanup(void)
|
||||
{
|
||||
bus_unregister(&rbd_bus_type);
|
||||
device_unregister(&rbd_root_dev);
|
||||
root_device_unregister(rbd_root_dev);
|
||||
}
|
||||
|
||||
static int __init rbd_slab_init(void)
|
||||
|
||||
@@ -480,6 +480,12 @@ config COMMON_CLK_K210
|
||||
help
|
||||
Support for the Canaan Kendryte K210 RISC-V SoC clocks.
|
||||
|
||||
config COMMON_CLK_K230
|
||||
bool "Clock driver for the Canaan Kendryte K230 SoC"
|
||||
depends on ARCH_CANAAN || COMPILE_TEST
|
||||
help
|
||||
Support for the Canaan Kendryte K230 RISC-V SoC clocks.
|
||||
|
||||
config COMMON_CLK_SP7021
|
||||
tristate "Clock driver for Sunplus SP7021 SoC"
|
||||
depends on SOC_SP7021 || COMPILE_TEST
|
||||
|
||||
@@ -65,6 +65,7 @@ obj-$(CONFIG_COMMON_CLK_GEMINI) += clk-gemini.o
|
||||
obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o
|
||||
obj-$(CONFIG_CLK_HSDK) += clk-hsdk-pll.o
|
||||
obj-$(CONFIG_COMMON_CLK_K210) += clk-k210.o
|
||||
obj-$(CONFIG_COMMON_CLK_K230) += clk-k230.o
|
||||
obj-$(CONFIG_LMK04832) += clk-lmk04832.o
|
||||
obj-$(CONFIG_COMMON_CLK_LAN966X) += clk-lan966x.o
|
||||
obj-$(CONFIG_COMMON_CLK_LOCHNAGAR) += clk-lochnagar.o
|
||||
@@ -141,7 +142,7 @@ obj-$(CONFIG_COMMON_CLK_PXA) += pxa/
|
||||
obj-$(CONFIG_COMMON_CLK_QCOM) += qcom/
|
||||
obj-y += ralink/
|
||||
obj-y += renesas/
|
||||
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
|
||||
obj-$(CONFIG_COMMON_CLK_ROCKCHIP) += rockchip/
|
||||
obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/
|
||||
obj-$(CONFIG_CLK_SIFIVE) += sifive/
|
||||
obj-y += socfpga/
|
||||
|
||||
@@ -180,9 +180,9 @@ static int __init pmc_register_ops(void)
|
||||
of_node_put(np);
|
||||
return -ENODEV;
|
||||
}
|
||||
of_node_put(np);
|
||||
|
||||
at91_pmc_backup_suspend = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
if (!at91_pmc_backup_suspend) {
|
||||
pr_warn("%s(): unable to map securam\n", __func__);
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -387,7 +387,7 @@ static const struct {
|
||||
{ .n = "dma0_clk", .id = 20, },
|
||||
{ .n = "uhphs_clk", .id = 22, },
|
||||
{ .n = "udphs_clk", .id = 23, },
|
||||
{ .n = "macb0_clk", .id = 24, },
|
||||
{ .n = "gmac_clk", .id = 24, },
|
||||
{ .n = "lcd_clk", .id = 25, },
|
||||
{ .n = "sdmmc1_clk", .id = 26, },
|
||||
{ .n = "ssc_clk", .id = 28, },
|
||||
@@ -420,7 +420,6 @@ static const struct {
|
||||
{ .n = "lvdsc_clk", .id = 56, },
|
||||
{ .n = "pit64b1_clk", .id = 58, },
|
||||
{ .n = "puf_clk", .id = 59, },
|
||||
{ .n = "gmactsu_clk", .id = 67, },
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -569,6 +568,15 @@ static const struct {
|
||||
.pp_chg_id = INT_MIN,
|
||||
},
|
||||
|
||||
{
|
||||
.n = "gmac_gclk",
|
||||
.id = 24,
|
||||
.pp = { "audiopll_divpmcck", "plla_div2pmcck", },
|
||||
.pp_mux_table = { 6, 8, },
|
||||
.pp_count = 2,
|
||||
.pp_chg_id = INT_MIN,
|
||||
},
|
||||
|
||||
{
|
||||
.n = "lcd_gclk",
|
||||
.id = 25,
|
||||
@@ -702,15 +710,6 @@ static const struct {
|
||||
.pp_count = 1,
|
||||
.pp_chg_id = INT_MIN,
|
||||
},
|
||||
|
||||
{
|
||||
.n = "gmac_gclk",
|
||||
.id = 67,
|
||||
.pp = { "audiopll_divpmcck", "plla_div2pmcck", },
|
||||
.pp_mux_table = { 6, 8, },
|
||||
.pp_count = 2,
|
||||
.pp_chg_id = INT_MIN,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init sam9x7_pmc_setup(struct device_node *np)
|
||||
|
||||
@@ -677,6 +677,7 @@ static struct {
|
||||
{ .n = "uhphs_clk", .p = PCK_PARENT_HW_MCK5, .id = 101, },
|
||||
{ .n = "dsi_clk", .p = PCK_PARENT_HW_MCK3, .id = 103, },
|
||||
{ .n = "lvdsc_clk", .p = PCK_PARENT_HW_MCK3, .id = 104, },
|
||||
{ .n = "i3cc_clk", .p = PCK_PARENT_HW_MCK8, .id = 105, },
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,8 +27,7 @@ struct iproc_asiu {
|
||||
void __iomem *div_base;
|
||||
void __iomem *gate_base;
|
||||
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
struct iproc_asiu_clk *clks;
|
||||
struct iproc_asiu_clk clks[];
|
||||
};
|
||||
|
||||
#define to_asiu_clk(hw) container_of(hw, struct iproc_asiu_clk, hw)
|
||||
@@ -184,22 +183,19 @@ void __init iproc_asiu_setup(struct device_node *node,
|
||||
{
|
||||
int i, ret;
|
||||
struct iproc_asiu *asiu;
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
|
||||
if (WARN_ON(!gate || !div))
|
||||
return;
|
||||
|
||||
asiu = kzalloc_obj(*asiu);
|
||||
asiu = kzalloc_flex(*asiu, clks, num_clks);
|
||||
if (WARN_ON(!asiu))
|
||||
return;
|
||||
|
||||
asiu->clk_data = kzalloc_flex(*asiu->clk_data, hws, num_clks);
|
||||
if (WARN_ON(!asiu->clk_data))
|
||||
clk_data = kzalloc_flex(*clk_data, hws, num_clks);
|
||||
if (WARN_ON(!clk_data))
|
||||
goto err_clks;
|
||||
asiu->clk_data->num = num_clks;
|
||||
|
||||
asiu->clks = kzalloc_objs(*asiu->clks, num_clks);
|
||||
if (WARN_ON(!asiu->clks))
|
||||
goto err_asiu_clks;
|
||||
clk_data->num = num_clks;
|
||||
|
||||
asiu->div_base = of_iomap(node, 0);
|
||||
if (WARN_ON(!asiu->div_base))
|
||||
@@ -236,11 +232,11 @@ void __init iproc_asiu_setup(struct device_node *node,
|
||||
ret = clk_hw_register(NULL, &asiu_clk->hw);
|
||||
if (WARN_ON(ret))
|
||||
goto err_clk_register;
|
||||
asiu->clk_data->hws[i] = &asiu_clk->hw;
|
||||
clk_data->hws[i] = &asiu_clk->hw;
|
||||
}
|
||||
|
||||
ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get,
|
||||
asiu->clk_data);
|
||||
clk_data);
|
||||
if (WARN_ON(ret))
|
||||
goto err_clk_register;
|
||||
|
||||
@@ -248,17 +244,14 @@ void __init iproc_asiu_setup(struct device_node *node,
|
||||
|
||||
err_clk_register:
|
||||
while (--i >= 0)
|
||||
clk_hw_unregister(asiu->clk_data->hws[i]);
|
||||
clk_hw_unregister(clk_data->hws[i]);
|
||||
iounmap(asiu->gate_base);
|
||||
|
||||
err_iomap_gate:
|
||||
iounmap(asiu->div_base);
|
||||
|
||||
err_iomap_div:
|
||||
kfree(asiu->clks);
|
||||
|
||||
err_asiu_clks:
|
||||
kfree(asiu->clk_data);
|
||||
kfree(clk_data);
|
||||
|
||||
err_clks:
|
||||
kfree(asiu);
|
||||
|
||||
@@ -521,7 +521,7 @@ static int axi_clkgen_setup_limits(struct axi_clkgen *axi_clkgen,
|
||||
axi_clkgen->limits.fvco_max = 1200000;
|
||||
axi_clkgen->limits.fpfd_max = 450000;
|
||||
break;
|
||||
case ADI_AXI_FPGA_SPEED_2 ... ADI_AXI_FPGA_SPEED_2LV:
|
||||
case ADI_AXI_FPGA_SPEED_2 ... ADI_AXI_FPGA_SPEED_2MP:
|
||||
axi_clkgen->limits.fvco_max = 1440000;
|
||||
axi_clkgen->limits.fpfd_max = 500000;
|
||||
if (family == ADI_AXI_FPGA_FAMILY_KINTEX || family == ADI_AXI_FPGA_FAMILY_ARTIX) {
|
||||
@@ -546,6 +546,9 @@ static int axi_clkgen_setup_limits(struct axi_clkgen *axi_clkgen,
|
||||
if (tech == ADI_AXI_FPGA_TECH_ULTRASCALE_PLUS) {
|
||||
axi_clkgen->limits.fvco_max = 1600000;
|
||||
axi_clkgen->limits.fvco_min = 800000;
|
||||
} else if (tech == ADI_AXI_FPGA_TECH_VERSAL) {
|
||||
axi_clkgen->limits.fvco_max = 4320000;
|
||||
axi_clkgen->limits.fvco_min = 2160000;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
static int __must_check of_clk_bulk_get(struct device_node *np, int num_clks,
|
||||
static int __must_check of_clk_bulk_get(struct device *dev,
|
||||
struct device_node *np, int num_clks,
|
||||
struct clk_bulk_data *clks)
|
||||
{
|
||||
int ret;
|
||||
@@ -28,8 +29,8 @@ static int __must_check of_clk_bulk_get(struct device_node *np, int num_clks,
|
||||
clks[i].clk = of_clk_get(np, i);
|
||||
if (IS_ERR(clks[i].clk)) {
|
||||
ret = PTR_ERR(clks[i].clk);
|
||||
pr_err("%pOF: Failed to get clk index: %d ret: %d\n",
|
||||
np, i, ret);
|
||||
dev_err_probe(dev, ret, "%pOF: Failed to get clk index: %d (%s)\n",
|
||||
np, i, clks[i].id);
|
||||
clks[i].clk = NULL;
|
||||
goto err;
|
||||
}
|
||||
@@ -43,7 +44,8 @@ static int __must_check of_clk_bulk_get(struct device_node *np, int num_clks,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int __must_check of_clk_bulk_get_all(struct device_node *np,
|
||||
static int __must_check of_clk_bulk_get_all(struct device *dev,
|
||||
struct device_node *np,
|
||||
struct clk_bulk_data **clks)
|
||||
{
|
||||
struct clk_bulk_data *clk_bulk;
|
||||
@@ -58,7 +60,7 @@ static int __must_check of_clk_bulk_get_all(struct device_node *np,
|
||||
if (!clk_bulk)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = of_clk_bulk_get(np, num_clks, clk_bulk);
|
||||
ret = of_clk_bulk_get(dev, np, num_clks, clk_bulk);
|
||||
if (ret) {
|
||||
kfree(clk_bulk);
|
||||
return ret;
|
||||
@@ -144,7 +146,7 @@ int __must_check clk_bulk_get_all(struct device *dev,
|
||||
if (!np)
|
||||
return 0;
|
||||
|
||||
return of_clk_bulk_get_all(np, clks);
|
||||
return of_clk_bulk_get_all(dev, np, clks);
|
||||
}
|
||||
EXPORT_SYMBOL(clk_bulk_get_all);
|
||||
|
||||
|
||||
2452
drivers/clk/clk-k230.c
Normal file
2452
drivers/clk/clk-k230.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -47,8 +47,8 @@ struct max77686_clk_init_data {
|
||||
|
||||
struct max77686_clk_driver_data {
|
||||
enum max77686_chip_name chip;
|
||||
struct max77686_clk_init_data *max_clk_data;
|
||||
size_t num_clks;
|
||||
struct max77686_clk_init_data max_clk_data[] __counted_by(num_clks);
|
||||
};
|
||||
|
||||
static const struct
|
||||
@@ -168,19 +168,7 @@ static int max77686_clk_probe(struct platform_device *pdev)
|
||||
struct regmap *regmap;
|
||||
int i, ret, num_clks;
|
||||
|
||||
drv_data = devm_kzalloc(dev, sizeof(*drv_data), GFP_KERNEL);
|
||||
if (!drv_data)
|
||||
return -ENOMEM;
|
||||
|
||||
regmap = dev_get_regmap(parent, NULL);
|
||||
if (!regmap) {
|
||||
dev_err(dev, "Failed to get rtc regmap\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
drv_data->chip = id->driver_data;
|
||||
|
||||
switch (drv_data->chip) {
|
||||
switch (id->driver_data) {
|
||||
case CHIP_MAX77686:
|
||||
num_clks = MAX77686_CLKS_NUM;
|
||||
hw_clks = max77686_hw_clks_info;
|
||||
@@ -201,13 +189,19 @@ static int max77686_clk_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
drv_data->num_clks = num_clks;
|
||||
drv_data->max_clk_data = devm_kcalloc(dev, num_clks,
|
||||
sizeof(*drv_data->max_clk_data),
|
||||
GFP_KERNEL);
|
||||
if (!drv_data->max_clk_data)
|
||||
drv_data = devm_kzalloc(dev, struct_size(drv_data, max_clk_data, num_clks), GFP_KERNEL);
|
||||
if (!drv_data)
|
||||
return -ENOMEM;
|
||||
|
||||
drv_data->num_clks = num_clks;
|
||||
drv_data->chip = id->driver_data;
|
||||
|
||||
regmap = dev_get_regmap(parent, NULL);
|
||||
if (!regmap) {
|
||||
dev_err(dev, "Failed to get rtc regmap\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_clks; i++) {
|
||||
struct max77686_clk_init_data *max_clk_data;
|
||||
const char *clk_name;
|
||||
|
||||
@@ -70,7 +70,7 @@ struct hisi_clock_data *hisi_clk_init(struct device_node *np,
|
||||
|
||||
clk_data = kzalloc_obj(*clk_data);
|
||||
if (!clk_data)
|
||||
goto err;
|
||||
goto err_base;
|
||||
|
||||
clk_data->base = base;
|
||||
clk_table = kzalloc_objs(*clk_table, nr_clks);
|
||||
@@ -83,6 +83,8 @@ struct hisi_clock_data *hisi_clk_init(struct device_node *np,
|
||||
return clk_data;
|
||||
err_data:
|
||||
kfree(clk_data);
|
||||
err_base:
|
||||
iounmap(base);
|
||||
err:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
* @shift: shift to the divider bit field
|
||||
* @width: width of the divider bit field
|
||||
* @mask: mask for setting divider rate
|
||||
* @table: the div table that the divider supports
|
||||
* @lock: register lock
|
||||
* @table: the div table that the divider supports
|
||||
*/
|
||||
struct hi6220_clk_divider {
|
||||
struct clk_hw hw;
|
||||
@@ -35,8 +35,8 @@ struct hi6220_clk_divider {
|
||||
u8 shift;
|
||||
u8 width;
|
||||
u32 mask;
|
||||
const struct clk_div_table *table;
|
||||
spinlock_t *lock;
|
||||
struct clk_div_table table[];
|
||||
};
|
||||
|
||||
#define to_hi6220_clk_divider(_hw) \
|
||||
@@ -108,24 +108,19 @@ struct clk *hi6220_register_clkdiv(struct device *dev, const char *name,
|
||||
u32 max_div, min_div;
|
||||
int i;
|
||||
|
||||
/* allocate the divider */
|
||||
div = kzalloc_obj(*div);
|
||||
if (!div)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
/* Init the divider table */
|
||||
max_div = div_mask(width) + 1;
|
||||
min_div = 1;
|
||||
|
||||
table = kzalloc_objs(*table, max_div + 1);
|
||||
if (!table) {
|
||||
kfree(div);
|
||||
/* allocate the divider */
|
||||
div = kzalloc_flex(*div, table, max_div + 1);
|
||||
if (!div)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
for (i = 0; i < max_div; i++) {
|
||||
table[i].div = min_div + i;
|
||||
table[i].val = table[i].div - 1;
|
||||
table = &div->table[i];
|
||||
table->div = min_div + i;
|
||||
table->val = table->div - 1;
|
||||
}
|
||||
|
||||
init.name = name;
|
||||
@@ -141,14 +136,11 @@ struct clk *hi6220_register_clkdiv(struct device *dev, const char *name,
|
||||
div->mask = mask_bit ? BIT(mask_bit) : 0;
|
||||
div->lock = lock;
|
||||
div->hw.init = &init;
|
||||
div->table = table;
|
||||
|
||||
/* register the clock */
|
||||
clk = clk_register(dev, &div->hw);
|
||||
if (IS_ERR(clk)) {
|
||||
kfree(table);
|
||||
if (IS_ERR(clk))
|
||||
kfree(div);
|
||||
}
|
||||
|
||||
return clk;
|
||||
}
|
||||
|
||||
@@ -362,6 +362,14 @@ static int _sci_clk_build(struct sci_clk_provider *provider,
|
||||
|
||||
init.ops = &sci_clk_ops;
|
||||
init.num_parents = sci_clk->num_parents;
|
||||
|
||||
/*
|
||||
* A clock rate query to the SCI firmware will return 0 if either the
|
||||
* clock itself is disabled or the attached device/consumer is disabled.
|
||||
* This makes it inherently unsuitable for the caching of the clk
|
||||
* framework.
|
||||
*/
|
||||
init.flags = CLK_GET_RATE_NOCACHE;
|
||||
sci_clk->hw.init = &init;
|
||||
|
||||
ret = devm_clk_hw_register(provider->dev, &sci_clk->hw);
|
||||
@@ -417,7 +425,7 @@ static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
|
||||
key.clk_id = clkspec->args[1];
|
||||
|
||||
clk = bsearch(&key, provider->clocks, provider->num_clocks,
|
||||
sizeof(clk), _cmp_sci_clk);
|
||||
sizeof(*clk), _cmp_sci_clk);
|
||||
|
||||
if (!clk)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
@@ -56,49 +56,45 @@ static const char *const infra_pcie_gfmux_tl_ck_o_p3_parents[] __initconst = {
|
||||
|
||||
static const struct mtk_mux infra_muxes[] = {
|
||||
/* MODULE_CLK_SEL_0 */
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_MUX_UART0_SEL, "infra_mux_uart0_sel",
|
||||
infra_mux_uart0_parents, 0x0018, 0x0010, 0x0014, 0, 1, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_MUX_UART1_SEL, "infra_mux_uart1_sel",
|
||||
infra_mux_uart1_parents, 0x0018, 0x0010, 0x0014, 1, 1, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_MUX_UART2_SEL, "infra_mux_uart2_sel",
|
||||
infra_mux_uart2_parents, 0x0018, 0x0010, 0x0014, 2, 1, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_MUX_SPI0_SEL, "infra_mux_spi0_sel", infra_mux_spi0_parents,
|
||||
0x0018, 0x0010, 0x0014, 4, 1, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_MUX_SPI1_SEL, "infra_mux_spi1_sel", infra_mux_spi1_parents,
|
||||
0x0018, 0x0010, 0x0014, 5, 1, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_MUX_SPI2_SEL, "infra_mux_spi2_sel", infra_mux_spi0_parents,
|
||||
0x0018, 0x0010, 0x0014, 6, 1, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_SEL, "infra_pwm_sel", infra_pwm_bck_parents, 0x0018,
|
||||
0x0010, 0x0014, 14, 2, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_CK1_SEL, "infra_pwm_ck1_sel", infra_pwm_bck_parents,
|
||||
0x0018, 0x0010, 0x0014, 16, 2, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_CK2_SEL, "infra_pwm_ck2_sel", infra_pwm_bck_parents,
|
||||
0x0018, 0x0010, 0x0014, 18, 2, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_CK3_SEL, "infra_pwm_ck3_sel", infra_pwm_bck_parents,
|
||||
0x0018, 0x0010, 0x0014, 20, 2, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_CK4_SEL, "infra_pwm_ck4_sel", infra_pwm_bck_parents,
|
||||
0x0018, 0x0010, 0x0014, 22, 2, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_CK5_SEL, "infra_pwm_ck5_sel", infra_pwm_bck_parents,
|
||||
0x0018, 0x0010, 0x0014, 24, 2, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_CK6_SEL, "infra_pwm_ck6_sel", infra_pwm_bck_parents,
|
||||
0x0018, 0x0010, 0x0014, 26, 2, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_CK7_SEL, "infra_pwm_ck7_sel", infra_pwm_bck_parents,
|
||||
0x0018, 0x0010, 0x0014, 28, 2, -1, -1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PWM_CK8_SEL, "infra_pwm_ck8_sel", infra_pwm_bck_parents,
|
||||
0x0018, 0x0010, 0x0014, 30, 2, -1, -1, -1),
|
||||
MUX_CLR_SET(CLK_INFRA_MUX_UART0_SEL, "infra_mux_uart0_sel",
|
||||
infra_mux_uart0_parents, 0x0018, 0x0010, 0x0014, 0, 1),
|
||||
MUX_CLR_SET(CLK_INFRA_MUX_UART1_SEL, "infra_mux_uart1_sel",
|
||||
infra_mux_uart1_parents, 0x0018, 0x0010, 0x0014, 1, 1),
|
||||
MUX_CLR_SET(CLK_INFRA_MUX_UART2_SEL, "infra_mux_uart2_sel",
|
||||
infra_mux_uart2_parents, 0x0018, 0x0010, 0x0014, 2, 1),
|
||||
MUX_CLR_SET(CLK_INFRA_MUX_SPI0_SEL, "infra_mux_spi0_sel",
|
||||
infra_mux_spi0_parents, 0x0018, 0x0010, 0x0014, 4, 1),
|
||||
MUX_CLR_SET(CLK_INFRA_MUX_SPI1_SEL, "infra_mux_spi1_sel",
|
||||
infra_mux_spi1_parents, 0x0018, 0x0010, 0x0014, 5, 1),
|
||||
MUX_CLR_SET(CLK_INFRA_MUX_SPI2_SEL, "infra_mux_spi2_sel",
|
||||
infra_mux_spi0_parents, 0x0018, 0x0010, 0x0014, 6, 1),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_SEL, "infra_pwm_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 14, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_CK1_SEL, "infra_pwm_ck1_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 16, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_CK2_SEL, "infra_pwm_ck2_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 18, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_CK3_SEL, "infra_pwm_ck3_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 20, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_CK4_SEL, "infra_pwm_ck4_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 22, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_CK5_SEL, "infra_pwm_ck5_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 24, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_CK6_SEL, "infra_pwm_ck6_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 26, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_CK7_SEL, "infra_pwm_ck7_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 28, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PWM_CK8_SEL, "infra_pwm_ck8_sel",
|
||||
infra_pwm_bck_parents, 0x0018, 0x0010, 0x0014, 30, 2),
|
||||
/* MODULE_CLK_SEL_1 */
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PCIE_GFMUX_TL_O_P0_SEL, "infra_pcie_gfmux_tl_o_p0_sel",
|
||||
infra_pcie_gfmux_tl_ck_o_p0_parents, 0x0028, 0x0020, 0x0024, 0, 2, -1,
|
||||
-1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PCIE_GFMUX_TL_O_P1_SEL, "infra_pcie_gfmux_tl_o_p1_sel",
|
||||
infra_pcie_gfmux_tl_ck_o_p1_parents, 0x0028, 0x0020, 0x0024, 2, 2, -1,
|
||||
-1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PCIE_GFMUX_TL_O_P2_SEL, "infra_pcie_gfmux_tl_o_p2_sel",
|
||||
infra_pcie_gfmux_tl_ck_o_p2_parents, 0x0028, 0x0020, 0x0024, 4, 2, -1,
|
||||
-1, -1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_INFRA_PCIE_GFMUX_TL_O_P3_SEL, "infra_pcie_gfmux_tl_o_p3_sel",
|
||||
infra_pcie_gfmux_tl_ck_o_p3_parents, 0x0028, 0x0020, 0x0024, 6, 2, -1,
|
||||
-1, -1),
|
||||
MUX_CLR_SET(CLK_INFRA_PCIE_GFMUX_TL_O_P0_SEL, "infra_pcie_gfmux_tl_o_p0_sel",
|
||||
infra_pcie_gfmux_tl_ck_o_p0_parents, 0x0028, 0x0020, 0x0024, 0, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PCIE_GFMUX_TL_O_P1_SEL, "infra_pcie_gfmux_tl_o_p1_sel",
|
||||
infra_pcie_gfmux_tl_ck_o_p1_parents, 0x0028, 0x0020, 0x0024, 2, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PCIE_GFMUX_TL_O_P2_SEL, "infra_pcie_gfmux_tl_o_p2_sel",
|
||||
infra_pcie_gfmux_tl_ck_o_p2_parents, 0x0028, 0x0020, 0x0024, 4, 2),
|
||||
MUX_CLR_SET(CLK_INFRA_PCIE_GFMUX_TL_O_P3_SEL, "infra_pcie_gfmux_tl_o_p3_sel",
|
||||
infra_pcie_gfmux_tl_ck_o_p3_parents, 0x0028, 0x0020, 0x0024, 6, 2),
|
||||
};
|
||||
|
||||
static const struct mtk_gate_regs infra0_cg_regs = {
|
||||
|
||||
@@ -579,8 +579,8 @@ static const struct mtk_mux top_mtk_muxes[] = {
|
||||
dsp7_parents, 0x050, 0x054, 0x058, 0, 3, 7, 0x004, 16),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_TOP_MFG_REF_SEL, "mfg_ref_sel",
|
||||
mfg_ref_parents, 0x050, 0x054, 0x058, 16, 2, 23, 0x004, 18),
|
||||
MUX_CLR_SET_UPD(CLK_TOP_MFG_PLL_SEL, "mfg_pll_sel",
|
||||
mfg_pll_parents, 0x050, 0x054, 0x058, 18, 1, -1, -1),
|
||||
MUX_CLR_SET(CLK_TOP_MFG_PLL_SEL, "mfg_pll_sel", mfg_pll_parents,
|
||||
0x050, 0x054, 0x058, 18, 1),
|
||||
MUX_GATE_CLR_SET_UPD(CLK_TOP_CAMTG_SEL, "camtg_sel",
|
||||
camtg_parents, 0x050, 0x054, 0x058, 24, 3, 31, 0x004, 19),
|
||||
/* CLK_CFG_5 */
|
||||
|
||||
@@ -126,6 +126,11 @@ extern const struct clk_ops mtk_mux_gate_hwv_fenc_clr_set_upd_ops;
|
||||
0, _upd_ofs, _upd, CLK_SET_RATE_PARENT, \
|
||||
mtk_mux_clr_set_upd_ops)
|
||||
|
||||
#define MUX_CLR_SET(_id, _name, _parents, _mux_ofs, \
|
||||
_mux_set_ofs, _mux_clr_ofs, _shift, _width) \
|
||||
MUX_CLR_SET_UPD(_id, _name, _parents, _mux_ofs, \
|
||||
_mux_set_ofs, _mux_clr_ofs, _shift, _width, 0, -1)
|
||||
|
||||
#define MUX_GATE_HWV_FENC_CLR_SET_UPD_FLAGS(_id, _name, _parents, \
|
||||
_mux_ofs, _mux_set_ofs, _mux_clr_ofs, \
|
||||
_hwv_sta_ofs, _hwv_set_ofs, _hwv_clr_ofs, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-$(CONFIG_COMMON_CLK_PIC32) += clk-core.o
|
||||
obj-$(CONFIG_COMMON_CLK_PIC32) += clk-pic32.o
|
||||
obj-$(CONFIG_PIC32MZDA) += clk-pic32mzda.o
|
||||
obj-$(CONFIG_MCHP_CLK_MPFS) += clk-mpfs.o
|
||||
obj-$(CONFIG_MCHP_CLK_MPFS) += clk-mpfs-ccc.o
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#define MPFS_CCC_FIXED_DIV 4
|
||||
#define MPFS_CCC_OUTPUTS_PER_PLL 4
|
||||
#define MPFS_CCC_REFS_PER_PLL 2
|
||||
#define MPFS_CCC_NUM_CLKS 16
|
||||
|
||||
struct mpfs_ccc_data {
|
||||
void __iomem **pll_base;
|
||||
@@ -178,7 +179,7 @@ static int mpfs_ccc_register_outputs(struct device *dev, struct mpfs_ccc_out_hw_
|
||||
return dev_err_probe(dev, ret, "failed to register clock id: %d\n",
|
||||
out_hw->id);
|
||||
|
||||
data->hw_data.hws[out_hw->id - 2] = &out_hw->divider.hw;
|
||||
data->hw_data.hws[out_hw->id] = &out_hw->divider.hw;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -231,17 +232,9 @@ static int mpfs_ccc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct mpfs_ccc_data *clk_data;
|
||||
void __iomem *pll_base[ARRAY_SIZE(mpfs_ccc_pll_clks)];
|
||||
unsigned int num_clks;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* If DLLs get added here, mpfs_ccc_register_outputs() currently packs
|
||||
* sparse clock IDs in the hws array
|
||||
*/
|
||||
num_clks = ARRAY_SIZE(mpfs_ccc_pll_clks) + ARRAY_SIZE(mpfs_ccc_pll0out_clks) +
|
||||
ARRAY_SIZE(mpfs_ccc_pll1out_clks);
|
||||
|
||||
clk_data = devm_kzalloc(&pdev->dev, struct_size(clk_data, hw_data.hws, num_clks),
|
||||
clk_data = devm_kzalloc(&pdev->dev, struct_size(clk_data, hw_data.hws, MPFS_CCC_NUM_CLKS),
|
||||
GFP_KERNEL);
|
||||
if (!clk_data)
|
||||
return -ENOMEM;
|
||||
@@ -255,7 +248,7 @@ static int mpfs_ccc_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(pll_base[1]);
|
||||
|
||||
clk_data->pll_base = pll_base;
|
||||
clk_data->hw_data.num = num_clks;
|
||||
clk_data->hw_data.num = MPFS_CCC_NUM_CLKS;
|
||||
clk_data->dev = &pdev->dev;
|
||||
|
||||
ret = mpfs_ccc_register_plls(clk_data->dev, mpfs_ccc_pll_clks,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/platform_data/pic32.h>
|
||||
|
||||
#include "clk-core.h"
|
||||
#include "clk-pic32.h"
|
||||
|
||||
/* OSCCON Reg fields */
|
||||
#define OSC_CUR_MASK 0x07
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
#include "clk-core.h"
|
||||
#include "clk-pic32.h"
|
||||
|
||||
/* FRC Postscaler */
|
||||
#define OSC_FRCDIV_MASK 0x07
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <dt-bindings/clock/marvell,pxa1908.h>
|
||||
|
||||
#include "clk.h"
|
||||
#include "reset.h"
|
||||
|
||||
#define APBC_UART0 0x0
|
||||
#define APBC_UART1 0x4
|
||||
@@ -44,22 +45,25 @@ static const char * const uart_parent_names[] = {"pll1_117", "uart_pll"};
|
||||
static const char * const ssp_parent_names[] = {"pll1_d16", "pll1_d48", "pll1_d24", "pll1_d12"};
|
||||
|
||||
static struct mmp_param_gate_clk apbc_gate_clks[] = {
|
||||
{PXA1908_CLK_TWSI0, "twsi0_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI0, 0x7, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_TWSI1, "twsi1_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI1, 0x7, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_TWSI3, "twsi3_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI3, 0x7, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_GPIO, "gpio_clk", "vctcxo", CLK_SET_RATE_PARENT, APBC_GPIO, 0x7, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_KPC, "kpc_clk", "clk32", CLK_SET_RATE_PARENT, APBC_KPC, 0x7, 3, 0, MMP_CLK_GATE_NEED_DELAY, NULL},
|
||||
{PXA1908_CLK_RTC, "rtc_clk", "clk32", CLK_SET_RATE_PARENT, APBC_RTC, 0x87, 0x83, 0, MMP_CLK_GATE_NEED_DELAY, NULL},
|
||||
{PXA1908_CLK_TWSI0, "twsi0_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI0, 0x3, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_TWSI1, "twsi1_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI1, 0x3, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_TWSI3, "twsi3_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_TWSI3, 0x3, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_GPIO, "gpio_clk", "vctcxo", CLK_SET_RATE_PARENT, APBC_GPIO, 0x3, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_KPC, "kpc_clk", "clk32", CLK_SET_RATE_PARENT, APBC_KPC, 0x3, 3, 0, MMP_CLK_GATE_NEED_DELAY, NULL},
|
||||
{PXA1908_CLK_RTC, "rtc_clk", "clk32", CLK_SET_RATE_PARENT, APBC_RTC, 0x83, 0x83, 0, MMP_CLK_GATE_NEED_DELAY, NULL},
|
||||
{PXA1908_CLK_PWM1, "pwm1_clk", "pwm01_apb_share", CLK_SET_RATE_PARENT, APBC_PWM1, 0x2, 2, 0, 0, NULL},
|
||||
{PXA1908_CLK_PWM3, "pwm3_clk", "pwm23_apb_share", CLK_SET_RATE_PARENT, APBC_PWM3, 0x2, 2, 0, 0, NULL},
|
||||
{PXA1908_CLK_UART0, "uart0_clk", "uart0_mux", CLK_SET_RATE_PARENT, APBC_UART0, 0x3, 3, 0, 0, &uart0_lock},
|
||||
{PXA1908_CLK_UART1, "uart1_clk", "uart1_mux", CLK_SET_RATE_PARENT, APBC_UART1, 0x3, 3, 0, 0, &uart1_lock},
|
||||
{PXA1908_CLK_THERMAL, "thermal_clk", NULL, 0, APBC_THERMAL, 0x3, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_IPC_RST, "ipc_clk", NULL, 0, APBC_IPC_RST, 0x3, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_SSP0, "ssp0_clk", "ssp0_mux", 0, APBC_SSP0, 0x3, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_SSP2, "ssp2_clk", "ssp2_mux", 0, APBC_SSP2, 0x3, 3, 0, 0, NULL},
|
||||
};
|
||||
|
||||
static struct mmp_param_gate_clk apbc_gate_no_reset_clks[] = {
|
||||
{PXA1908_CLK_PWM0, "pwm0_clk", "pwm01_apb_share", CLK_SET_RATE_PARENT, APBC_PWM0, 0x2, 2, 0, 0, &pwm0_lock},
|
||||
{PXA1908_CLK_PWM1, "pwm1_clk", "pwm01_apb_share", CLK_SET_RATE_PARENT, APBC_PWM1, 0x6, 2, 0, 0, NULL},
|
||||
{PXA1908_CLK_PWM2, "pwm2_clk", "pwm23_apb_share", CLK_SET_RATE_PARENT, APBC_PWM2, 0x2, 2, 0, 0, NULL},
|
||||
{PXA1908_CLK_PWM3, "pwm3_clk", "pwm23_apb_share", CLK_SET_RATE_PARENT, APBC_PWM3, 0x6, 2, 0, 0, NULL},
|
||||
{PXA1908_CLK_UART0, "uart0_clk", "uart0_mux", CLK_SET_RATE_PARENT, APBC_UART0, 0x7, 3, 0, 0, &uart0_lock},
|
||||
{PXA1908_CLK_UART1, "uart1_clk", "uart1_mux", CLK_SET_RATE_PARENT, APBC_UART1, 0x7, 3, 0, 0, &uart1_lock},
|
||||
{PXA1908_CLK_THERMAL, "thermal_clk", NULL, 0, APBC_THERMAL, 0x7, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_IPC_RST, "ipc_clk", NULL, 0, APBC_IPC_RST, 0x7, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_SSP0, "ssp0_clk", "ssp0_mux", 0, APBC_SSP0, 0x7, 3, 0, 0, NULL},
|
||||
{PXA1908_CLK_SSP2, "ssp2_clk", "ssp2_mux", 0, APBC_SSP2, 0x7, 3, 0, 0, NULL},
|
||||
};
|
||||
|
||||
static struct mmp_param_mux_clk apbc_mux_clks[] = {
|
||||
@@ -89,6 +93,30 @@ static void pxa1908_apb_periph_clk_init(struct pxa1908_clk_unit *pxa_unit)
|
||||
ARRAY_SIZE(apbc_mux_clks));
|
||||
mmp_register_gate_clks(unit, apbc_gate_clks, pxa_unit->base,
|
||||
ARRAY_SIZE(apbc_gate_clks));
|
||||
mmp_register_gate_clks(unit, apbc_gate_no_reset_clks, pxa_unit->base,
|
||||
ARRAY_SIZE(apbc_gate_no_reset_clks));
|
||||
}
|
||||
|
||||
/* Taken from clk-of-pxa1928.c */
|
||||
static void pxa1908_clk_reset_init(struct device_node *np,
|
||||
struct pxa1908_clk_unit *pxa_unit)
|
||||
{
|
||||
struct mmp_clk_reset_cell *cells;
|
||||
int nr_cells = ARRAY_SIZE(apbc_gate_clks);
|
||||
|
||||
cells = kzalloc_objs(*cells, nr_cells);
|
||||
if (!cells)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < nr_cells; i++) {
|
||||
cells[i].clk_id = apbc_gate_clks[i].id;
|
||||
cells[i].reg = pxa_unit->base + apbc_gate_clks[i].offset;
|
||||
cells[i].bits = BIT(2);
|
||||
cells[i].flags = 0;
|
||||
cells[i].lock = apbc_gate_clks[i].lock;
|
||||
};
|
||||
|
||||
mmp_clk_reset_register(np, cells, nr_cells);
|
||||
}
|
||||
|
||||
static int pxa1908_apbc_probe(struct platform_device *pdev)
|
||||
@@ -107,6 +135,8 @@ static int pxa1908_apbc_probe(struct platform_device *pdev)
|
||||
|
||||
pxa1908_apb_periph_clk_init(pxa_unit);
|
||||
|
||||
pxa1908_clk_reset_init(pdev->dev.of_node, pxa_unit);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <dt-bindings/clock/marvell,pxa1908.h>
|
||||
|
||||
#include "clk.h"
|
||||
#include "reset.h"
|
||||
|
||||
#define APBCP_UART2 0x1c
|
||||
#define APBCP_TWSI2 0x28
|
||||
@@ -24,9 +25,9 @@ static DEFINE_SPINLOCK(uart2_lock);
|
||||
static const char * const uart_parent_names[] = {"pll1_117", "uart_pll"};
|
||||
|
||||
static struct mmp_param_gate_clk apbcp_gate_clks[] = {
|
||||
{PXA1908_CLK_UART2, "uart2_clk", "uart2_mux", CLK_SET_RATE_PARENT, APBCP_UART2, 0x7, 0x3, 0x0, 0, &uart2_lock},
|
||||
{PXA1908_CLK_TWSI2, "twsi2_clk", "pll1_32", CLK_SET_RATE_PARENT, APBCP_TWSI2, 0x7, 0x3, 0x0, 0, NULL},
|
||||
{PXA1908_CLK_AICER, "ripc_clk", NULL, 0, APBCP_AICER, 0x7, 0x2, 0x0, 0, NULL},
|
||||
{PXA1908_CLK_UART2, "uart2_clk", "uart2_mux", CLK_SET_RATE_PARENT, APBCP_UART2, 0x3, 0x3, 0x0, 0, &uart2_lock},
|
||||
{PXA1908_CLK_TWSI2, "twsi2_clk", "pll1_32", CLK_SET_RATE_PARENT, APBCP_TWSI2, 0x3, 0x3, 0x0, 0, NULL},
|
||||
{PXA1908_CLK_AICER, "ripc_clk", NULL, 0, APBCP_AICER, 0x3, 0x2, 0x0, 0, NULL},
|
||||
};
|
||||
|
||||
static struct mmp_param_mux_clk apbcp_mux_clks[] = {
|
||||
@@ -43,6 +44,28 @@ static void pxa1908_apb_p_periph_clk_init(struct pxa1908_clk_unit *pxa_unit)
|
||||
ARRAY_SIZE(apbcp_gate_clks));
|
||||
}
|
||||
|
||||
/* Taken from clk-of-pxa1928.c */
|
||||
static void pxa1908_clk_reset_init(struct device_node *np,
|
||||
struct pxa1908_clk_unit *pxa_unit)
|
||||
{
|
||||
struct mmp_clk_reset_cell *cells;
|
||||
int nr_cells = ARRAY_SIZE(apbcp_gate_clks);
|
||||
|
||||
cells = kzalloc_objs(*cells, nr_cells);
|
||||
if (!cells)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < nr_cells; i++) {
|
||||
cells[i].clk_id = apbcp_gate_clks[i].id;
|
||||
cells[i].reg = pxa_unit->base + apbcp_gate_clks[i].offset;
|
||||
cells[i].bits = BIT(2);
|
||||
cells[i].flags = 0;
|
||||
cells[i].lock = apbcp_gate_clks[i].lock;
|
||||
};
|
||||
|
||||
mmp_clk_reset_register(np, cells, nr_cells);
|
||||
}
|
||||
|
||||
static int pxa1908_apbcp_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct pxa1908_clk_unit *pxa_unit;
|
||||
@@ -59,6 +82,8 @@ static int pxa1908_apbcp_probe(struct platform_device *pdev)
|
||||
|
||||
pxa1908_apb_p_periph_clk_init(pxa_unit);
|
||||
|
||||
pxa1908_clk_reset_init(pdev->dev.of_node, pxa_unit);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -189,10 +189,10 @@ DEFINE_SPINLOCK(ctrl_gating_lock);
|
||||
|
||||
struct clk_gating_ctrl {
|
||||
spinlock_t *lock;
|
||||
struct clk **gates;
|
||||
int num_gates;
|
||||
void __iomem *base;
|
||||
u32 saved_reg;
|
||||
struct clk *gates[] __counted_by(num_gates);
|
||||
};
|
||||
|
||||
static struct clk_gating_ctrl *ctrl;
|
||||
@@ -257,24 +257,21 @@ void __init mvebu_clk_gating_setup(struct device_node *np,
|
||||
clk_put(clk);
|
||||
}
|
||||
|
||||
ctrl = kzalloc_obj(*ctrl);
|
||||
/* Count, allocate, and register clock gates */
|
||||
for (n = 0; desc[n].name;)
|
||||
n++;
|
||||
|
||||
ctrl = kzalloc_flex(*ctrl, gates, n);
|
||||
if (WARN_ON(!ctrl))
|
||||
goto ctrl_out;
|
||||
|
||||
ctrl->num_gates = n;
|
||||
|
||||
/* lock must already be initialized */
|
||||
ctrl->lock = &ctrl_gating_lock;
|
||||
|
||||
ctrl->base = base;
|
||||
|
||||
/* Count, allocate, and register clock gates */
|
||||
for (n = 0; desc[n].name;)
|
||||
n++;
|
||||
|
||||
ctrl->num_gates = n;
|
||||
ctrl->gates = kzalloc_objs(*ctrl->gates, ctrl->num_gates);
|
||||
if (WARN_ON(!ctrl->gates))
|
||||
goto gates_out;
|
||||
|
||||
for (n = 0; n < ctrl->num_gates; n++) {
|
||||
const char *parent =
|
||||
(desc[n].parent) ? desc[n].parent : default_parent;
|
||||
@@ -289,8 +286,6 @@ void __init mvebu_clk_gating_setup(struct device_node *np,
|
||||
register_syscore(&clk_gate_syscore);
|
||||
|
||||
return;
|
||||
gates_out:
|
||||
kfree(ctrl);
|
||||
ctrl_out:
|
||||
iounmap(base);
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#define CCU_BRANCH_HAVE_DIV2 BIT(1)
|
||||
|
||||
struct lpc18xx_branch_clk_data {
|
||||
const char **name;
|
||||
int num;
|
||||
const char *name[] __counted_by(num);
|
||||
};
|
||||
|
||||
struct lpc18xx_clk_branch {
|
||||
@@ -266,6 +266,7 @@ static void __init lpc18xx_ccu_init(struct device_node *np)
|
||||
{
|
||||
struct lpc18xx_branch_clk_data *clk_data;
|
||||
void __iomem *reg_base;
|
||||
size_t size;
|
||||
int i, ret;
|
||||
|
||||
reg_base = of_iomap(np, 0);
|
||||
@@ -274,19 +275,14 @@ static void __init lpc18xx_ccu_init(struct device_node *np)
|
||||
return;
|
||||
}
|
||||
|
||||
clk_data = kzalloc_obj(*clk_data);
|
||||
size = of_property_count_strings(np, "clock-names");
|
||||
clk_data = kzalloc_flex(*clk_data, name, size);
|
||||
if (!clk_data) {
|
||||
iounmap(reg_base);
|
||||
return;
|
||||
}
|
||||
|
||||
clk_data->num = of_property_count_strings(np, "clock-names");
|
||||
clk_data->name = kcalloc(clk_data->num, sizeof(char *), GFP_KERNEL);
|
||||
if (!clk_data->name) {
|
||||
iounmap(reg_base);
|
||||
kfree(clk_data);
|
||||
return;
|
||||
}
|
||||
clk_data->num = size;
|
||||
|
||||
for (i = 0; i < clk_data->num; i++) {
|
||||
ret = of_property_read_string_index(np, "clock-names", i,
|
||||
|
||||
@@ -200,6 +200,17 @@ config CLK_X1E80100_TCSRCC
|
||||
Support for the TCSR clock controller on X1E80100 devices.
|
||||
Say Y if you want to use peripheral devices such as SD/UFS.
|
||||
|
||||
config CLK_X1P42100_CAMCC
|
||||
tristate "X1P42100 Camera Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select CLK_X1E80100_GCC
|
||||
default m if ARCH_QCOM
|
||||
help
|
||||
Support for the camera clock controller on Qualcomm Technologies, Inc.
|
||||
X1P42100 devices.
|
||||
Say Y if you want to support camera devices and camera functionality
|
||||
such as capturing pictures.
|
||||
|
||||
config CLK_X1P42100_GPUCC
|
||||
tristate "X1P42100 Graphics Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
@@ -209,6 +220,17 @@ config CLK_X1P42100_GPUCC
|
||||
Say Y if you want to support graphics controller devices and
|
||||
functionality such as 3D graphics.
|
||||
|
||||
config CLK_X1P42100_VIDEOCC
|
||||
tristate "X1P42100 Video Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select CLK_X1E80100_GCC
|
||||
default m if ARCH_QCOM
|
||||
help
|
||||
Support for the video clock controller on Qualcomm Technologies, Inc.
|
||||
X1P42100 devices.
|
||||
Say Y if you want to support video devices and functionality such as
|
||||
video encode/decode.
|
||||
|
||||
config CLK_QCM2290_GPUCC
|
||||
tristate "QCM2290 Graphics Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
@@ -296,6 +318,22 @@ config QCOM_CLK_RPMH
|
||||
Say Y if you want to support the clocks exposed by RPMh on
|
||||
platforms such as SDM845.
|
||||
|
||||
config CLK_HAWI_GCC
|
||||
tristate "Hawi Global Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select QCOM_GDSC
|
||||
help
|
||||
Support for the global clock controller on Hawi devices.
|
||||
Say Y if you want to use peripheral devices such as UART, SPI,
|
||||
I2C, USB, UFS, SD/eMMC, PCIe, etc.
|
||||
|
||||
config CLK_HAWI_TCSRCC
|
||||
tristate "Hawi TCSR Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
help
|
||||
Support for the TCSR clock controller on Hawi devices.
|
||||
Say Y if you want to use peripheral devices such as PCIe, USB, UFS.
|
||||
|
||||
config APQ_GCC_8084
|
||||
tristate "APQ8084 Global Clock Controller"
|
||||
depends on ARM || COMPILE_TEST
|
||||
@@ -434,6 +472,16 @@ config IPQ_GCC_9574
|
||||
i2c, USB, SD/eMMC, etc. Select this for the root clock
|
||||
of ipq9574.
|
||||
|
||||
config IPQ_GCC_9650
|
||||
tristate "IPQ9650 Global Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
default ARCH_QCOM
|
||||
help
|
||||
Support for global clock controller on ipq9650 devices.
|
||||
Say Y if you want to use peripheral devices such as UART, SPI,
|
||||
i2c, USB, SD/eMMC, etc. Select this for the root clock
|
||||
of ipq9650.
|
||||
|
||||
config IPQ_NSSCC_5424
|
||||
tristate "IPQ5424 NSS Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
|
||||
@@ -29,6 +29,8 @@ obj-$(CONFIG_CLK_GLYMUR_GCC) += gcc-glymur.o
|
||||
obj-$(CONFIG_CLK_GLYMUR_GPUCC) += gpucc-glymur.o gxclkctl-kaanapali.o
|
||||
obj-$(CONFIG_CLK_GLYMUR_TCSRCC) += tcsrcc-glymur.o
|
||||
obj-$(CONFIG_CLK_GLYMUR_VIDEOCC) += videocc-glymur.o
|
||||
obj-$(CONFIG_CLK_HAWI_GCC) += gcc-hawi.o
|
||||
obj-$(CONFIG_CLK_HAWI_TCSRCC) += tcsrcc-hawi.o
|
||||
obj-$(CONFIG_CLK_KAANAPALI_CAMCC) += cambistmclkcc-kaanapali.o camcc-kaanapali.o
|
||||
obj-$(CONFIG_CLK_KAANAPALI_DISPCC) += dispcc-kaanapali.o
|
||||
obj-$(CONFIG_CLK_KAANAPALI_GCC) += gcc-kaanapali.o
|
||||
@@ -42,7 +44,9 @@ obj-$(CONFIG_CLK_X1E80100_DISPCC) += dispcc-x1e80100.o
|
||||
obj-$(CONFIG_CLK_X1E80100_GCC) += gcc-x1e80100.o
|
||||
obj-$(CONFIG_CLK_X1E80100_GPUCC) += gpucc-x1e80100.o
|
||||
obj-$(CONFIG_CLK_X1E80100_TCSRCC) += tcsrcc-x1e80100.o
|
||||
obj-$(CONFIG_CLK_X1P42100_CAMCC) += camcc-x1p42100.o
|
||||
obj-$(CONFIG_CLK_X1P42100_GPUCC) += gpucc-x1p42100.o
|
||||
obj-$(CONFIG_CLK_X1P42100_VIDEOCC) += videocc-x1p42100.o
|
||||
obj-$(CONFIG_CLK_QCM2290_GPUCC) += gpucc-qcm2290.o
|
||||
obj-$(CONFIG_IPQ_APSS_PLL) += apss-ipq-pll.o
|
||||
obj-$(CONFIG_IPQ_APSS_5424) += apss-ipq5424.o
|
||||
@@ -57,6 +61,7 @@ obj-$(CONFIG_IPQ_GCC_6018) += gcc-ipq6018.o
|
||||
obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
|
||||
obj-$(CONFIG_IPQ_GCC_8074) += gcc-ipq8074.o
|
||||
obj-$(CONFIG_IPQ_GCC_9574) += gcc-ipq9574.o
|
||||
obj-$(CONFIG_IPQ_GCC_9650) += gcc-ipq9650.o
|
||||
obj-$(CONFIG_IPQ_NSSCC_5424) += nsscc-ipq5424.o
|
||||
obj-$(CONFIG_IPQ_NSSCC_9574) += nsscc-ipq9574.o
|
||||
obj-$(CONFIG_IPQ_LCC_806X) += lcc-ipq806x.o
|
||||
@@ -189,7 +194,7 @@ obj-$(CONFIG_SM_GPUCC_8450) += gpucc-sm8450.o
|
||||
obj-$(CONFIG_SM_GPUCC_8550) += gpucc-sm8550.o
|
||||
obj-$(CONFIG_SM_GPUCC_8650) += gpucc-sm8650.o
|
||||
obj-$(CONFIG_SM_GPUCC_8750) += gpucc-sm8750.o gxclkctl-kaanapali.o
|
||||
obj-$(CONFIG_SM_GPUCC_MILOS) += gpucc-milos.o
|
||||
obj-$(CONFIG_SM_GPUCC_MILOS) += gpucc-milos.o gxclkctl-kaanapali.o
|
||||
obj-$(CONFIG_SM_LPASSCC_6115) += lpasscc-sm6115.o
|
||||
obj-$(CONFIG_SM_TCSRCC_8550) += tcsrcc-sm8550.o
|
||||
obj-$(CONFIG_SM_TCSRCC_8650) += tcsrcc-sm8650.o
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
static const struct pll_freq_tbl a53pll_freq[] = {
|
||||
{ 998400000, 52, 0x0, 0x1, 0 },
|
||||
{ 1094400000, 57, 0x0, 0x1, 0 },
|
||||
{ 1152000000, 62, 0x0, 0x1, 0 },
|
||||
{ 1152000000, 60, 0x0, 0x1, 0 },
|
||||
{ 1209600000, 63, 0x0, 0x1, 0 },
|
||||
{ 1248000000, 65, 0x0, 0x1, 0 },
|
||||
{ 1363200000, 71, 0x0, 0x1, 0 },
|
||||
|
||||
@@ -30,6 +30,11 @@ enum {
|
||||
DT_IFACE,
|
||||
};
|
||||
|
||||
/* Need to match the order of interconnects in DT binding */
|
||||
enum {
|
||||
DT_ICC_TOP_GDSC,
|
||||
};
|
||||
|
||||
enum {
|
||||
P_BI_TCXO,
|
||||
P_CAM_CC_PLL0_OUT_EVEN,
|
||||
@@ -1971,6 +1976,8 @@ static struct gdsc cam_cc_camss_top_gdsc = {
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
|
||||
.needs_icc = true,
|
||||
.icc_path_index = DT_ICC_TOP_GDSC,
|
||||
};
|
||||
|
||||
static struct clk_regmap *cam_cc_milos_clocks[] = {
|
||||
|
||||
@@ -1052,6 +1052,31 @@ static struct clk_rcg2 cam_cc_mclk7_clk_src = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src[] = {
|
||||
F(19200000, P_BI_TCXO, 1, 0, 0),
|
||||
F(60000000, P_CAM_CC_PLL8_OUT_EVEN, 8, 0, 0),
|
||||
F(75000000, P_CAM_CC_PLL0_OUT_EVEN, 8, 0, 0),
|
||||
F(150000000, P_CAM_CC_PLL0_OUT_EVEN, 4, 0, 0),
|
||||
F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct clk_rcg2 cam_cc_qdss_debug_clk_src = {
|
||||
.cmd_rcgr = 0x13938,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = cam_cc_parent_map_0,
|
||||
.freq_tbl = ftbl_cam_cc_qdss_debug_clk_src,
|
||||
.hw_clk_ctrl = true,
|
||||
.clkr.hw.init = &(const struct clk_init_data) {
|
||||
.name = "cam_cc_qdss_debug_clk_src",
|
||||
.parent_data = cam_cc_parent_data_0,
|
||||
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct freq_tbl ftbl_cam_cc_sfe_0_clk_src[] = {
|
||||
F(345600000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
|
||||
F(432000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
|
||||
@@ -2182,6 +2207,42 @@ static struct clk_branch cam_cc_mclk7_clk = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch cam_cc_qdss_debug_clk = {
|
||||
.halt_reg = 0x13a64,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x13a64,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "cam_cc_qdss_debug_clk",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&cam_cc_qdss_debug_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch cam_cc_qdss_debug_xo_clk = {
|
||||
.halt_reg = 0x13a68,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.clkr = {
|
||||
.enable_reg = 0x13a68,
|
||||
.enable_mask = BIT(0),
|
||||
.hw.init = &(const struct clk_init_data) {
|
||||
.name = "cam_cc_qdss_debug_xo_clk",
|
||||
.parent_hws = (const struct clk_hw*[]) {
|
||||
&cam_cc_xo_clk_src.clkr.hw,
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_branch cam_cc_sfe_0_clk = {
|
||||
.halt_reg = 0x133c0,
|
||||
.halt_check = BRANCH_HALT,
|
||||
@@ -2398,6 +2459,9 @@ static struct clk_regmap *cam_cc_x1e80100_clocks[] = {
|
||||
[CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr,
|
||||
[CAM_CC_PLL8] = &cam_cc_pll8.clkr,
|
||||
[CAM_CC_PLL8_OUT_EVEN] = &cam_cc_pll8_out_even.clkr,
|
||||
[CAM_CC_QDSS_DEBUG_CLK] = &cam_cc_qdss_debug_clk.clkr,
|
||||
[CAM_CC_QDSS_DEBUG_CLK_SRC] = &cam_cc_qdss_debug_clk_src.clkr,
|
||||
[CAM_CC_QDSS_DEBUG_XO_CLK] = &cam_cc_qdss_debug_xo_clk.clkr,
|
||||
[CAM_CC_SFE_0_CLK] = &cam_cc_sfe_0_clk.clkr,
|
||||
[CAM_CC_SFE_0_CLK_SRC] = &cam_cc_sfe_0_clk_src.clkr,
|
||||
[CAM_CC_SFE_0_FAST_AHB_CLK] = &cam_cc_sfe_0_fast_ahb_clk.clkr,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user