Skip to content

Commit ebcd5d5

Browse files
TE-N-ShengjiuWangmathieupoirier
authored andcommitted
remoteproc: imx_rproc: Move common structure to header file
Move common structure imx_rproc_att, imx_rproc_method and imx_rproc_dcfg to header file which can be shared with imx_dsp_rproc driver. Signed-off-by: Shengjiu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent bc774a3 commit ebcd5d5

File tree

2 files changed

+38
-27
lines changed

2 files changed

+38
-27
lines changed

drivers/remoteproc/imx_rproc.c

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/remoteproc.h>
2020
#include <linux/workqueue.h>
2121

22+
#include "imx_rproc.h"
2223
#include "remoteproc_internal.h"
2324

2425
#define IMX7D_SRC_SCR 0x0C
@@ -73,33 +74,6 @@ struct imx_rproc_mem {
7374
#define ATT_OWN BIT(1)
7475
#define ATT_IOMEM BIT(2)
7576

76-
/* address translation table */
77-
struct imx_rproc_att {
78-
u32 da; /* device address (From Cortex M4 view)*/
79-
u32 sa; /* system bus address */
80-
u32 size; /* size of reg range */
81-
int flags;
82-
};
83-
84-
/* Remote core start/stop method */
85-
enum imx_rproc_method {
86-
IMX_RPROC_NONE,
87-
/* Through syscon regmap */
88-
IMX_RPROC_MMIO,
89-
/* Through ARM SMCCC */
90-
IMX_RPROC_SMC,
91-
};
92-
93-
struct imx_rproc_dcfg {
94-
u32 src_reg;
95-
u32 src_mask;
96-
u32 src_start;
97-
u32 src_stop;
98-
const struct imx_rproc_att *att;
99-
size_t att_size;
100-
enum imx_rproc_method method;
101-
};
102-
10377
struct imx_rproc {
10478
struct device *dev;
10579
struct regmap *regmap;

drivers/remoteproc/imx_rproc.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
/*
3+
* Copyright (c) 2017 Pengutronix, Oleksij Rempel <[email protected]>
4+
* Copyright 2021 NXP
5+
*/
6+
7+
#ifndef _IMX_RPROC_H
8+
#define _IMX_RPROC_H
9+
10+
/* address translation table */
11+
struct imx_rproc_att {
12+
u32 da; /* device address (From Cortex M4 view)*/
13+
u32 sa; /* system bus address */
14+
u32 size; /* size of reg range */
15+
int flags;
16+
};
17+
18+
/* Remote core start/stop method */
19+
enum imx_rproc_method {
20+
IMX_RPROC_NONE,
21+
/* Through syscon regmap */
22+
IMX_RPROC_MMIO,
23+
/* Through ARM SMCCC */
24+
IMX_RPROC_SMC,
25+
};
26+
27+
struct imx_rproc_dcfg {
28+
u32 src_reg;
29+
u32 src_mask;
30+
u32 src_start;
31+
u32 src_stop;
32+
const struct imx_rproc_att *att;
33+
size_t att_size;
34+
enum imx_rproc_method method;
35+
};
36+
37+
#endif /* _IMX_RPROC_H */

0 commit comments

Comments
 (0)