Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hubdev.h
Go to the documentation of this file.
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-2005 Silicon Graphics, Inc. All rights reserved.
7  */
8 #ifndef _ASM_IA64_SN_XTALK_HUBDEV_H
9 #define _ASM_IA64_SN_XTALK_HUBDEV_H
10 
11 #include "xtalk/xwidgetdev.h"
12 
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
18 
19 #define IIO_ITTE_WIDGET(itte) \
20  (((itte) >> IIO_ITTE_WIDGET_SHIFT) & IIO_ITTE_WIDGET_MASK)
21 
22 /*
23  * Use the top big window as a surrogate for the first small window
24  */
25 #define SWIN0_BIGWIN HUB_NUM_BIG_WINDOW
26 #define IIO_NUM_ITTES 7
27 #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1)
28 
29 /* This struct is shared between the PROM and the kernel.
30  * Changes to this struct will require corresponding changes to the kernel.
31  */
33  int sfdl_bus;
34  int sfdl_slot;
35  int sfdl_pin;
36  struct common_bar_list {
37  unsigned long start;
38  unsigned long end;
39  } sfdl_bar_list[6];
40  unsigned long sfdl_force_int_addr;
41  unsigned long sfdl_flush_value;
42  volatile unsigned long *sfdl_flush_addr;
46 };
47 
48 /* This struct is kernel only and is not used by the PROM */
52 };
53 
54 /* 01/16/06 This struct is the old PROM/kernel struct and needs to be included
55  * for older official PROMs to function on the new kernel base. This struct
56  * will be removed when the next official PROM release occurs. */
57 
60  u32 filler; /* older PROMs expect the default size of a spinlock_t */
61 };
62 
63 /*
64  * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel.
65  */
67  struct sn_flush_device_kernel **widget_p; // Used as an array of wid_num
69 };
70 
71 struct hubdev_info {
73  short hdi_nasid;
74  short hdi_peer_nasid; /* Dual Porting Peer */
75 
78 
79 
80  void *hdi_nodepda;
84 };
85 
86 extern void hubdev_init_node(nodepda_t *, cnodeid_t);
87 extern void hub_error_init(struct hubdev_info *);
88 extern void ice_error_init(struct hubdev_info *);
89 
90 
91 #endif /* _ASM_IA64_SN_XTALK_HUBDEV_H */