1 | /* |
---|
2 | * |
---|
3 | * This file contains the implementation of the function described in irq.h |
---|
4 | * |
---|
5 | * Copyright (C) 1998, 1999 valette@crf.canon.fr |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | * |
---|
11 | * Dummy support for just the decrementer interrupt but no PIC. |
---|
12 | * |
---|
13 | * T. Straumann, 2007/11/30 |
---|
14 | * |
---|
15 | * irq.c,v 1.4.2.8 2003/09/04 18:45:20 joel Exp |
---|
16 | */ |
---|
17 | #include <rtems.h> |
---|
18 | #include <bsp.h> |
---|
19 | #include <bsp/irq.h> |
---|
20 | #include <bsp/irq_supp.h> |
---|
21 | #include <libcpu/raw_exception.h> |
---|
22 | |
---|
23 | static rtems_irq_connect_data *rtems_hdl_tbl; |
---|
24 | static rtems_irq_connect_data dflt_entry; |
---|
25 | |
---|
26 | /* |
---|
27 | * High level IRQ handler called from shared_raw_irq_code_entry |
---|
28 | */ |
---|
29 | void C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int excNum) |
---|
30 | { |
---|
31 | register uint32_t l_orig; |
---|
32 | |
---|
33 | if (excNum == ASM_DEC_VECTOR) { |
---|
34 | |
---|
35 | l_orig = _ISR_Get_level(); |
---|
36 | /* re-enable all interrupts */ |
---|
37 | _ISR_Set_level(0); |
---|
38 | |
---|
39 | bsp_irq_dispatch_list(rtems_hdl_tbl, BSP_DECREMENTER, dflt_entry.hdl); |
---|
40 | |
---|
41 | _ISR_Set_level(l_orig); |
---|
42 | return; |
---|
43 | |
---|
44 | } |
---|
45 | } |
---|
46 | |
---|
47 | void |
---|
48 | BSP_enable_irq_at_pic(const rtems_irq_number irq) |
---|
49 | { |
---|
50 | } |
---|
51 | |
---|
52 | int |
---|
53 | BSP_disable_irq_at_pic(const rtems_irq_number irq) |
---|
54 | { |
---|
55 | return 0; |
---|
56 | } |
---|
57 | |
---|
58 | int |
---|
59 | BSP_setup_the_pic(rtems_irq_global_settings *config) |
---|
60 | { |
---|
61 | dflt_entry = config->defaultEntry; |
---|
62 | rtems_hdl_tbl = config->irqHdlTbl; |
---|
63 | return 1; |
---|
64 | } |
---|