source: soft/giet_vm/giet_drivers/pic_driver.h @ 827

Last change on this file since 827 was 437, checked in by alain, 10 years ago

Introducing dynamic allocation of peripheral channel(TTY, NIC, TIM, CMA)
Removint the ICU driver : ICU component not supported anymore.
Removing the FBF driver.

File size: 3.1 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////
2// File     : pic_driver.h
3// Date     : 05/03/2014
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7// The pic_driver.c and pic_drivers.h files are part ot the GIET-VM kernel.
8// This driver supports the SocLib vci_iopic component.
9//
10// The SEG_PIC_BASE address must be defined in hard_config.h file.
11///////////////////////////////////////////////////////////////////////////////////
12
13#ifndef _GIET_PIC_DRIVERS_H_
14#define _GIET_PIC_DRIVERS_H_
15
16///////////////////////////////////////////////////////////////////////////////////
17//                      registers offsets
18///////////////////////////////////////////////////////////////////////////////////
19
20enum PIC_registers
21{
22    IOPIC_ADDRESS = 0,
23    IOPIC_EXTEND  = 1,
24    IOPIC_STATUS  = 2,
25    IOPIC_MASK    = 3,
26    /**/
27    IOPIC_SPAN    = 4,
28};
29
30//////////////////////////////////////////////////////////////////////////////////
31//                      access functions
32//////////////////////////////////////////////////////////////////////////////////
33
34/////////////////////////////////////////////////////////////////////////////////
35// This function initializes the XICU target physical address (vaddr + extend)
36// corresponding to a given HWI channel.
37/////////////////////////////////////////////////////////////////////////////////
38extern void _pic_init( unsigned int channel,     // source PIC HWI channel
39                       unsigned int vaddr,       // dest XCU WTI address
40                       unsigned int extend );    // dest XCU cluster_xy
41
42/////////////////////////////////////////////////////////////////////////////////
43// This function returns the status of a given HWI channel.
44/////////////////////////////////////////////////////////////////////////////////
45extern unsigned int _pic_get_status( unsigned int channel ); 
46
47///////////////////////////////////////////////////////////////////////////////////
48// low-level access functions
49///////////////////////////////////////////////////////////////////////////////////
50
51/////////////////////////////////////////////////////////////////////////////////
52// This low level function returns the value of register (channel / index)
53/////////////////////////////////////////////////////////////////////////////////
54extern unsigned int _pic_get_register( unsigned int channel,
55                                       unsigned int index );
56
57/////////////////////////////////////////////////////////////////////////////////
58// This low level function set a new value in register (channel / index) 
59/////////////////////////////////////////////////////////////////////////////////
60extern void _pic_set_register( unsigned int channel,
61                               unsigned int index,
62                               unsigned int value );
63
64#endif
65
66// Local Variables:
67// tab-width: 4
68// c-basic-offset: 4
69// c-file-offsets:((innamespace . 0)(inline-open . 0))
70// indent-tabs-mode: nil
71// End:
72// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
73
Note: See TracBrowser for help on using the repository browser.