linux/drivers/misc/bcm-vk/bcm_vk_msg.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright 2018-2020 Broadcom.
 */

#ifndef BCM_VK_MSG_H
#define BCM_VK_MSG_H

#include <uapi/linux/misc/bcm_vk.h>
#include "bcm_vk_sg.h"

/* Single message queue control structure */
struct bcm_vk_msgq {};

/*
 * Structure to record static info from the msgq sync.  We keep local copy
 * for some of these variables for both performance + checking purpose.
 */
struct bcm_vk_sync_qinfo {};

#define VK_MSGQ_MAX_NR

/*
 * message block - basic unit in the message where a message's size is always
 *		   N x sizeof(basic_block)
 */
struct vk_msg_blk {};

/* vk_msg_blk is 16 bytes fixed */
#define VK_MSGQ_BLK_SIZE
/* shift for fast division of basic msg blk size */
#define VK_MSGQ_BLK_SZ_SHIFT

/* use msg_id 0 for any simplex host2vk communication */
#define VK_SIMPLEX_MSG_ID

/* context per session opening of sysfs */
struct bcm_vk_ctx {};

/* pid hash table entry */
struct bcm_vk_ht_entry {};

#define VK_DMA_MAX_ADDRS
/* structure for house keeping a single work entry */
struct bcm_vk_wkent {};

/* queue stats counters */
struct bcm_vk_qs_cnts {};

/* control channel structure for either to_v or to_h communication */
struct bcm_vk_msg_chan {};

/* totol number of message q allowed by the driver */
#define VK_MSGQ_PER_CHAN_MAX
#define VK_MSGQ_NUM_DEFAULT

/* total number of supported ctx, 32 ctx each for 5 components */
#define VK_CMPT_CTX_MAX

/* hash table defines to store the opened FDs */
#define VK_PID_HT_SHIFT_BIT
#define VK_PID_HT_SZ

/* The following are offsets of DDR info provided by the vk card */
#define VK_BAR0_SEG_SIZE

/* shutdown types supported */
#define VK_SHUTDOWN_PID
#define VK_SHUTDOWN_GRACEFUL

#endif