ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-ia64 / sn / xtalk / xswitch.h
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
7  */
8 #ifndef _ASM_IA64_SN_XTALK_XSWITCH_H
9 #define _ASM_IA64_SN_XTALK_XSWITCH_H
10
11 /*
12  * xswitch.h - controls the format of the data
13  * provided by xswitch verticies back to the
14  * xtalk bus providers.
15  */
16
17 #ifndef __ASSEMBLY__
18
19 #include <asm/sn/xtalk/xtalk.h>
20
21 typedef struct xswitch_info_s *xswitch_info_t;
22
23 typedef int
24                         xswitch_reset_link_f(vertex_hdl_t xconn);
25
26 typedef struct xswitch_provider_s {
27     xswitch_reset_link_f   *reset_link;
28 } xswitch_provider_t;
29
30 extern void             xswitch_provider_register(vertex_hdl_t sw_vhdl, xswitch_provider_t * xsw_fns);
31
32 xswitch_reset_link_f    xswitch_reset_link;
33
34 extern xswitch_info_t   xswitch_info_new(vertex_hdl_t vhdl);
35
36 extern void             xswitch_info_link_is_ok(xswitch_info_t xswitch_info,
37                                                 xwidgetnum_t port);
38 extern void             xswitch_info_vhdl_set(xswitch_info_t xswitch_info,
39                                               xwidgetnum_t port,
40                                               vertex_hdl_t xwidget);
41 extern void             xswitch_info_master_assignment_set(xswitch_info_t xswitch_info,
42                                                        xwidgetnum_t port,
43                                                vertex_hdl_t master_vhdl);
44
45 extern xswitch_info_t   xswitch_info_get(vertex_hdl_t vhdl);
46
47 extern int              xswitch_info_link_ok(xswitch_info_t xswitch_info,
48                                              xwidgetnum_t port);
49 extern vertex_hdl_t     xswitch_info_vhdl_get(xswitch_info_t xswitch_info,
50                                               xwidgetnum_t port);
51 extern vertex_hdl_t     xswitch_info_master_assignment_get(xswitch_info_t xswitch_info,
52                                                       xwidgetnum_t port);
53
54 #endif                          /* __ASSEMBLY__ */
55
56 #endif                          /* _ASM_IA64_SN_XTALK_XSWITCH_H */