OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [drivers/] [irq/] [omap3/] [omap3_intc.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * OMAP3XXX Interrupt Controller Defines
3
 *
4
 * Copyright 2010 B Labs Ltd.
5
 */
6
#ifndef __OMAP3_INTC_H__
7
#define __OMAP3_INTC_H__
8
 
9
#include INC_ARCH(io.h)
10
 
11
#define OMAP3_INTC_SYSCONFIG            (0x00000010) /* RW */
12
#define OMAP3_INTC_SYSSTATUS            (0x00000014) /* RO */
13
 
14
#define OMAP3_INTC_SIR_IRQ              (0x00000040) /* RO */
15
#define OMAP3_INTC_SIR_FIQ              (0x00000044) /* RO */
16
#define OMAP3_INTC_CONTROL              (0x00000048) /* RW */
17
#define OMAP3_INTC_PROT                 (0x0000004C) /* RW - Protection */
18
#define OMAP3_INTC_IDLE                 (0x00000050) /* RW */
19
 
20
#define OMAP3_INTC_IRQ_PRIO             (0x00000060) /* RW - IRQ Priority */
21
#define OMAP3_INTC_FIQ_PRIO             (0x00000064) /* RW - FIQ Priority */
22
#define OMAP3_INTC_THREASHOLD           (0x00000068) /* RW */
23
 
24
#define OMAP3_INTC_ITR                  (0x00000080) /* RO - Raw Interrupt Status*/
25
#define OMAP3_INTC_MIR                  (0x00000084) /* RW - Masked Int Status */
26
#define OMAP3_INTC_MIR_CLR              (0x00000088) /* WO - Clear Mask*/
27
#define OMAP3_INTC_MIR_SET              (0x0000008C) /* WO - Set Mask*/
28
#define OMAP3_INTC_ISR_SET              (0x00000090) /* RW - Software Int Set */
29
#define OMAP3_INTC_ISR_CLR              (0x00000094) /* WO */
30
#define OMAP3_INTC_IRQ_PEND             (0x00000098) /* RO */
31
#define OMAP3_INTC_FIQ_PEND             (0x0000009C) /* RO */
32
#define OMAP3_INTC_ILR                  (0x00000100) /* RW */
33
 
34
/* Reset Bits */
35
#define OMAP_INTC_SOFTRESET     (1 << 1)
36
 
37
static inline unsigned int omap3_intc_get_ilr(unsigned long base,
38
                                             unsigned int irq)
39
{
40
        return read((base + OMAP3_INTC_ILR + (irq * 4)));
41
}
42
 
43
static inline void  omap3_intc_set_ilr(unsigned long base, unsigned int irq,
44
                                       unsigned int val)
45
{
46
        write(val, (base + OMAP3_INTC_ILR + (irq * 4)));
47
}
48
 
49
/* Set clear Interrupt masks */
50
static inline
51
void omap3_intc_set_irq_status(unsigned long base, unsigned int reg,
52
                               unsigned int irq)
53
{
54
        unsigned int val = 0;
55
        unsigned int offset = (irq >> 5); /* Same as dividing by 32 */
56
 
57
        irq -= (offset * 32);
58
 
59
        val = read((base + reg + (0x20 * offset)));
60
        val |= (1 << irq);
61
        write(val, (base + reg + (0x20 * offset)));
62
}
63
 
64
void omap3_intc_reset(unsigned long base);
65
void omap3_intc_init(void);
66
void omap3_intc_eoi_irq(l4id_t irq);
67
void omap3_intc_mask_irq(l4id_t irq);
68
void omap3_intc_unmask_irq(l4id_t irq);
69
void omap3_intc_ack_irq(l4id_t irq);
70
void omap3_intc_ack_and_mask(l4id_t irq);
71
l4id_t omap3_intc_read_irq(void *data);
72
 
73
#endif  /* !__OMAP3_INTC_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.