Linux Kernel
3.7.1
|
#include <linux/init.h>
#include <linux/err.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/module.h>
#include <mach/ipu.h>
#include "ipu_intern.h"
Go to the source code of this file.
Data Structures | |
struct | ipu_irq_bank |
struct | ipu_irq_map |
Macros | |
#define | IPU_IRQ_NR_FN_BANKS 3 |
#define | IPU_IRQ_NR_ERR_BANKS 2 |
#define | IPU_IRQ_NR_BANKS (IPU_IRQ_NR_FN_BANKS + IPU_IRQ_NR_ERR_BANKS) |
Functions | |
bool | ipu_irq_status (unsigned int irq) |
int | ipu_irq_map (unsigned int source) |
int | ipu_irq_unmap (unsigned int source) |
int __init | ipu_irq_attach_irq (struct ipu *ipu, struct platform_device *dev) |
void | ipu_irq_detach_irq (struct ipu *ipu, struct platform_device *dev) |
#define IPU_IRQ_NR_BANKS (IPU_IRQ_NR_FN_BANKS + IPU_IRQ_NR_ERR_BANKS) |
void ipu_irq_detach_irq | ( | struct ipu * | ipu, |
struct platform_device * | dev | ||
) |
int ipu_irq_map | ( | unsigned int | source | ) |
ipu_irq_map() - map an IPU interrupt source to an IRQ number : interrupt source bit position (see below)
The source parameter has to be explained further. On i.MX31 IPU has 137 IRQ sources, they are broken down in 5 32-bit registers, like 32, 32, 24, 32, 17. However, the source argument of this function is not the sequence number of the possible IRQ, but rather its bit position. So, first interrupt in fourth register has source number 96, and not 88. This makes calculations easier, and also provides forward compatibility with any future IPU implementations with any interrupt bit assignments.
ipu_irq_map() - map an IPU interrupt source to an IRQ number : interrupt source bit position (see ipu_irq_map())