| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
|---|---|
| 2 | /* |
| 3 | * AMD Platform Security Processor (PSP) Platform Access interface |
| 4 | * |
| 5 | * Copyright (C) 2023 Advanced Micro Devices, Inc. |
| 6 | * |
| 7 | * Author: Mario Limonciello <mario.limonciello@amd.com> |
| 8 | */ |
| 9 | |
| 10 | #ifndef __PSP_PLATFORM_ACCESS_H__ |
| 11 | #define __PSP_PLATFORM_ACCESS_H__ |
| 12 | |
| 13 | #include <linux/device.h> |
| 14 | #include <linux/miscdevice.h> |
| 15 | #include <linux/mutex.h> |
| 16 | #include <linux/psp-platform-access.h> |
| 17 | |
| 18 | #include "psp-dev.h" |
| 19 | |
| 20 | struct psp_platform_access_device { |
| 21 | struct device *dev; |
| 22 | struct psp_device *psp; |
| 23 | |
| 24 | struct platform_access_vdata *vdata; |
| 25 | |
| 26 | struct mutex mailbox_mutex; |
| 27 | struct mutex doorbell_mutex; |
| 28 | |
| 29 | void *platform_access_data; |
| 30 | }; |
| 31 | |
| 32 | void platform_access_dev_destroy(struct psp_device *psp); |
| 33 | int platform_access_dev_init(struct psp_device *psp); |
| 34 | |
| 35 | #endif /* __PSP_PLATFORM_ACCESS_H__ */ |
| 36 |
