SDL API Guide for J721E
|
Functions | |
uint32_t | SDL_VIM_getRevision (SDL_vimRegs *pRegs) |
Return revision of the VIM module. More... | |
uint32_t | SDL_VIM_getNumIntrs (SDL_vimRegs *pRegs) |
Get the number of interrupts supported by this VIM. More... | |
int32_t | SDL_VIM_cfgIntr (SDL_vimRegs *pRegs, uint32_t intrNum, uint32_t pri, SDL_VimIntrMap intrMap, SDL_VimIntrType intrType, uint32_t vecAddr) |
Configure a source interrupt using VIM. More... | |
int32_t | SDL_VIM_verifyCfgIntr (SDL_vimRegs *pRegs, uint32_t intrNum, uint32_t pri, SDL_VimIntrMap intrMap, SDL_VimIntrType intrType, uint32_t vecAddr) |
Read back Verify Configure a source interrupt. More... | |
int32_t | SDL_VIM_getIntrType (SDL_vimRegs *pRegs, uint32_t intrNum) |
Get the interrupt type. More... | |
void | SDL_VIM_setDedVectorAddr (SDL_vimRegs *pRegs, uint32_t dedVectorAddr) |
Set the DED interrupt vector address. More... | |
int32_t | SDL_VIM_getDedVectorAddr (SDL_vimRegs *pRegs, uint32_t *pDedVectorAddr) |
Get the DED interrupt vector address. More... | |
int32_t | SDL_VIM_getActivePendingIntr (SDL_vimRegs *pRegs, SDL_VimIntrMap intrMap, uint32_t *pIntrNum, uint32_t *pPri) |
Get information on the current highest priority pending interrupt. More... | |
uint32_t | SDL_VIM_getIrqVectorAddress (SDL_vimRegs *pRegs) |
Get the current IRQ vector address. More... | |
uint32_t | SDL_VIM_getFiqVectorAddress (SDL_vimRegs *pRegs) |
Get the current FIQ vector address. More... | |
uint32_t | SDL_VIM_getGroupsIntrPending (SDL_vimRegs *pRegs, SDL_VimIntrMap intrMap) |
Get bit-mask of masked interrupt status for all interrupt groups. More... | |
uint32_t | SDL_VIM_getGroupIntrPending (SDL_vimRegs *pRegs, SDL_VimIntrMap intrMap, uint32_t groupNum, bool bMasked) |
Get bit-mask of raw or masked interrupt status for all interrupts within a group. More... | |
int32_t | SDL_VIM_setIntrPending (SDL_vimRegs *pRegs, uint32_t intrNum) |
Set the raw interrupt status bit for the specified interrupt. More... | |
int32_t | SDL_VIM_clrIntrPending (SDL_vimRegs *pRegs, uint32_t intrNum) |
Clear the raw interrupt status bit for the specified interrupt. More... | |
int32_t | SDL_VIM_ackIntr (SDL_vimRegs *pRegs, SDL_VimIntrMap intrMap) |
Acknowledge servicing is complete for the specified interrupt type. More... | |
int32_t | SDL_VIM_setIntrEnable (SDL_vimRegs *pRegs, uint32_t intrNum, bool bEnable) |
Enable or disable interrupt status mask for the specified interrupt. More... | |
int32_t | SDL_VIM_getStaticRegs (SDL_vimRegs *pRegs, SDL_vimStaticRegs *pStaticRegs) |
Read back of static registers for VIM. More... | |
uint32_t SDL_VIM_getRevision | ( | SDL_vimRegs * | pRegs | ) |
Return revision of the VIM module.
This function returns the contents of the VIM revision register. Consult the VIM module documentation for a description of the contents of the revision register.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
uint32_t SDL_VIM_getNumIntrs | ( | SDL_vimRegs * | pRegs | ) |
Get the number of interrupts supported by this VIM.
This function returns the number of interrupts supported by this VIM. This value is always a multiple of 32.
The number of interrupt groups = number of interrupts / 32.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
int32_t SDL_VIM_cfgIntr | ( | SDL_vimRegs * | pRegs, |
uint32_t | intrNum, | ||
uint32_t | pri, | ||
SDL_VimIntrMap | intrMap, | ||
SDL_VimIntrType | intrType, | ||
uint32_t | vecAddr | ||
) |
Configure a source interrupt using VIM.
This function configures the specified source interrupt per the provided parameters.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrNum | [IN] Interrupt number (0..SDL_VIM_getNumIntrs()-1) |
pri | [IN] Interrupt priority (0(highest)..15(lowest)) |
intrMap | [IN] Interrupt mapping (SDL_VIM_INTR_MAP_IRQ or SDL_VIM_INTR_MAP_FIQ, see SDL_VimIntrMap) |
intrType | [IN] Interrupt type (SDL_VIM_INTR_TYPE_LEVEL or SDL_VIM_INTR_TYPE_PULSE, see SDL_VimIntrType) |
vecAddr | [IN] 32-bit vector address (forced to 32-bit alignment) |
int32_t SDL_VIM_verifyCfgIntr | ( | SDL_vimRegs * | pRegs, |
uint32_t | intrNum, | ||
uint32_t | pri, | ||
SDL_VimIntrMap | intrMap, | ||
SDL_VimIntrType | intrType, | ||
uint32_t | vecAddr | ||
) |
Read back Verify Configure a source interrupt.
This function verifies the writetn configuration of interrupt for the specified source interrupt per the provided parameters.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrNum | [IN] Interrupt number (0..SDL_VIM_getNumIntrs()-1) |
pri | [IN] Interrupt priority (0(highest)..15(lowest)) |
intrMap | [IN] Interrupt mapping (SDL_VIM_INTR_MAP_IRQ or SDL_VIM_INTR_MAP_FIQ, see SDL_VimIntrMap) |
intrType | [IN] Interrupt type (SDL_VIM_INTR_TYPE_LEVEL or SDL_VIM_INTR_TYPE_PULSE, see SDL_VimIntrType) |
vecAddr | [IN] 32-bit vector address (forced to 32-bit alignment) |
int32_t SDL_VIM_getIntrType | ( | SDL_vimRegs * | pRegs, |
uint32_t | intrNum | ||
) |
Get the interrupt type.
This function returns the interrupt type for the specified interrupt number.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrNum | [IN] Interrupt number (0..SDL_VIM_getNumIntrs()-1) |
void SDL_VIM_setDedVectorAddr | ( | SDL_vimRegs * | pRegs, |
uint32_t | dedVectorAddr | ||
) |
Set the DED interrupt vector address.
This function sets the 32-bit interrupt vector address (the address must be 32-bit aligned) of an interrupt to be used if an uncorrectable double-bit error (DED) is detected in any of the interrupt vector addresses. If there is a DED, the pVectorAddr argument of the SDL_VIM_getActivePendingIntr function will be populated with the value in this field instead of their normal vector.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
dedVectorAddr | [IN] The 32-bit DED interrupt vector address |
int32_t SDL_VIM_getDedVectorAddr | ( | SDL_vimRegs * | pRegs, |
uint32_t * | pDedVectorAddr | ||
) |
Get the DED interrupt vector address.
This function sets the 32-bit interrupt vector address (the address must be 32-bit aligned) of an interrupt to be used if an uncorrectable double-bit error (DED) is detected in any of the interrupt vector addresses. If there is a DED, the pVectorAddr argument of the SDL_VIM_getActivePendingIntr function will be populated with the value in this field instead of their normal vector.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
pDedVectorAddr | [OUT] Pointer to the 32-bit DED interrupt vector address |
int32_t SDL_VIM_getActivePendingIntr | ( | SDL_vimRegs * | pRegs, |
SDL_VimIntrMap | intrMap, | ||
uint32_t * | pIntrNum, | ||
uint32_t * | pPri | ||
) |
Get information on the current highest priority pending interrupt.
This function returns information on the current highest priority pending interrupt. The SDL_VIM_getIrqVectorAddress or SDL_VIM_getFiqVectorAddress functions can be called to get the vector address associated with the pending interrupt.
There are two types of pending interrupts that can be queried: SDL_VIM_INTR_MAP_IRQ or SDL_VIM_INTR_MAP_FIQ (see SDL_VimIntrMap).
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrMap | [IN] Type of active interrupt to query (see SDL_VimIntrMap) |
pIntrNum | [OUT] Pointer where interrupt number is returned |
pPri | [OUT] Pointer where priority of interrupt is returned |
uint32_t SDL_VIM_getIrqVectorAddress | ( | SDL_vimRegs * | pRegs | ) |
Get the current IRQ vector address.
This function returns the 32-bit interrupt vector address of the currently pending IRQ interrupt.
Note that the vector address returned is valid only if there is a pending interrupt.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
uint32_t SDL_VIM_getFiqVectorAddress | ( | SDL_vimRegs * | pRegs | ) |
Get the current FIQ vector address.
This function returns the 32-bit interrupt vector address of the currently pending FIQ interrupt.
Note that the vector address returned is valid only if there is a pending interrupt.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
uint32_t SDL_VIM_getGroupsIntrPending | ( | SDL_vimRegs * | pRegs, |
SDL_VimIntrMap | intrMap | ||
) |
Get bit-mask of masked interrupt status for all interrupt groups.
This function returns a 32-bit mask of the masked interrupt status for all interrupt groups, where bit # M in the mask indicates the masked interrupt status for interrupt group M (0 = no interrupt pending for that group, 1 = interrupt is pending for that group).
Group M aggregates the interrupt status for interrupt numbers 32*M ... (32*M)+31. The SDL_VIM_getGroupIntrPending function can be called to return a bit-mask of the raw or masked interrupt status for all 32 interrupts in a group.
There are two types of pending interrupts that can be queried: SDL_VIM_INTR_MAP_IRQ or SDL_VIM_INTR_MAP_FIQ (see SDL_VimIntrMap).
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrMap | [IN] Type of interrupt to query (see SDL_VimIntrMap) |
uint32_t SDL_VIM_getGroupIntrPending | ( | SDL_vimRegs * | pRegs, |
SDL_VimIntrMap | intrMap, | ||
uint32_t | groupNum, | ||
bool | bMasked | ||
) |
Get bit-mask of raw or masked interrupt status for all interrupts within a group.
This function returns a 32-bit mask of the raw or masked interrupt status for all interrupts within the specified interrupt group, where bit # N in the mask indicates the pending interrupt status for interrupt source (32*groupNum)+N (0 = no interrupt pending, 1 = interrupt is pending).
The SDL_VIM_getGroupsIntrPending function can be called to return a bit-mask of the masked interrupt status for all 32 interrupt groups.
If bMasked is false, the raw interrupt status is returned. If bMasked is true, then intrMap determines the type of masked interrupt status returned as follows: SDL_VIM_INTR_MAP_IRQ = Masked IRQ interrupt status SDL_VIM_INTR_MAP_FIQ = Masked FIQ interrupt status SDL_VIM_INTR_MAP_ALL = Masked IRQ and FIQ interrupt status
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrMap | [IN] Type of interrupt to query (see SDL_VimIntrMap) |
groupNum | [IN] Interrupt group number (0..31) |
bMasked | [IN] false = return raw interrupt status true = return masked interrupt status |
int32_t SDL_VIM_setIntrPending | ( | SDL_vimRegs * | pRegs, |
uint32_t | intrNum | ||
) |
Set the raw interrupt status bit for the specified interrupt.
This function forcibly sets the raw interrupt status bit for the specified interrupt number.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrNum | [IN] Interrupt number (0..SDL_VIM_getNumIntrs()-1) |
int32_t SDL_VIM_clrIntrPending | ( | SDL_vimRegs * | pRegs, |
uint32_t | intrNum | ||
) |
Clear the raw interrupt status bit for the specified interrupt.
This function clears the raw interrupt status bit for the specified interrupt number.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrNum | [IN] Interrupt number (0..SDL_VIM_getNumIntrs()-1) |
int32_t SDL_VIM_ackIntr | ( | SDL_vimRegs * | pRegs, |
SDL_VimIntrMap | intrMap | ||
) |
Acknowledge servicing is complete for the specified interrupt type.
The function is used to acknowlege that the specified interrupt type has been serviced. The VIM will then re-evaluate the new highest priority interrupt.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrMap | [IN] Interrupt map type (see SDL_VimIntrMap) |
int32_t SDL_VIM_setIntrEnable | ( | SDL_vimRegs * | pRegs, |
uint32_t | intrNum, | ||
bool | bEnable | ||
) |
Enable or disable interrupt status mask for the specified interrupt.
The function is used to enable or disable the interrupt status mask for the specified interrupt. Interrupt sources with an enabled mask are used in the generation of the output IRQ or FIQ interrupt. Interrupt sources with a disabled mask are not used in the generation of the output IRQ or FIQ interrupt.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrNum | [IN] Interrupt number (0..SDL_VIM_getNumIntrs()-1) |
bEnable | [IN] false = disable interrupt status mask true = enable interrupt status mask |
int32_t SDL_VIM_getStaticRegs | ( | SDL_vimRegs * | pRegs, |
SDL_vimStaticRegs * | pStaticRegs | ||
) |
Read back of static registers for VIM.
The function is used to acknowlege that the specified interrupt type has been serviced. The VIM will then re-evaluate the new highest priority interrupt.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
pStaticRegs | [IN] Pointer to the SDL_vimStaticRegs structure to hold the static register values The static register set is defined to be the list of registers that hardware does not update by itself |