linux/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000/nfp6000.h

/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
/* Copyright (C) 2015-2017 Netronome Systems, Inc. */

#ifndef NFP6000_NFP6000_H
#define NFP6000_NFP6000_H

#include <linux/errno.h>
#include <linux/types.h>

/* CPP Target IDs */
#define NFP_CPP_TARGET_INVALID
#define NFP_CPP_TARGET_NBI
#define NFP_CPP_TARGET_QDR
#define NFP_CPP_TARGET_ILA
#define NFP_CPP_TARGET_MU
#define NFP_CPP_TARGET_PCIE
#define NFP_CPP_TARGET_ARM
#define NFP_CPP_TARGET_CRYPTO
#define NFP_CPP_TARGET_ISLAND_XPB
#define NFP_CPP_TARGET_ISLAND_CAP
#define NFP_CPP_TARGET_CT_XPB
#define NFP_CPP_TARGET_LOCAL_SCRATCH
#define NFP_CPP_TARGET_CLS

#define NFP_ISL_EMEM0

#define NFP_MU_ADDR_ACCESS_TYPE_MASK
#define NFP_MU_ADDR_ACCESS_TYPE_DIRECT

#define PUSHPULL(_pull, _push)
#define PUSH_WIDTH(_pushpull)
#define PULL_WIDTH(_pushpull)

static inline int pushpull_width(int pp)
{}

static inline int nfp_cppat_mu_locality_lsb(int mode, bool addr40)
{}

int nfp_target_pushpull(u32 cpp_id, u64 address);
int nfp_target_cpp(u32 cpp_island_id, u64 cpp_island_address,
		   u32 *cpp_target_id, u64 *cpp_target_address,
		   const u32 *imb_table);

#endif /* NFP6000_NFP6000_H */