Skip to content

Commit 617e748

Browse files
committed
Merge tag 'rproc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc
Pull remoteproc updates from Bjorn Andersson: "This introduces a new "detached" state for remote processors that are deemed to be running at the time Linux boots and the infrastructure for "attaching" to these. It then introduces the support for performing this operation for the STM32 platform. The coredump functionality is moved out from the core file and gains support for an optional mode where the recovery phase awaits the notification from devcoredump that the dump should be released. This allows userspace to grab the coredump in scenarios where vmalloc space is too low for creating a complete copy of the coredump before handing this to devcoredump. A new character device based interface is introduced to allow tying the stoppage of a remote processor to the termination of a user space process. This is useful in situations when such process provides crucial resources/operations for the firmware running on the remote processor. The Texas Instrument K3 driver gains support for the C66x and C71x DSPs. Qualcomm remoteprocs gains support for stashing relocation information in IMEM, to aid post mortem debugging and the crash notification mechanism is generalized to be reusable in cases where loosely coupled drivers needs to know about the status of a remote processor. One such example is the IPA hardware block, which is jointly owned with the modem and migrated to this improved interface. It also introduces a number of bug fixes and debug improvements for the Qualcomm modem remoteproc driver. And it cleans up the inconsistent interface for remoteproc drivers to implement power management" * tag 'rproc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (56 commits) remoteproc: core: Register the character device interface remoteproc: Add remoteproc character device interface remoteproc: kill IPA notify code net: ipa: new notification infrastructure remoteproc: k3-dsp: Add support for C71x DSPs dt-bindings: remoteproc: k3-dsp: Update bindings for C71x DSPs remoteproc: k3-dsp: Add support for L2RAM loading on C66x DSPs remoteproc: k3-dsp: Add a remoteproc driver of K3 C66x DSPs dt-bindings: remoteproc: Add bindings for C66x DSPs on TI K3 SoCs remoteproc: k3: Add TI-SCI processor control helper functions remoteproc: Introduce rproc_of_parse_firmware() helper dt-bindings: arm: keystone: Add common TI SCI bindings remoteproc: qcom_q6v5_mss: Remove redundant running state remoteproc: qcom: q6v5: Update running state before requesting stop remoteproc: qcom_q6v5_mss: Add modem debug policy support remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load rpmsg: update documentation remoteproc: qcom_q6v5_mss: Add MBA log extraction support remoteproc: Add coredump debugfs entry ...
2 parents dded87a + 62b8f9e commit 617e748

36 files changed

+2795
-601
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/arm/keystone/ti,k3-sci-common.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Common K3 TI-SCI bindings
8+
9+
maintainers:
10+
- Nishanth Menon <[email protected]>
11+
12+
description: |
13+
The TI K3 family of SoCs usually have a central System Controller Processor
14+
that is responsible for managing various SoC-level resources like clocks,
15+
resets, interrupts etc. The communication with that processor is performed
16+
through the TI-SCI protocol.
17+
18+
Each specific device management node like a clock controller node, a reset
19+
controller node or an interrupt-controller node should define a common set
20+
of properties that enables them to implement the corresponding functionality
21+
over the TI-SCI protocol. The following are some of the common properties
22+
needed by such individual nodes. The required properties for each device
23+
management node is defined in the respective binding.
24+
25+
properties:
26+
ti,sci:
27+
$ref: /schemas/types.yaml#/definitions/phandle
28+
description:
29+
Should be a phandle to the TI-SCI System Controller node
30+
31+
ti,sci-dev-id:
32+
$ref: /schemas/types.yaml#/definitions/uint32
33+
description: |
34+
Should contain the TI-SCI device id corresponding to the device. Please
35+
refer to the corresponding System Controller documentation for valid
36+
values for the desired device.
37+
38+
ti,sci-proc-ids:
39+
description: Should contain a single tuple of <proc_id host_id>.
40+
$ref: /schemas/types.yaml#/definitions/uint32-array
41+
items:
42+
- description: TI-SCI processor id for the remote processor device
43+
- description: TI-SCI host id to which processor control ownership
44+
should be transferred to
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/remoteproc/qcom,pil-info.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm peripheral image loader relocation info binding
8+
9+
maintainers:
10+
- Bjorn Andersson <[email protected]>
11+
12+
description:
13+
The Qualcomm peripheral image loader relocation memory region, in IMEM, is
14+
used for communicating remoteproc relocation information to post mortem
15+
debugging tools.
16+
17+
properties:
18+
compatible:
19+
const: qcom,pil-reloc-info
20+
21+
reg:
22+
maxItems: 1
23+
24+
required:
25+
- compatible
26+
- reg
27+
28+
examples:
29+
- |
30+
imem@146bf000 {
31+
compatible = "syscon", "simple-mfd";
32+
reg = <0x146bf000 0x1000>;
33+
34+
#address-cells = <1>;
35+
#size-cells = <1>;
36+
37+
ranges = <0 0x146bf000 0x1000>;
38+
39+
pil-reloc@94c {
40+
compatible = "qcom,pil-reloc-info";
41+
reg = <0x94c 0xc8>;
42+
};
43+
};
44+
...
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/remoteproc/ti,k3-dsp-rproc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: TI K3 DSP devices
8+
9+
maintainers:
10+
- Suman Anna <[email protected]>
11+
12+
description: |
13+
The TI K3 family of SoCs usually have one or more TI DSP Core sub-systems
14+
that are used to offload some of the processor-intensive tasks or algorithms,
15+
for achieving various system level goals.
16+
17+
These processor sub-systems usually contain additional sub-modules like
18+
L1 and/or L2 caches/SRAMs, an Interrupt Controller, an external memory
19+
controller, a dedicated local power/sleep controller etc. The DSP processor
20+
cores in the K3 SoCs are usually either a TMS320C66x CorePac processor or a
21+
TMS320C71x CorePac processor.
22+
23+
Each DSP Core sub-system is represented as a single DT node. Each node has a
24+
number of required or optional properties that enable the OS running on the
25+
host processor (Arm CorePac) to perform the device management of the remote
26+
processor and to communicate with the remote processor.
27+
28+
allOf:
29+
- $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml#
30+
31+
properties:
32+
compatible:
33+
enum:
34+
- ti,j721e-c66-dsp
35+
- ti,j721e-c71-dsp
36+
description:
37+
Use "ti,j721e-c66-dsp" for C66x DSPs on K3 J721E SoCs
38+
Use "ti,j721e-c71-dsp" for C71x DSPs on K3 J721E SoCs
39+
40+
resets:
41+
description: |
42+
Should contain the phandle to the reset controller node managing the
43+
local resets for this device, and a reset specifier.
44+
maxItems: 1
45+
46+
firmware-name:
47+
description: |
48+
Should contain the name of the default firmware image
49+
file located on the firmware search path
50+
51+
mboxes:
52+
description: |
53+
OMAP Mailbox specifier denoting the sub-mailbox, to be used for
54+
communication with the remote processor. This property should match
55+
with the sub-mailbox node used in the firmware image.
56+
maxItems: 1
57+
58+
memory-region:
59+
minItems: 2
60+
maxItems: 8
61+
description: |
62+
phandle to the reserved memory nodes to be associated with the remoteproc
63+
device. There should be at least two reserved memory nodes defined. The
64+
reserved memory nodes should be carveout nodes, and should be defined as
65+
per the bindings in
66+
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
67+
items:
68+
- description: region used for dynamic DMA allocations like vrings and
69+
vring buffers
70+
- description: region reserved for firmware image sections
71+
additionalItems: true
72+
73+
# Optional properties:
74+
# --------------------
75+
76+
sram:
77+
$ref: /schemas/types.yaml#/definitions/phandle-array
78+
minItems: 1
79+
maxItems: 4
80+
description: |
81+
phandles to one or more reserved on-chip SRAM regions. The regions
82+
should be defined as child nodes of the respective SRAM node, and
83+
should be defined as per the generic bindings in,
84+
Documentation/devicetree/bindings/sram/sram.yaml
85+
86+
if:
87+
properties:
88+
compatible:
89+
enum:
90+
- ti,j721e-c66-dsp
91+
then:
92+
properties:
93+
reg:
94+
items:
95+
- description: Address and Size of the L2 SRAM internal memory region
96+
- description: Address and Size of the L1 PRAM internal memory region
97+
- description: Address and Size of the L1 DRAM internal memory region
98+
reg-names:
99+
items:
100+
- const: l2sram
101+
- const: l1pram
102+
- const: l1dram
103+
else:
104+
if:
105+
properties:
106+
compatible:
107+
enum:
108+
- ti,j721e-c71-dsp
109+
then:
110+
properties:
111+
reg:
112+
items:
113+
- description: Address and Size of the L2 SRAM internal memory region
114+
- description: Address and Size of the L1 DRAM internal memory region
115+
reg-names:
116+
items:
117+
- const: l2sram
118+
- const: l1dram
119+
120+
required:
121+
- compatible
122+
- reg
123+
- reg-names
124+
- ti,sci
125+
- ti,sci-dev-id
126+
- ti,sci-proc-ids
127+
- resets
128+
- firmware-name
129+
- mboxes
130+
- memory-region
131+
132+
unevaluatedProperties: false
133+
134+
examples:
135+
- |
136+
/ {
137+
model = "Texas Instruments K3 J721E SoC";
138+
compatible = "ti,j721e";
139+
#address-cells = <2>;
140+
#size-cells = <2>;
141+
142+
bus@100000 {
143+
compatible = "simple-bus";
144+
#address-cells = <2>;
145+
#size-cells = <2>;
146+
ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
147+
<0x00 0x64800000 0x00 0x64800000 0x00 0x00800000>, /* C71_0 */
148+
<0x4d 0x80800000 0x4d 0x80800000 0x00 0x00800000>, /* C66_0 */
149+
<0x4d 0x81800000 0x4d 0x81800000 0x00 0x00800000>; /* C66_1 */
150+
151+
/* J721E C66_0 DSP node */
152+
dsp@4d80800000 {
153+
compatible = "ti,j721e-c66-dsp";
154+
reg = <0x4d 0x80800000 0x00 0x00048000>,
155+
<0x4d 0x80e00000 0x00 0x00008000>,
156+
<0x4d 0x80f00000 0x00 0x00008000>;
157+
reg-names = "l2sram", "l1pram", "l1dram";
158+
ti,sci = <&dmsc>;
159+
ti,sci-dev-id = <142>;
160+
ti,sci-proc-ids = <0x03 0xFF>;
161+
resets = <&k3_reset 142 1>;
162+
firmware-name = "j7-c66_0-fw";
163+
memory-region = <&c66_0_dma_memory_region>,
164+
<&c66_0_memory_region>;
165+
mboxes = <&mailbox0_cluster3 &mbox_c66_0>;
166+
};
167+
168+
/* J721E C71_0 DSP node */
169+
c71_0: dsp@64800000 {
170+
compatible = "ti,j721e-c71-dsp";
171+
reg = <0x00 0x64800000 0x00 0x00080000>,
172+
<0x00 0x64e00000 0x00 0x0000c000>;
173+
reg-names = "l2sram", "l1dram";
174+
ti,sci = <&dmsc>;
175+
ti,sci-dev-id = <15>;
176+
ti,sci-proc-ids = <0x30 0xFF>;
177+
resets = <&k3_reset 15 1>;
178+
firmware-name = "j7-c71_0-fw";
179+
memory-region = <&c71_0_dma_memory_region>,
180+
<&c71_0_memory_region>;
181+
mboxes = <&mailbox0_cluster4 &mbox_c71_0>;
182+
};
183+
};
184+
};

Documentation/staging/rpmsg.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ Returns 0 on success and an appropriate error value on failure.
192192

193193
::
194194

195-
struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_channel *rpdev,
196-
void (*cb)(struct rpmsg_channel *, void *, int, void *, u32),
197-
void *priv, u32 addr);
195+
struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *rpdev,
196+
rpmsg_rx_cb_t cb, void *priv,
197+
struct rpmsg_channel_info chinfo);
198198

199199
every rpmsg address in the system is bound to an rx callback (so when
200200
inbound messages arrive, they are dispatched by the rpmsg bus using the

Documentation/userspace-api/ioctl/ioctl-number.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ Code Seq# Include File Comments
339339
0xB4 00-0F linux/gpio.h <mailto:[email protected]>
340340
0xB5 00-0F uapi/linux/rpmsg.h <mailto:[email protected]>
341341
0xB6 all linux/fpga-dfl.h
342+
0xB7 all uapi/linux/remoteproc_cdev.h <mailto:[email protected]>
342343
0xC0 00-0F linux/usb/iowarrior.h
343344
0xCA 00-0F uapi/misc/cxl.h
344345
0xCA 10-2F uapi/misc/ocxl.h

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17065,6 +17065,7 @@ M: Tero Kristo <[email protected]>
1706517065
M: Santosh Shilimkar <[email protected]>
1706617066
1706717067
S: Maintained
17068+
F: Documentation/devicetree/bindings/arm/keystone/ti,k3-sci-common.yaml
1706817069
F: Documentation/devicetree/bindings/arm/keystone/ti,sci.txt
1706917070
F: Documentation/devicetree/bindings/clock/ti,sci-clk.txt
1707017071
F: Documentation/devicetree/bindings/interrupt-controller/ti,sci-inta.txt

drivers/net/ipa/ipa.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/device.h>
1111
#include <linux/notifier.h>
1212
#include <linux/pm_wakeup.h>
13+
#include <linux/notifier.h>
1314

1415
#include "ipa_version.h"
1516
#include "gsi.h"
@@ -73,6 +74,8 @@ struct ipa {
7374
enum ipa_version version;
7475
struct platform_device *pdev;
7576
struct rproc *modem_rproc;
77+
struct notifier_block nb;
78+
void *notifier;
7679
struct ipa_smp2p *smp2p;
7780
struct ipa_clock *clock;
7881
atomic_t suspend_ref;

0 commit comments

Comments
 (0)