1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
5 #ifndef _OTX2_COMMON_H_
6 #define _OTX2_COMMON_H_
8 #include <rte_common.h>
10 #include <rte_memory.h>
12 #include "hw/otx2_rvu.h"
13 #include "hw/otx2_nix.h"
14 #include "hw/otx2_npc.h"
15 #include "hw/otx2_npa.h"
16 #include "hw/otx2_sso.h"
17 #include "hw/otx2_ssow.h"
18 #include "hw/otx2_tim.h"
21 #define OTX2_ALIGN 128
23 /* Bits manipulation */
25 #define BIT_ULL(nr) (1ULL << (nr))
28 #define BIT(nr) (1UL << (nr))
31 /* Compiler attributes */
33 #define __hot __attribute__((hot))
37 #define otx2_read64(addr) rte_read64_relaxed((void *)(addr))
38 #define otx2_write64(val, addr) rte_write64_relaxed((val), (void *)(addr))
40 #if defined(RTE_ARCH_ARM64)
41 #include "otx2_io_arm64.h"
43 #include "otx2_io_generic.h"
46 #endif /* _OTX2_COMMON_H_ */