linux/drivers/crypto/ccp/platform-access.c

// SPDX-License-Identifier: GPL-2.0
/*
 * AMD Platform Security Processor (PSP) Platform Access interface
 *
 * Copyright (C) 2023 Advanced Micro Devices, Inc.
 *
 * Author: Mario Limonciello <[email protected]>
 *
 * Some of this code is adapted from drivers/i2c/busses/i2c-designware-amdpsp.c
 * developed by Jan Dabros <[email protected]> and Copyright (C) 2022 Google Inc.
 *
 */

#include <linux/bitfield.h>
#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/mutex.h>

#include "platform-access.h"

#define PSP_CMD_TIMEOUT_US
#define DOORBELL_CMDRESP_STS

/* Recovery field should be equal 0 to start sending commands */
static int check_recovery(u32 __iomem *cmd)
{}

static int wait_cmd(u32 __iomem *cmd)
{}

int psp_check_platform_access_status(void)
{}
EXPORT_SYMBOL();

int psp_send_platform_access_msg(enum psp_platform_access_msg msg,
				 struct psp_request *req)
{}
EXPORT_SYMBOL_GPL();

int psp_ring_platform_doorbell(int msg, u32 *result)
{}
EXPORT_SYMBOL_GPL();

void platform_access_dev_destroy(struct psp_device *psp)
{}

int platform_access_dev_init(struct psp_device *psp)
{}