[258] | 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)) |
---|
[263] | 41 | |
---|
[258] | 42 | /////////////////////////////////////////////////////////////////////////////////// |
---|
| 43 | // XICU access functions |
---|
| 44 | /////////////////////////////////////////////////////////////////////////////////// |
---|
| 45 | |
---|
[263] | 46 | extern unsigned int _xcu_get_index( unsigned int cluster_xy, |
---|
[258] | 47 | unsigned int proc_id, |
---|
| 48 | unsigned int * buffer ); |
---|
| 49 | |
---|
[263] | 50 | extern unsigned int _xcu_set_mask( unsigned int cluster_xy, |
---|
[258] | 51 | unsigned int proc_id, |
---|
| 52 | unsigned int mask, |
---|
| 53 | unsigned int is_timer ); |
---|
| 54 | |
---|
[263] | 55 | extern unsigned int _xcu_send_ipi( unsigned int cluster_xy, |
---|
[258] | 56 | unsigned int proc_id, |
---|
| 57 | unsigned int wdata ); |
---|
| 58 | |
---|
[263] | 59 | extern unsigned int _xcu_timer_start( unsigned int cluster_xy, |
---|
| 60 | unsigned int proc_id, |
---|
[258] | 61 | unsigned int period ); |
---|
| 62 | |
---|
[263] | 63 | extern unsigned int _xcu_timer_stop( unsigned int cluster_xy, |
---|
| 64 | unsigned int proc_id ); |
---|
[258] | 65 | |
---|
[263] | 66 | extern unsigned int _xcu_timer_reset_irq( unsigned int cluster_xy, |
---|
| 67 | unsigned int proc_id ); |
---|
[258] | 68 | |
---|
[263] | 69 | extern unsigned int _xcu_timer_reset_cpt( unsigned int cluster_xy, |
---|
| 70 | unsigned int proc_id ); |
---|
[258] | 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 | |
---|