diff options
Diffstat (limited to 'include/asm-ia64/sn')
-rw-r--r-- | include/asm-ia64/sn/l1.h | 12 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_feature_sets.h | 57 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_sal.h | 79 | ||||
-rw-r--r-- | include/asm-ia64/sn/tiocx.h | 3 |
4 files changed, 141 insertions, 10 deletions
diff --git a/include/asm-ia64/sn/l1.h b/include/asm-ia64/sn/l1.h index 2e5f0aa38889..e3b819110d47 100644 --- a/include/asm-ia64/sn/l1.h +++ b/include/asm-ia64/sn/l1.h | |||
@@ -35,4 +35,16 @@ | |||
35 | #define L1_BRICKTYPE_ATHENA 0x2b /* + */ | 35 | #define L1_BRICKTYPE_ATHENA 0x2b /* + */ |
36 | #define L1_BRICKTYPE_DAYTONA 0x7a /* z */ | 36 | #define L1_BRICKTYPE_DAYTONA 0x7a /* z */ |
37 | 37 | ||
38 | /* board type response codes */ | ||
39 | #define L1_BOARDTYPE_IP69 0x0100 /* CA */ | ||
40 | #define L1_BOARDTYPE_IP63 0x0200 /* CB */ | ||
41 | #define L1_BOARDTYPE_BASEIO 0x0300 /* IB */ | ||
42 | #define L1_BOARDTYPE_PCIE2SLOT 0x0400 /* IC */ | ||
43 | #define L1_BOARDTYPE_PCIX3SLOT 0x0500 /* ID */ | ||
44 | #define L1_BOARDTYPE_PCIXPCIE4SLOT 0x0600 /* IE */ | ||
45 | #define L1_BOARDTYPE_ABACUS 0x0700 /* AB */ | ||
46 | #define L1_BOARDTYPE_DAYTONA 0x0800 /* AD */ | ||
47 | #define L1_BOARDTYPE_INVAL (-1) /* invalid brick type */ | ||
48 | |||
49 | |||
38 | #endif /* _ASM_IA64_SN_L1_H */ | 50 | #endif /* _ASM_IA64_SN_L1_H */ |
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h new file mode 100644 index 000000000000..e68a80853d5d --- /dev/null +++ b/include/asm-ia64/sn/sn_feature_sets.h | |||
@@ -0,0 +1,57 @@ | |||
1 | #ifndef _ASM_IA64_SN_FEATURE_SETS_H | ||
2 | #define _ASM_IA64_SN_FEATURE_SETS_H | ||
3 | |||
4 | /* | ||
5 | * SN PROM Features | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General Public | ||
8 | * License. See the file "COPYING" in the main directory of this archive | ||
9 | * for more details. | ||
10 | * | ||
11 | * Copyright (c) 2005 Silicon Graphics, Inc. All rights reserved. | ||
12 | */ | ||
13 | |||
14 | |||
15 | #include <asm/types.h> | ||
16 | #include <asm/bitops.h> | ||
17 | |||
18 | /* --------------------- PROM Features -----------------------------*/ | ||
19 | extern int sn_prom_feature_available(int id); | ||
20 | |||
21 | #define MAX_PROM_FEATURE_SETS 2 | ||
22 | |||
23 | /* | ||
24 | * The following defines features that may or may not be supported by the | ||
25 | * current PROM. The OS uses sn_prom_feature_available(feature) to test for | ||
26 | * the presence of a PROM feature. Down rev (old) PROMs will always test | ||
27 | * "false" for new features. | ||
28 | * | ||
29 | * Use: | ||
30 | * if (sn_prom_feature_available(PRF_FEATURE_XXX)) | ||
31 | * ... | ||
32 | */ | ||
33 | |||
34 | /* | ||
35 | * Example: feature XXX | ||
36 | */ | ||
37 | #define PRF_FEATURE_XXX 0 | ||
38 | |||
39 | |||
40 | |||
41 | /* --------------------- OS Features -------------------------------*/ | ||
42 | |||
43 | /* | ||
44 | * The following defines OS features that are optionally present in | ||
45 | * the operating system. | ||
46 | * During boot, PROM is notified of these features via a series of calls: | ||
47 | * | ||
48 | * ia64_sn_set_os_feature(feature1); | ||
49 | * | ||
50 | * Once enabled, a feature cannot be disabled. | ||
51 | * | ||
52 | * By default, features are disabled unless explicitly enabled. | ||
53 | */ | ||
54 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 | ||
55 | #define OSF_FEAT_LOG_SBES 1 | ||
56 | |||
57 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ | ||
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index e67825ad1930..34f3127e4416 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #define SN_SAL_CONSOLE_PUTB 0x02000028 | 47 | #define SN_SAL_CONSOLE_PUTB 0x02000028 |
48 | #define SN_SAL_CONSOLE_XMIT_CHARS 0x0200002a | 48 | #define SN_SAL_CONSOLE_XMIT_CHARS 0x0200002a |
49 | #define SN_SAL_CONSOLE_READC 0x0200002b | 49 | #define SN_SAL_CONSOLE_READC 0x0200002b |
50 | #define SN_SAL_SYSCTL_OP 0x02000030 | ||
50 | #define SN_SAL_SYSCTL_MODID_GET 0x02000031 | 51 | #define SN_SAL_SYSCTL_MODID_GET 0x02000031 |
51 | #define SN_SAL_SYSCTL_GET 0x02000032 | 52 | #define SN_SAL_SYSCTL_GET 0x02000032 |
52 | #define SN_SAL_SYSCTL_IOBRICK_MODULE_GET 0x02000033 | 53 | #define SN_SAL_SYSCTL_IOBRICK_MODULE_GET 0x02000033 |
@@ -80,6 +81,9 @@ | |||
80 | #define SN_SAL_RESERVED_DO_NOT_USE 0x02000062 | 81 | #define SN_SAL_RESERVED_DO_NOT_USE 0x02000062 |
81 | #define SN_SAL_IOIF_GET_PCI_TOPOLOGY 0x02000064 | 82 | #define SN_SAL_IOIF_GET_PCI_TOPOLOGY 0x02000064 |
82 | 83 | ||
84 | #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 | ||
85 | #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 | ||
86 | |||
83 | /* | 87 | /* |
84 | * Service-specific constants | 88 | * Service-specific constants |
85 | */ | 89 | */ |
@@ -98,6 +102,13 @@ | |||
98 | #define SAL_INTR_FREE 2 | 102 | #define SAL_INTR_FREE 2 |
99 | 103 | ||
100 | /* | 104 | /* |
105 | * operations available on the generic SN_SAL_SYSCTL_OP | ||
106 | * runtime service | ||
107 | */ | ||
108 | #define SAL_SYSCTL_OP_IOBOARD 0x0001 /* retrieve board type */ | ||
109 | #define SAL_SYSCTL_OP_TIO_JLCK_RST 0x0002 /* issue TIO clock reset */ | ||
110 | |||
111 | /* | ||
101 | * IRouter (i.e. generalized system controller) operations | 112 | * IRouter (i.e. generalized system controller) operations |
102 | */ | 113 | */ |
103 | #define SAL_IROUTER_OPEN 0 /* open a subchannel */ | 114 | #define SAL_IROUTER_OPEN 0 /* open a subchannel */ |
@@ -118,8 +129,8 @@ | |||
118 | /* | 129 | /* |
119 | * Error Handling Features | 130 | * Error Handling Features |
120 | */ | 131 | */ |
121 | #define SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV 0x1 | 132 | #define SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV 0x1 // obsolete |
122 | #define SAL_ERR_FEAT_LOG_SBES 0x2 | 133 | #define SAL_ERR_FEAT_LOG_SBES 0x2 // obsolete |
123 | #define SAL_ERR_FEAT_MFR_OVERRIDE 0x4 | 134 | #define SAL_ERR_FEAT_MFR_OVERRIDE 0x4 |
124 | #define SAL_ERR_FEAT_SBE_THRESHOLD 0xffff0000 | 135 | #define SAL_ERR_FEAT_SBE_THRESHOLD 0xffff0000 |
125 | 136 | ||
@@ -152,12 +163,6 @@ sn_sal_rev(void) | |||
152 | } | 163 | } |
153 | 164 | ||
154 | /* | 165 | /* |
155 | * Specify the minimum PROM revsion required for this kernel. | ||
156 | * Note that they're stored in hex format... | ||
157 | */ | ||
158 | #define SN_SAL_MIN_VERSION 0x0404 | ||
159 | |||
160 | /* | ||
161 | * Returns the master console nasid, if the call fails, return an illegal | 166 | * Returns the master console nasid, if the call fails, return an illegal |
162 | * value. | 167 | * value. |
163 | */ | 168 | */ |
@@ -336,7 +341,7 @@ ia64_sn_plat_cpei_handler(void) | |||
336 | } | 341 | } |
337 | 342 | ||
338 | /* | 343 | /* |
339 | * Set Error Handling Features | 344 | * Set Error Handling Features (Obsolete) |
340 | */ | 345 | */ |
341 | static inline u64 | 346 | static inline u64 |
342 | ia64_sn_plat_set_error_handling_features(void) | 347 | ia64_sn_plat_set_error_handling_features(void) |
@@ -876,6 +881,41 @@ ia64_sn_sysctl_event_init(nasid_t nasid) | |||
876 | return (int) rv.v0; | 881 | return (int) rv.v0; |
877 | } | 882 | } |
878 | 883 | ||
884 | /* | ||
885 | * Ask the system controller on the specified nasid to reset | ||
886 | * the CX corelet clock. Only valid on TIO nodes. | ||
887 | */ | ||
888 | static inline int | ||
889 | ia64_sn_sysctl_tio_clock_reset(nasid_t nasid) | ||
890 | { | ||
891 | struct ia64_sal_retval rv; | ||
892 | SAL_CALL_REENTRANT(rv, SN_SAL_SYSCTL_OP, SAL_SYSCTL_OP_TIO_JLCK_RST, | ||
893 | nasid, 0, 0, 0, 0, 0); | ||
894 | if (rv.status != 0) | ||
895 | return (int)rv.status; | ||
896 | if (rv.v0 != 0) | ||
897 | return (int)rv.v0; | ||
898 | |||
899 | return 0; | ||
900 | } | ||
901 | |||
902 | /* | ||
903 | * Get the associated ioboard type for a given nasid. | ||
904 | */ | ||
905 | static inline int | ||
906 | ia64_sn_sysctl_ioboard_get(nasid_t nasid) | ||
907 | { | ||
908 | struct ia64_sal_retval rv; | ||
909 | SAL_CALL_REENTRANT(rv, SN_SAL_SYSCTL_OP, SAL_SYSCTL_OP_IOBOARD, | ||
910 | nasid, 0, 0, 0, 0, 0); | ||
911 | if (rv.v0 != 0) | ||
912 | return (int)rv.v0; | ||
913 | if (rv.v1 != 0) | ||
914 | return (int)rv.v1; | ||
915 | |||
916 | return 0; | ||
917 | } | ||
918 | |||
879 | /** | 919 | /** |
880 | * ia64_sn_get_fit_compt - read a FIT entry from the PROM header | 920 | * ia64_sn_get_fit_compt - read a FIT entry from the PROM header |
881 | * @nasid: NASID of node to read | 921 | * @nasid: NASID of node to read |
@@ -1052,4 +1092,25 @@ ia64_sn_is_fake_prom(void) | |||
1052 | return (rv.status == 0); | 1092 | return (rv.status == 0); |
1053 | } | 1093 | } |
1054 | 1094 | ||
1095 | static inline int | ||
1096 | ia64_sn_get_prom_feature_set(int set, unsigned long *feature_set) | ||
1097 | { | ||
1098 | struct ia64_sal_retval rv; | ||
1099 | |||
1100 | SAL_CALL_NOLOCK(rv, SN_SAL_GET_PROM_FEATURE_SET, set, 0, 0, 0, 0, 0, 0); | ||
1101 | if (rv.status != 0) | ||
1102 | return rv.status; | ||
1103 | *feature_set = rv.v0; | ||
1104 | return 0; | ||
1105 | } | ||
1106 | |||
1107 | static inline int | ||
1108 | ia64_sn_set_os_feature(int feature) | ||
1109 | { | ||
1110 | struct ia64_sal_retval rv; | ||
1111 | |||
1112 | SAL_CALL_NOLOCK(rv, SN_SAL_SET_OS_FEATURE_SET, feature, 0, 0, 0, 0, 0, 0); | ||
1113 | return rv.status; | ||
1114 | } | ||
1115 | |||
1055 | #endif /* _ASM_IA64_SN_SN_SAL_H */ | 1116 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |
diff --git a/include/asm-ia64/sn/tiocx.h b/include/asm-ia64/sn/tiocx.h index c5447a504509..5699e75e5024 100644 --- a/include/asm-ia64/sn/tiocx.h +++ b/include/asm-ia64/sn/tiocx.h | |||
@@ -19,6 +19,7 @@ struct cx_id_s { | |||
19 | 19 | ||
20 | struct cx_dev { | 20 | struct cx_dev { |
21 | struct cx_id_s cx_id; | 21 | struct cx_id_s cx_id; |
22 | int bt; /* board/blade type */ | ||
22 | void *soft; /* driver specific */ | 23 | void *soft; /* driver specific */ |
23 | struct hubdev_info *hubdev; | 24 | struct hubdev_info *hubdev; |
24 | struct device dev; | 25 | struct device dev; |
@@ -59,7 +60,7 @@ struct cx_drv { | |||
59 | extern struct sn_irq_info *tiocx_irq_alloc(nasid_t, int, int, nasid_t, int); | 60 | extern struct sn_irq_info *tiocx_irq_alloc(nasid_t, int, int, nasid_t, int); |
60 | extern void tiocx_irq_free(struct sn_irq_info *); | 61 | extern void tiocx_irq_free(struct sn_irq_info *); |
61 | extern int cx_device_unregister(struct cx_dev *); | 62 | extern int cx_device_unregister(struct cx_dev *); |
62 | extern int cx_device_register(nasid_t, int, int, struct hubdev_info *); | 63 | extern int cx_device_register(nasid_t, int, int, struct hubdev_info *, int); |
63 | extern int cx_driver_unregister(struct cx_drv *); | 64 | extern int cx_driver_unregister(struct cx_drv *); |
64 | extern int cx_driver_register(struct cx_drv *); | 65 | extern int cx_driver_register(struct cx_drv *); |
65 | extern uint64_t tiocx_dma_addr(uint64_t addr); | 66 | extern uint64_t tiocx_dma_addr(uint64_t addr); |