Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / crypto / ccp / dbc.h
blobe0fecbe92eb1f0c919d4a69ef6f39a24e77eb96a
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * AMD Platform Security Processor (PSP) Dynamic Boost Control support
5 * Copyright (C) 2023 Advanced Micro Devices, Inc.
7 * Author: Mario Limonciello <mario.limonciello@amd.com>
8 */
10 #ifndef __DBC_H__
11 #define __DBC_H__
13 #include <uapi/linux/psp-dbc.h>
15 #include <linux/device.h>
16 #include <linux/miscdevice.h>
17 #include <linux/psp-platform-access.h>
19 #include "psp-dev.h"
21 struct psp_dbc_device {
22 struct device *dev;
23 struct psp_device *psp;
25 union dbc_buffer *mbox;
27 struct mutex ioctl_mutex;
29 struct miscdevice char_dev;
31 /* used to abstract communication path */
32 bool use_ext;
33 u32 header_size;
34 u32 *payload_size;
35 u32 *result;
36 void *payload;
39 union dbc_buffer {
40 struct psp_request pa_req;
41 struct psp_ext_request ext_req;
44 void dbc_dev_destroy(struct psp_device *psp);
45 int dbc_dev_init(struct psp_device *psp);
47 #endif /* __DBC_H */