linux/drivers/mxc/security/sahara2/sah_interrupt_handler.c File Reference

Provides a hardware interrupt handling mechanism for device driver. More...

Functions

static irqreturn_t sah_Intr_Top_Half (int irq, void *dev_id)
static void sah_Intr_Bottom_Half (unsigned long reset_flag)
int sah_Intr_Init (wait_queue_head_t *wait_queue)
void sah_Intr_Release (void)

Variables

uint32_t interrupt_count
wait_queue_head_t * int_queue = NULL

Detailed Description

Provides a hardware interrupt handling mechanism for device driver.

This file needs to be ported for a non-Linux OS.

It gets a call at sah_Intr_Init() during initialization.

sah_Intr_Top_Half() is intended to be the Interrupt Service Routine. It calls a portable function in another file to process the Sahara status.

sah_Intr_Bottom_Half() is a 'background' task scheduled by the top half to take care of the expensive tasks of the interrupt processing.

The driver shutdown code calls sah_Intr_Release().


Function Documentation

static void sah_Intr_Bottom_Half ( unsigned long  reset_flag  )  [static]

SAHARA Interrupt Handler Bottom Half.

This function is the Bottom Half of the interrupt handler. It calls sah_postprocess_queue() to complete the processing of the Descriptor Chains which were finished by the hardware.

Parameters:
data Part of the kernel prototype.
Returns:
void

References sah_postprocess_queue().

int sah_Intr_Init ( wait_queue_head_t *  wait_queue  ) 

SAHARA Interrupt Handler Initialisation.

This function registers the Top Half of the interrupt handler with the Kernel and the SAHARA IRQ number.

Parameters:
wait_queue Pointer to the wait queue used by driver interface
Returns:
int A return of Zero indicates successful initialisation.

References sah_Intr_Top_Half().

Referenced by OS_DEV_INIT().

void sah_Intr_Release ( void   ) 

SAHARA Interrupt Handler Release.

This function releases the Top Half of the interrupt handler. The driver will not receive any more interrupts after calling this functions.

Returns:
void

Referenced by OS_DEV_SHUTDOWN().

static irqreturn_t sah_Intr_Top_Half ( int  irq,
void *  dev_id 
) [static]

SAHARA Interrupt Handler Top Half.

This function is the Top Half of the interrupt handler. It updates the status of any finished descriptor chains and then tries to add any pending requests into the hardware. It then queues the bottom half to complete operations on the finished chains.

Parameters:
irq Part of the kernel prototype.
dev_id Part of the kernel prototype.
Returns:
An IRQ_RETVAL() -- non-zero to that function means 'handled'

References interrupt_count, IRQ_RETVAL, sah_Handle_Interrupt(), and sah_HW_Read_Status().

Referenced by sah_Intr_Init().


Variable Documentation

wait_queue_head_t* int_queue = NULL

This is set by the Initialisation function

Referenced by sah_process_finished_request().

uint32_t interrupt_count

Number of interrupts received. This value should only be updated during interrupt processing.

Referenced by sah_Intr_Top_Half().

footer
©  Freescale Semiconductor, Inc., 2007.  All rights reserved.
Freescale Confidential Proprietary
NDA Required
doxygen