summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/or1k/or1ksim/include/irq.h
blob: be669d84a0a3090e384a2ce2a4f65abac8062f4b (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
/**
 * @file
 *
 * @ingroup or1ksim_interrupt
 *
 * @brief Interrupt definitions.
 */

/**
 * COPYRIGHT (c) 2014 Hesham ALMatary <heshamelmatary@gmail.com>
 *
 * 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 LIBBSP_OR1K_OR1KSIM_IRQ_H
#define LIBBSP_OR1K_OR1KSIM_IRQ_H

#ifndef ASM

#include <rtems.h>
#include <rtems/irq.h>
#include <rtems/irq-extension.h>

#define BSP_INTERRUPT_VECTOR_MIN  0x100
#define BSP_INTERRUPT_VECTOR_MAX  0x1F00

/* Interrupt Identification Register */
#define OR1KSIM_BSP_UART_REG_INT_ID_MSI    (0x00)
#define OR1KSIM_BSP_UART_REG_INT_ID_NO_INT (0x01)
#define OR1KSIM_BSP_UART_REG_INT_ID_THRI   (0x02)
#define OR1KSIM_BSP_UART_REG_INT_ID_RDI    (0x04)
#define OR1KSIM_BSP_UART_REG_INT_ID_ID     (0x06)
#define OR1KSIM_BSP_UART_REG_INT_ID_RLSI   (0x06)
#define OR1KSIM_BSP_UART_REG_INT_ID_TOI    (0x0c)

/* Interrupt Enable Register */
#define OR1KSIM_BSP_UART_REG_INT_ENABLE_RDI  (0x01)
#define OR1KSIM_BSP_UART_REG_INT_ENABLE_THRI (0x02)
#define OR1KSIM_BSP_UART_REG_INT_ENABLE_RLSI (0x04)
#define OR1KSIM_BSP_UART_REG_INT_ENABLE_MSI  (0x08)

#endif /* ASM */
#endif /* LIBBSP_OR1K_OR1KSIM_IRQ_H */