summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/virtex/include/opbintctrl.h
blob: 4ade0e48f8705d06456133c1de007d354d59e4b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*  opbintctrl.h
 *
 *  This file contains definitions and declarations for the
 *  Xilinx Off Processor Bus (OPB) Interrupt Controller
 *
 *  Author: Keith Robertson <kjrobert@alumni.uwaterloo.ca>
 *  COPYRIGHT (c) 2005 by Linn Products Ltd, Scotland
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.org/license/LICENSE.
 */

#ifndef _INCLUDE_OPBINTCTRL_H
#define _INCLUDE_OPBINTCTRL_H

#include <rtems.h>
#include <rtems/system.h>
#include <rtems/score/isr.h>
#include <rtems/irq.h>
#include <bspopts.h>
#include RTEMS_XPARAMETERS_H

#define USE_GREG_INTERRUPTS

#ifdef __cplusplus
extern "C" {
#endif


/* extern XIntc InterruptController;
 */


/* Maximum number of IRQs.  Defined in vhdl model */
#define OPB_INTC_IRQ_MAX	  XPAR_INTC_MAX_NUM_INTR_INPUTS

/* Width of INTC registers.  Defined in vhdl model */
#define OPB_INTC_REGISTER_WIDTH   32

/* Base Register address and register offsets.  Defined in vhdl model  */
#define OPB_INTC_BASE		  XPAR_INTC_SINGLE_BASEADDR





/* Interrupt Status Register */
#define OPB_INTC_ISR		0x0
/* Interrupt Pending Register (ISR && IER) */
#define OPB_INTC_IPR		0x4
/* Interrupt Enable Register */
#define OPB_INTC_IER		0x8
/* Interrupt Acknowledge Register */
#define OPB_INTC_IAR		0xC
/* Set Interrupt Enable (same as read/mask/write to IER) */
#define OPB_INTC_SIE		0x10
/* Clear Interrupt Enable (same as read/mask/write to IER) */
#define OPB_INTC_CIE		0x14
/* Interrupt Vector Address (highest priority vector number from IPR) */
#define OPB_INTC_IVR		0x18
/* Master Enable Register */
#define OPB_INTC_MER		0x1C

/* Master Enable Register: Hardware Interrupt Enable */
#define OPB_INTC_MER_HIE	0x2

/* Master Enable Register: Master IRQ Enable */
#define OPB_INTC_MER_ME		0x1

#ifdef __cplusplus
}
#endif

#endif /*  _INCLUDE_OPBINTCTRL_H */