2.5.70 update
[linux-flexiantxendom0-3.2.10.git] / include / asm-ia64 / sn / sn1 / bedrock.h
1 /* $Id$
2  *
3  * This file is subject to the terms and conditions of the GNU General Public
4  * License.  See the file "COPYING" in the main directory of this archive
5  * for more details.
6  *
7  * Copyright (C) 1992 - 1997, 2000-2002 Silicon Graphics, Inc. All rights reserved.
8  */
9
10 #ifndef _ASM_IA64_SN_SN1_BEDROCK_H
11 #define _ASM_IA64_SN_SN1_BEDROCK_H
12
13
14 /* The secret password; used to release protection */
15 #define HUB_PASSWORD            0x53474972756c6573ull
16
17 #define CHIPID_HUB              0x3012
18 #define CHIPID_ROUTER           0x3017
19
20 #define BEDROCK_REV_1_0         1
21 #define BEDROCK_REV_1_1         2
22
23 #define MAX_HUB_PATH            80
24
25 #include <asm/sn/arch.h>
26 #include <asm/sn/sn1/addrs.h>
27 #include <asm/sn/sn1/hubpi.h>
28 #include <asm/sn/sn1/hubmd.h>
29 #include <asm/sn/sn1/hubio.h>
30 #include <asm/sn/sn1/hubni.h>
31 #include <asm/sn/sn1/hublb.h>
32 #include <asm/sn/sn1/hubxb.h>
33 #include <asm/sn/sn1/hubpi_next.h>
34 #include <asm/sn/sn1/hubmd_next.h>
35 #include <asm/sn/sn1/hubio_next.h>
36 #include <asm/sn/sn1/hubni_next.h>
37 #include <asm/sn/sn1/hublb_next.h>
38 #include <asm/sn/sn1/hubxb_next.h>
39
40 /* Translation of uncached attributes */
41 #define UATTR_HSPEC     0
42 #define UATTR_IO        1
43 #define UATTR_MSPEC     2
44 #define UATTR_UNCAC     3
45
46 #if __ASSEMBLY__
47
48 /*
49  * Get nasid into register, r (uses at)
50  */
51 #define GET_NASID_ASM(r)                                \
52         dli     r, LOCAL_HUB_ADDR(LB_REV_ID);   \
53         ld      r, (r);                                 \
54         and     r, LRI_NODEID_MASK;                     \
55         dsrl    r, LRI_NODEID_SHFT
56
57 #endif /* __ASSEMBLY__ */
58
59 #ifndef __ASSEMBLY__
60
61 #include <asm/sn/xtalk/xwidget.h>
62
63 /* hub-as-widget iograph info, labelled by INFO_LBL_XWIDGET */
64 typedef struct v_hub_s *v_hub_t;
65 typedef uint64_t      rtc_time_t;
66
67 struct nodepda_s;
68 int hub_check_pci_equiv(void *addra, void *addrb);
69 void capture_hub_stats(cnodeid_t, struct nodepda_s *);
70 void init_hub_stats(cnodeid_t, struct nodepda_s *);
71
72 #endif /* __ASSEMBLY__ */
73
74 #endif /* _ASM_IA64_SN_SN1_BEDROCK_H */