src/dpdk/drivers/net/nfp/nfpcore/nfp_cppcore.c
static uint32_t
nfp_xpb_to_cpp(struct nfp_cpp *cpp, uint32_t *xpb_addr)
{
	uint32_t xpb;
	int island;

	xpb = NFP_CPP_ID(14, NFP_CPP_ACTION_RW, 0);

	/*
	 * Ensure that non-local XPB accesses go out through the
	 * global XPBM bus.
	 */
	island = ((*xpb_addr) >> 24) & 0x3f;

	if (!island)
		return xpb;

	if (island == 1) {
		/*
		 * Accesses to the ARM Island overlay uses Island 0
		 * Global Bit
		 */
		(*xpb_addr) &= ~0x7f000000;
		if (*xpb_addr < 0x60000)
			*xpb_addr |= (1 << 30);
		else
			/* And only non-ARM interfaces use island id = 1 */
			if (NFP_CPP_INTERFACE_TYPE_of(nfp_cpp_interface(cpp)) !=
			    NFP_CPP_INTERFACE_TYPE_ARM)
				*xpb_addr |= (1 << 24);
	} else {
		(*xpb_addr) |= (1 << 30);
	}

	return xpb;
}
/*
 * Return the correct CPP address, and fixup xpb_addr as needed,
 * based upon NFP model.
 */
Return the correct CPP address, and fixup xpb_addr as needed,
based upon NFP model.
Return the correct CPP address and fixup xpb_addr as needed based upon NFP model .
static uint32_t
nfp_xpb_to_cpp(struct nfp_cpp *cpp, uint32_t *xpb_addr)
{
	uint32_t xpb;
	int island;
	xpb = NFP_CPP_ID(14, NFP_CPP_ACTION_RW, 0);
	island = ((*xpb_addr) >> 24) & 0x3f;
	if (!island)
		return xpb;
	if (island == 1) {
		(*xpb_addr) &= ~0x7f000000;
		if (*xpb_addr < 0x60000)
			*xpb_addr |= (1 << 30);
		else
			if (NFP_CPP_INTERFACE_TYPE_of(nfp_cpp_interface(cpp)) !=
			    NFP_CPP_INTERFACE_TYPE_ARM)
				*xpb_addr |= (1 << 24);
	} else {
		(*xpb_addr) |= (1 << 30);
	}
	return xpb;
}
static uint32_t nfp_xpb_to_cpp ( struct nfp_cpp * cpp , uint32_t * xpb_addr ) { uint32_t xpb ; int island ; xpb = NFP_CPP_ID ( 14 , NFP_CPP_ACTION_RW , 0 ) ; island = ( ( * xpb_addr ) >> 24 ) & 0x3f ; if ( ! island ) return xpb ; if ( island == 1 ) { ( * xpb_addr ) &= ~ 0x7f000000 ; if ( * xpb_addr < 0x60000 ) * xpb_addr |= ( 1 << 30 ) ; else if ( NFP_CPP_INTERFACE_TYPE_of ( nfp_cpp_interface ( cpp ) ) != NFP_CPP_INTERFACE_TYPE_ARM ) * xpb_addr |= ( 1 << 24 ) ; } else { ( * xpb_addr ) |= ( 1 << 30 ) ; } return xpb ; }
Return the correct CPP address, and fixup xpb_addr as needed,
 based upon NFP model.
Return the correct CPP address and fixup xpb_addr as needed based upon NFP model .
/*
	 * Ensure that non-local XPB accesses go out through the
	 * global XPBM bus.
	 */ /*
		 * Accesses to the ARM Island overlay uses Island 0
		 * Global Bit
		 */ /* And only non-ARM interfaces use island id = 1 */