1 | /////////////////////////////////////////////////////////////////////////////////// |
---|
2 | // File : xcu_driver.h |
---|
3 | // Date : 01/11/2013 |
---|
4 | // Author : alain greiner |
---|
5 | // Copyright (c) UPMC-LIP6 |
---|
6 | /////////////////////////////////////////////////////////////////////////////////// |
---|
7 | |
---|
8 | #ifndef _GIET_XCU_DRIVER_H_ |
---|
9 | #define _GIET_XCU_DRIVER_H_ |
---|
10 | |
---|
11 | /////////////////////////////////////////////////////////////////////////////////// |
---|
12 | // XICU registers offsets |
---|
13 | /////////////////////////////////////////////////////////////////////////////////// |
---|
14 | |
---|
15 | enum Xicu_registers |
---|
16 | { |
---|
17 | XICU_WTI_REG = 0, |
---|
18 | XICU_PTI_PER = 1, |
---|
19 | XICU_PTI_VAL = 2, |
---|
20 | XICU_PTI_ACK = 3, |
---|
21 | |
---|
22 | XICU_MSK_PTI = 4, |
---|
23 | XICU_MSK_PTI_ENABLE = 5, |
---|
24 | XICU_MSK_PTI_DISABLE = 6, |
---|
25 | XICU_PTI_ACTIVE = 6, |
---|
26 | |
---|
27 | XICU_MSK_HWI = 8, |
---|
28 | XICU_MSK_HWI_ENABLE = 9, |
---|
29 | XICU_MSK_HWI_DISABLE = 10, |
---|
30 | XICU_HWI_ACTIVE = 10, |
---|
31 | |
---|
32 | XICU_MSK_WTI = 12, |
---|
33 | XICU_MSK_WTI_ENABLE = 13, |
---|
34 | XICU_MSK_WTI_DISABLE = 14, |
---|
35 | XICU_WTI_ACTIVE = 14, |
---|
36 | |
---|
37 | XICU_PRIO = 15, |
---|
38 | }; |
---|
39 | |
---|
40 | #define XICU_REG(func, index) (((func)<<5)|(index)) |
---|
41 | |
---|
42 | /////////////////////////////////////////////////////////////////////////////////// |
---|
43 | // XICU access functions |
---|
44 | /////////////////////////////////////////////////////////////////////////////////// |
---|
45 | |
---|
46 | extern unsigned int _xcu_get_index( unsigned int cluster_id, |
---|
47 | unsigned int proc_id, |
---|
48 | unsigned int * buffer ); |
---|
49 | |
---|
50 | extern unsigned int _xcu_set_mask( unsigned int cluster_id, |
---|
51 | unsigned int proc_id, |
---|
52 | unsigned int mask, |
---|
53 | unsigned int is_timer ); |
---|
54 | |
---|
55 | extern unsigned int _xcu_send_ipi( unsigned int cluster_id, |
---|
56 | unsigned int proc_id, |
---|
57 | unsigned int wdata ); |
---|
58 | |
---|
59 | extern unsigned int _xcu_timer_start( unsigned int cluster_id, |
---|
60 | unsigned int local_id, |
---|
61 | unsigned int period ); |
---|
62 | |
---|
63 | extern unsigned int _xcu_timer_stop( unsigned int cluster_id, |
---|
64 | unsigned int local_id ); |
---|
65 | |
---|
66 | extern unsigned int _xcu_timer_reset_irq( unsigned int cluster_id, |
---|
67 | unsigned int local_id ); |
---|
68 | |
---|
69 | extern unsigned int _xcu_timer_reset_cpt( unsigned int cluster_id, |
---|
70 | unsigned int local_id ); |
---|
71 | |
---|
72 | /////////////////////////////////////////////////////////////////////////////////// |
---|
73 | |
---|
74 | #endif |
---|
75 | |
---|
76 | // Local Variables: |
---|
77 | // tab-width: 4 |
---|
78 | // c-basic-offset: 4 |
---|
79 | // c-file-offsets:((innamespace . 0)(inline-open . 0)) |
---|
80 | // indent-tabs-mode: nil |
---|
81 | // End: |
---|
82 | // vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
83 | |
---|