Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0
0002  * Marvell OcteonTX CPT driver
0003  *
0004  * Copyright (C) 2019 Marvell International Ltd.
0005  *
0006  * This program is free software; you can redistribute it and/or modify
0007  * it under the terms of the GNU General Public License version 2 as
0008  * published by the Free Software Foundation.
0009  */
0010 
0011 #ifndef __OTX_CPT_COMMON_H
0012 #define __OTX_CPT_COMMON_H
0013 
0014 #include <linux/types.h>
0015 #include <linux/delay.h>
0016 #include <linux/device.h>
0017 
0018 #define OTX_CPT_MAX_MBOX_DATA_STR_SIZE 64
0019 
0020 enum otx_cptpf_type {
0021     OTX_CPT_AE = 2,
0022     OTX_CPT_SE = 3,
0023     BAD_OTX_CPTPF_TYPE,
0024 };
0025 
0026 enum otx_cptvf_type {
0027     OTX_CPT_AE_TYPES = 1,
0028     OTX_CPT_SE_TYPES = 2,
0029     BAD_OTX_CPTVF_TYPE,
0030 };
0031 
0032 /* VF-PF message opcodes */
0033 enum otx_cpt_mbox_opcode {
0034     OTX_CPT_MSG_VF_UP = 1,
0035     OTX_CPT_MSG_VF_DOWN,
0036     OTX_CPT_MSG_READY,
0037     OTX_CPT_MSG_QLEN,
0038     OTX_CPT_MSG_QBIND_GRP,
0039     OTX_CPT_MSG_VQ_PRIORITY,
0040     OTX_CPT_MSG_PF_TYPE,
0041     OTX_CPT_MSG_ACK,
0042     OTX_CPT_MSG_NACK
0043 };
0044 
0045 /* OcteonTX CPT mailbox structure */
0046 struct otx_cpt_mbox {
0047     u64 msg; /* Message type MBOX[0] */
0048     u64 data;/* Data         MBOX[1] */
0049 };
0050 
0051 #endif /* __OTX_CPT_COMMON_H */