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-2005 Silicon Graphics, Inc. All rights reserved.
8 #ifndef _ASM_IA64_SN_XTALK_HUBDEV_H
9 #define _ASM_IA64_SN_XTALK_HUBDEV_H
11 #include "xtalk/xwidgetdev.h"
13 #define HUB_WIDGET_ID_MAX 0xf
14 #define DEV_PER_WIDGET (2*2*8)
15 #define IIO_ITTE_WIDGET_BITS 4 /* size of widget field */
16 #define IIO_ITTE_WIDGET_MASK ((1<<IIO_ITTE_WIDGET_BITS)-1)
17 #define IIO_ITTE_WIDGET_SHIFT 8
19 #define IIO_ITTE_WIDGET(itte) \
20 (((itte) >> IIO_ITTE_WIDGET_SHIFT) & IIO_ITTE_WIDGET_MASK)
23 * Use the top big window as a surrogate for the first small window
25 #define SWIN0_BIGWIN HUB_NUM_BIG_WINDOW
26 #define IIO_NUM_ITTES 7
27 #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1)
29 /* This struct is shared between the PROM and the kernel.
30 * Changes to this struct will require corresponding changes to the kernel.
32 struct sn_flush_device_common {
36 struct common_bar_list {
40 unsigned long sfdl_force_int_addr;
41 unsigned long sfdl_flush_value;
42 volatile unsigned long *sfdl_flush_addr;
43 uint32_t sfdl_persistent_busnum;
44 uint32_t sfdl_persistent_segment;
45 struct pcibus_info *sfdl_pcibus_info;
48 /* This struct is kernel only and is not used by the PROM */
49 struct sn_flush_device_kernel {
50 spinlock_t sfdl_flush_lock;
51 struct sn_flush_device_common *common;
55 * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel.
57 struct sn_flush_nasid_entry {
58 struct sn_flush_device_kernel **widget_p; // Used as an array of wid_num
65 short hdi_peer_nasid; /* Dual Porting Peer */
67 struct sn_flush_nasid_entry hdi_flush_nasid_list;
68 struct xwidget_info hdi_xwidget_info[HUB_WIDGET_ID_MAX + 1];
72 void *hdi_node_vertex;
73 uint32_t max_segment_number;
74 uint32_t max_pcibus_number;
77 extern void hubdev_init_node(nodepda_t *, cnodeid_t);
78 extern void hub_error_init(struct hubdev_info *);
79 extern void ice_error_init(struct hubdev_info *);
82 #endif /* _ASM_IA64_SN_XTALK_HUBDEV_H */