XilinxProcessorIPLib/drivers/prc/src/xprc.c
static u16 XPrc_GetOffsetForTableType(u8 TableId)
{
	u16 Offset;

	/**
	 * For each given table type, work out how many LSBs are used to select
	 * a register type within a bank.
	 */
	switch (TableId) {
		case XPRC_VSM_RM_REG_BANK:
		/* RM Registers */
		/* The equation is ceil(log2(XPRC_VSM_REGISTERS_PER_RM)) */
			Offset = 1;
			break;
		case XPRC_VSM_BS_REG_BANK:
		/* BS Registers */
		/* The equation is * ceil(log2(XPRC_VSM_REGISTERS_PER_BS)) */
			Offset = 2;
			break;
		default:
			Offset = 0;
			break;
	}

	return Offset;
}
/*****************************************************************************/
/**
*
* This function works out the register offset within a bank for a given
* register table. Registers in the PRC are organised into banks. Some banks
* only have one type of register. Some banks have multiple types of registers.
*
* @param	TableId is the register table.
*
* @return	Offset for the table within a bank.
*
* @note		None.
*
******************************************************************************/
This function works out the register offset within a bank for a given
register table. Registers in the PRC are organised into banks. Some banks
only have one type of register. Some banks have multiple types of registers.
This function works out the register offset within a bank for a given register table . Registers in the PRC are organised into banks . Some banks only have one type of register . Some banks have multiple types of registers .
static u16 XPrc_GetOffsetForTableType(u8 TableId)
{
	u16 Offset;
	switch (TableId) {
		case XPRC_VSM_RM_REG_BANK:
			Offset = 1;
			break;
		case XPRC_VSM_BS_REG_BANK:
			Offset = 2;
			break;
		default:
			Offset = 0;
			break;
	}
	return Offset;
}
static u16 XPrc_GetOffsetForTableType ( u8 TableId ) { u16 Offset ; switch ( TableId ) { case XPRC_VSM_RM_REG_BANK : Offset = 1 ; break ; case XPRC_VSM_BS_REG_BANK : Offset = 2 ; break ; default : Offset = 0 ; break ; } return Offset ; }
This function works out the register offset within a bank for a given
register table.
This function works out the register offset within a bank for a given register table .
/**
	 * For each given table type, work out how many LSBs are used to select
	 * a register type within a bank.
	 */ /* RM Registers */ /* The equation is ceil(log2(XPRC_VSM_REGISTERS_PER_RM)) */ /* BS Registers */ /* The equation is * ceil(log2(XPRC_VSM_REGISTERS_PER_BS)) */