xref: /linux/drivers/cdx/controller/cdx_controller.h (revision 4b132aacb0768ac1e652cf517097ea6f237214b9)
1 /* SPDX-License-Identifier: GPL-2.0
2  *
3  * Header file for the CDX Controller
4  *
5  * Copyright (C) 2022-2023, Advanced Micro Devices, Inc.
6  */
7 
8 #ifndef _CDX_CONTROLLER_H_
9 #define _CDX_CONTROLLER_H_
10 
11 #include <linux/cdx/cdx_bus.h>
12 #include "mcdi_functions.h"
13 
14 void cdx_rpmsg_post_probe(struct cdx_controller *cdx);
15 
16 void cdx_rpmsg_pre_remove(struct cdx_controller *cdx);
17 
18 int cdx_rpmsg_send(struct cdx_mcdi *cdx_mcdi,
19 		   const struct cdx_dword *hdr, size_t hdr_len,
20 		   const struct cdx_dword *sdu, size_t sdu_len);
21 
22 void cdx_rpmsg_read_resp(struct cdx_mcdi *cdx_mcdi,
23 			 struct cdx_dword *outbuf, size_t offset,
24 			 size_t outlen);
25 
26 int cdx_setup_rpmsg(struct platform_device *pdev);
27 
28 void cdx_destroy_rpmsg(struct platform_device *pdev);
29 
30 #endif /* _CDX_CONT_PRIV_H_ */
31