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
6 * Copyright (C) 1992-1997, 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
8 #ifndef _ASM_IA64_SN_XTALK_XTALK_PRIVATE_H
9 #define _ASM_IA64_SN_XTALK_XTALK_PRIVATE_H
11 #include <asm/sn/ioerror.h> /* for error function and arg types */
12 #include <asm/sn/xtalk/xwidget.h>
13 #include <asm/sn/xtalk/xtalk.h>
16 * xtalk_private.h -- private definitions for xtalk
17 * crosstalk drivers should NOT include this file.
21 * All Crosstalk providers set up PIO using this information.
23 struct xtalk_piomap_s
{
24 vertex_hdl_t xp_dev
; /* a requestor of this mapping */
25 xwidgetnum_t xp_target
; /* target (node's widget number) */
26 iopaddr_t xp_xtalk_addr
; /* which crosstalk addr is mapped */
27 size_t xp_mapsz
; /* size of this mapping */
28 caddr_t xp_kvaddr
; /* kernel virtual address to use */
32 * All Crosstalk providers set up DMA using this information.
34 struct xtalk_dmamap_s
{
35 vertex_hdl_t xd_dev
; /* a requestor of this mapping */
36 xwidgetnum_t xd_target
; /* target (node's widget number) */
40 * All Crosstalk providers set up interrupts using this information.
43 vertex_hdl_t xi_dev
; /* requestor of this intr */
44 xwidgetnum_t xi_target
; /* master's widget number */
45 xtalk_intr_vector_t xi_vector
; /* 8-bit interrupt vector */
46 iopaddr_t xi_addr
; /* xtalk address to generate intr */
47 void *xi_sfarg
; /* argument for setfunc */
48 xtalk_intr_setfunc_t xi_setfunc
; /* device's setfunc routine */
52 * Xtalk interrupt handler structure access functions
54 #define xwidget_hwid_is_sn1_xswitch(_hwid) \
55 (((_hwid)->part_num == XXBOW_WIDGET_PART_NUM || \
56 (_hwid)->part_num == PXBOW_WIDGET_PART_NUM) && \
57 ((_hwid)->mfg_num == XXBOW_WIDGET_MFGR_NUM ))
59 #define xwidget_hwid_is_xswitch(_hwid) \
60 xwidget_hwid_is_sn1_xswitch(_hwid)
62 /* common iograph info for all widgets,
63 * stashed in FASTINFO of widget connection points.
65 struct xwidget_info_s
{
67 vertex_hdl_t w_vertex
; /* back pointer to vertex */
68 xwidgetnum_t w_id
; /* widget id */
69 struct xwidget_hwid_s w_hwid
; /* hardware identification (part/rev/mfg) */
70 vertex_hdl_t w_master
; /* CACHED widget's master */
71 xwidgetnum_t w_masterid
; /* CACHED widget's master's widgetnum */
72 error_handler_f
*w_efunc
; /* error handling function */
73 error_handler_arg_t w_einfo
; /* first parameter for efunc */
74 char *w_name
; /* canonical hwgraph name */
77 extern char widget_info_fingerprint
[];
79 #endif /* _ASM_IA64_SN_XTALK_XTALK_PRIVATE_H */