Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
irq.c File Reference
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/string.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  intc_desc
 

Functions

unsigned int irq_of_parse_and_map (struct device_node *dev, int index)
 
 EXPORT_SYMBOL_GPL (irq_of_parse_and_map)
 
struct device_nodeof_irq_find_parent (struct device_node *child)
 
int of_irq_map_raw (struct device_node *parent, const __be32 *intspec, u32 ointsize, const __be32 *addr, struct of_irq *out_irq)
 
 EXPORT_SYMBOL_GPL (of_irq_map_raw)
 
int of_irq_map_one (struct device_node *device, int index, struct of_irq *out_irq)
 
 EXPORT_SYMBOL_GPL (of_irq_map_one)
 
int of_irq_to_resource (struct device_node *dev, int index, struct resource *r)
 
 EXPORT_SYMBOL_GPL (of_irq_to_resource)
 
int of_irq_count (struct device_node *dev)
 
int of_irq_to_resource_table (struct device_node *dev, struct resource *res, int nr_irqs)
 
 EXPORT_SYMBOL_GPL (of_irq_to_resource_table)
 
void __init of_irq_init (const struct of_device_id *matches)
 

Function Documentation

EXPORT_SYMBOL_GPL ( irq_of_parse_and_map  )
EXPORT_SYMBOL_GPL ( of_irq_map_raw  )
EXPORT_SYMBOL_GPL ( of_irq_map_one  )
EXPORT_SYMBOL_GPL ( of_irq_to_resource  )
EXPORT_SYMBOL_GPL ( of_irq_to_resource_table  )
unsigned int irq_of_parse_and_map ( struct device_node dev,
int  index 
)

irq_of_parse_and_map - Parse and map an interrupt into linux virq space : Device node of the device whose interrupt is to be mapped : Index of the interrupt to map

This function is a wrapper that chains of_irq_map_one() and irq_create_of_mapping() to make things easier to callers

Definition at line 37 of file irq.c.

int of_irq_count ( struct device_node dev)

of_irq_count - Count the number of IRQs a node uses : pointer to device tree node

Definition at line 368 of file irq.c.

struct device_node* of_irq_find_parent ( struct device_node child)
read

of_irq_find_parent - Given a device node, find its interrupt parent node : pointer to device node

Returns a pointer to the interrupt parent node, or NULL if the interrupt parent could not be determined.

Definition at line 56 of file irq.c.

void __init of_irq_init ( const struct of_device_id matches)

of_irq_init - Scan and init matching interrupt controllers in DT : 0 terminated array of nodes to match and init function to call

This function scans the device tree for matching interrupt controller nodes, and calls their initialization functions in order with parents first.

Definition at line 412 of file irq.c.

int of_irq_map_one ( struct device_node device,
int  index,
struct of_irq *  out_irq 
)

of_irq_map_one - Resolve an interrupt for a device : the device whose interrupt is to be resolved : index of the interrupt to resolve : structure of_irq filled by this function

This function resolves an interrupt, walking the tree, for a given device-tree node. It's the high level pendant to of_irq_map_raw().

Definition at line 283 of file irq.c.

int of_irq_map_raw ( struct device_node parent,
const __be32 intspec,
u32  ointsize,
const __be32 addr,
struct of_irq *  out_irq 
)

of_irq_map_raw - Low level interrupt tree parsing : the device interrupt parent : interrupt specifier ("interrupts" property of the device) : size of the passed in interrupt specifier : address specifier (start of "reg" property of the device) : structure of_irq filled by this function

Returns 0 on success and a negative number on error

This function is a low-level interrupt tree walking function. It can be used to do a partial walk with synthetized reg and interrupts properties, for example when resolving PCI interrupts when no device node exist for the parent.

Definition at line 96 of file irq.c.

int of_irq_to_resource ( struct device_node dev,
int  index,
struct resource r 
)

of_irq_to_resource - Decode a node's IRQ and return it as a resource : pointer to device tree node : zero-based index of the irq : pointer to resource structure to return result into.

Definition at line 339 of file irq.c.

int of_irq_to_resource_table ( struct device_node dev,
struct resource res,
int  nr_irqs 
)

of_irq_to_resource_table - Fill in resource table with node's IRQ info : pointer to device tree node : array of resources to fill in : the number of IRQs (and upper bound for num of elements)

Returns the size of the filled in table (up to ).

Definition at line 386 of file irq.c.