/* RETURN: MV_NOT_ALLOWED in case PEX interface is PEX-X. MV_BAD_PARAM on bad parameters , otherwise MV_OK  */
int pex_local_dev_num_set(u32 pex_if, u32 dev_num)
/* RETURN: MV_NOT_ALLOWED in case PEX interface is PEX-X. MV_BAD_PARAM on bad parameters , otherwise MV_OK  */
int pex_local_dev_num_set(u32 pex_if, u32 dev_num)
{
	u32 val;
	if (pex_if >= MV_PEX_MAX_IF)
		return MV_BAD_PARAM;
	val = reg_read(PEX_STATUS_REG(pex_if));
	val &= ~PXSR_PEX_DEV_NUM_MASK;
	val |= (dev_num << PXSR_PEX_DEV_NUM_OFFS) & PXSR_PEX_DEV_NUM_MASK;
	reg_write(PEX_STATUS_REG(pex_if), val);
	return MV_OK;
}