PM5358 S/UNI-4x622 Driver Manual
Sof tware Architecture
Proprietary and Confidential to PMC-Sierra, Inc. 23
Document ID: PMC-2010419, Issue 1
The driver provides system-independent functions, suni4x622ISR and suni4x622DPR. You
must fill in the corresponding system-specific functions, sysSuni4x622ISRHandler and
sysSuni4x622DPRTask. The system- specific funct ions iso la te the sy stem -specific
communication mechanism (between the ISR and DPR) from the system-independent functions,
suni4x622ISR and suni4x622DPR.
Figure 6 illustrates the interrupt service model used in the S/UNI-4x622 driver design.
Figure 6: Interrupt Service Mode
suni4x622ISR
sysSuni4x622ISRHandler
suni4x622DPR
Interrupt
Context
Information
sysSuni4x622DPRTask
Indication
Callbacks
Application
Note: Instead of using an interrupt service model, you can use a polling service model in the
S/UNI-4x622 driver to process the device’s event-indication registers (see page 26).

Calling suni4x622ISR

An interrupt handler function, which is system dependent, must call suni4x622ISR. But first,
the low-level interrupt-handler function must trap the device interrupts. You must implement this
function to fit your own system. As a reference, an example implementation of the interrupt
handler (sysSuni4x622ISRHandler) appears on page 110. You can customize this example
implementation to suit your needs.
The interrupt handler that you implement (sysSuni4x622ISRHandler) is ins tal led in the
interrupt vector table of the system processor. It is called when one or more S/UNI-4x622 devices
interrupt the processor. The interrupt handler then calls suni4x622ISR for each device in the
active state that has interrupt processing enabled.
The suni4x622ISR function reads from the master interrupt-status registers and the
miscellaneous interrupt-status registers of the S/UNI-4x622. If at least one valid interrupt
condition is found then suni4x622ISR fills an Interrupt-Service Vector (ISV) with this status
information as well as the current device handle. The suni4x622ISR function also clears and
disables all the devices interrupts detected. The sysSuni4x622ISRHandler function is then
responsible to send this ISV buffer to the DPR task.
Note: Normally you should save the status information for deferred processing by implementing a
messag e queue. The int err upt hand le r sends the sta tus inf orm ation to the queue by the
sysSuni4x622ISRHandler.