src/dpdk/drivers/net/nfp/nfpcore/nfp_cppcore.c
uint32_t
__nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
{
	uint32_t reg;
	int err;

	err = nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) + NFP_PL_DEVICE_ID,
			    &reg);
	if (err < 0)
		return err;

	*model = reg & NFP_PL_DEVICE_MODEL_MASK;
	if (*model & NFP_PL_DEVICE_ID_MASK)
		*model -= 0x10;

	return 0;
}
/*
 * NOTE: This code should not use nfp_xpb_* functions,
 * as those are model-specific
 */
This code should not use nfp_xpb_* functions,
as those are model-specific
This code should not use nfp_xpb_ * functions as those are model - specific
uint32_t
__nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
{
	uint32_t reg;
	int err;
	err = nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) + NFP_PL_DEVICE_ID,
			    &reg);
	if (err < 0)
		return err;
	*model = reg & NFP_PL_DEVICE_MODEL_MASK;
	if (*model & NFP_PL_DEVICE_ID_MASK)
		*model -= 0x10;
	return 0;
}
uint32_t __nfp_cpp_model_autodetect ( struct nfp_cpp * cpp , uint32_t * model ) { uint32_t reg ; int err ; err = nfp_xpb_readl ( cpp , NFP_XPB_DEVICE ( 1 , 1 , 16 ) + NFP_PL_DEVICE_ID , & reg ) ; if ( err < 0 ) return err ; * model = reg & NFP_PL_DEVICE_MODEL_MASK ; if ( * model & NFP_PL_DEVICE_ID_MASK ) * model -= 0x10 ; return 0 ; }
NOTE: This code should not use nfp_xpb_* functions,
 as those are model-specific
NOTE : This code should not use nfp_xpb_ * functions as those are model - specific