Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ics.c File Reference
#include <linux/cpu.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/msi.h>
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/smp.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/xics.h>
#include "wsp.h"
#include "ics.h"

Go to the source code of this file.

Data Structures

struct  wsp_ics
 

Macros

#define to_wsp_ics(ics)   container_of(ics, struct wsp_ics, ics)
 
#define INT_SRC_LAYER_BUID_REG(base)   ((base) + 0x00)
 
#define IODA_TBL_ADDR_REG(base)   ((base) + 0x18)
 
#define IODA_TBL_DATA_REG(base)   ((base) + 0x20)
 
#define XIVE_UPDATE_REG(base)   ((base) + 0x28)
 
#define ICS_INT_CAPS_REG(base)   ((base) + 0x30)
 
#define TBL_AUTO_INCREMENT   ((1UL << 63) | (1UL << 15))
 
#define TBL_SELECT_XIST   (1UL << 48)
 
#define TBL_SELECT_XIVT   (1UL << 49)
 
#define IODA_IRQ(irq)   ((irq) & (0x7FFULL)) /* HRM 5.1.3.4 */
 
#define XIST_REQUIRED   0x8
 
#define XIST_REJECTED   0x4
 
#define XIST_PRESENTED   0x2
 
#define XIST_PENDING   0x1
 
#define XIVE_SERVER_SHIFT   42
 
#define XIVE_SERVER_MASK   0xFFFFULL
 
#define XIVE_PRIORITY_MASK   0xFFULL
 
#define XIVE_PRIORITY_SHIFT   32
 
#define XIVE_WRITE_ENABLE   (1ULL << 63)
 
#define WSP_ICS_CHIP_SHIFT   17
 

Functions

int wsp_ics_alloc_irq (struct device_node *dn, int num)
 
void wsp_ics_free_irq (struct device_node *dn, unsigned int irq)
 
void __init wsp_init_irq (void)
 

Macro Definition Documentation

#define ICS_INT_CAPS_REG (   base)    ((base) + 0x30)

Definition at line 54 of file ics.c.

#define INT_SRC_LAYER_BUID_REG (   base)    ((base) + 0x00)

Definition at line 50 of file ics.c.

#define IODA_IRQ (   irq)    ((irq) & (0x7FFULL)) /* HRM 5.1.3.4 */

Definition at line 60 of file ics.c.

#define IODA_TBL_ADDR_REG (   base)    ((base) + 0x18)

Definition at line 51 of file ics.c.

#define IODA_TBL_DATA_REG (   base)    ((base) + 0x20)

Definition at line 52 of file ics.c.

#define TBL_AUTO_INCREMENT   ((1UL << 63) | (1UL << 15))

Definition at line 56 of file ics.c.

#define TBL_SELECT_XIST   (1UL << 48)

Definition at line 57 of file ics.c.

#define TBL_SELECT_XIVT   (1UL << 49)

Definition at line 58 of file ics.c.

#define to_wsp_ics (   ics)    container_of(ics, struct wsp_ics, ics)

Definition at line 48 of file ics.c.

#define WSP_ICS_CHIP_SHIFT   17

Definition at line 79 of file ics.c.

#define XIST_PENDING   0x1

Definition at line 65 of file ics.c.

#define XIST_PRESENTED   0x2

Definition at line 64 of file ics.c.

#define XIST_REJECTED   0x4

Definition at line 63 of file ics.c.

#define XIST_REQUIRED   0x8

Definition at line 62 of file ics.c.

#define XIVE_PRIORITY_MASK   0xFFULL

Definition at line 69 of file ics.c.

#define XIVE_PRIORITY_SHIFT   32

Definition at line 70 of file ics.c.

#define XIVE_SERVER_MASK   0xFFFFULL

Definition at line 68 of file ics.c.

#define XIVE_SERVER_SHIFT   42

Definition at line 67 of file ics.c.

#define XIVE_UPDATE_REG (   base)    ((base) + 0x28)

Definition at line 53 of file ics.c.

#define XIVE_WRITE_ENABLE   (1ULL << 63)

Definition at line 71 of file ics.c.

Function Documentation

int wsp_ics_alloc_irq ( struct device_node dn,
int  num 
)

Definition at line 458 of file ics.c.

void wsp_ics_free_irq ( struct device_node dn,
unsigned int  irq 
)

Definition at line 480 of file ics.c.

void __init wsp_init_irq ( void  )

Definition at line 705 of file ics.c.