common/cnxk: add BPHY communication with atf
[dpdk.git] / drivers / common / cnxk / roc_bphy_cgx.h
index aac2c26..37b5c27 100644 (file)
@@ -5,6 +5,8 @@
 #ifndef _ROC_BPHY_CGX_H_
 #define _ROC_BPHY_CGX_H_
 
+#include <pthread.h>
+
 #include "roc_api.h"
 
 struct roc_bphy_cgx {
@@ -12,6 +14,8 @@ struct roc_bphy_cgx {
        void *bar0_va;
        uint64_t lmac_bmap;
        unsigned int id;
+       /* serialize access to the whole structure */
+       pthread_mutex_t lock;
 } __plt_cache_aligned;
 
 __roc_api int roc_bphy_cgx_dev_init(struct roc_bphy_cgx *roc_cgx);