xref: /linux/drivers/remoteproc/imx_rproc.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2017 Pengutronix, Oleksij Rempel <kernel@pengutronix.de>
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 	/* Through System Control Unit API */
26 	IMX_RPROC_SCU_API,
27 };
28 
29 /* dcfg flags */
30 #define IMX_RPROC_NEED_SYSTEM_OFF	BIT(0)
31 
32 struct imx_rproc_dcfg {
33 	u32				src_reg;
34 	u32				src_mask;
35 	u32				src_start;
36 	u32				src_stop;
37 	u32				gpr_reg;
38 	u32				gpr_wait;
39 	const struct imx_rproc_att	*att;
40 	size_t				att_size;
41 	enum imx_rproc_method		method;
42 	u32				flags;
43 };
44 
45 #endif /* _IMX_RPROC_H */
46